Hulingxiao He · Geng Li · Zijun Geng · Jinglin Xu · Yuxin Peng
TL;DR: We revisit three quintessential capabilities of MLLMs for FGVR, including object information extraction, category knowledge reserve, object-category alignment, and position of the root cause as a misalignment problem. To address this issue, we present Finedefics, an MLLM that enhances the model's FGVR capability by incorporating informative attribute descriptions of objects into the training phase.
git clone https://github.com/PKU-ICST-MIPL/Finedefics_ICLR2025.git
cd Finedefics_ICLR2025
conda create -n finedefics python=3.10.14 -y # create finedefics conda environment
conda activate finedefics
pip install torch==2.4.1 --index-url https://download.pytorch.org/whl/cu121
pip install -r requirements.txt
cd transformers
pip install -e .
We can download prepared FGVR datasets here:
After downloading, unzip and organize the directory like the following and we are ready to go:
Finedefics_ICLR2025
└── data
├── aircraft-102 ✈️
├── bird-200 🦤
├── car-196 🚙
├── dog-120 🐕
├── flower-102 🌼
├── pet-37 🐈
├── pretrain.csv
└── finetune.csv
huggingface-cli download HuggingFaceM4/idefics2-8b --local-dir /path/to/save/model
After downloading, organize the directory like the following:
Finedefics_ICLR2025
└── pretrained_weights
└── idefics2-8b
sh train.sh
We use FOCI-Benchmark to evaluate our model.
Requirements can be found in requirements.txt. We recommend using Python ≥ 3.9 and PyTorch ≥ 2.2.1.
An example of evaluating on dog-120 dataset is:
python run_ic_bench.py --model=/path/to/model --dataset=dog-120 --prompt_query='Which of these dogs is shown in the image?' --image_root=/path/to/dog-120 --batchsize=4
Note: Available datasets are aircraft-102, bird-200, car-196, dog-120, flower-102, pet-37.
See scripts for examples of evaluating Finedefics on all benchmark datasets.
Our code is trivial to extend to new models, especially if they use HuggingFace:
Our code is also trivial to extend to new image classification datasets:
Our code references FineR, FOCI-Benchmark, HACL. Many thanks to the authors.
If you find it useful for your research and applications, please cite related papers using this BibTeX:
@article{he2025analyzing,
title={Analyzing and boosting the power of fine-grained visual recognition for multi-modal large language models},
author={He, Hulingxiao and Li, Geng and Geng, Zijun and Xu, Jinglin and Peng, Yuxin},
journal={arXiv preprint arXiv:2501.15140},
year={2025}
}
@article{he2026fine,
title={Fine-R1: Make Multi-modal LLMs Excel in Fine-Grained Visual Recognition by Chain-of-Thought Reasoning},
author={He, Hulingxiao and Geng, Zijun and Peng, Yuxin},
journal={arXiv preprint arXiv:2602.07605},
year={2026}
}
@article{he2026taxonomy,
title={Taxonomy-Aware Representation Alignment for Hierarchical Visual Recognition with Large Multimodal Models},
author={He, Hulingxiao and Tan, Zhi and Peng, Yuxin},
journal={arXiv preprint arXiv:2603.00431},
year={2026}
}
17 commits
7 commits
Python
98.8%
Hulingxiao He · Geng Li · Zijun Geng · Jinglin Xu · Yuxin Peng
TL;DR: We revisit three quintessential capabilities of MLLMs for FGVR, including object information extraction, category knowledge reserve, object-category alignment, and position of the root cause as a misalignment problem. To address this issue, we present Finedefics, an MLLM that enhances the model's FGVR capability by incorporating informative attribute descriptions of objects into the training phase.
git clone https://github.com/PKU-ICST-MIPL/Finedefics_ICLR2025.git
cd Finedefics_ICLR2025
conda create -n finedefics python=3.10.14 -y # create finedefics conda environment
conda activate finedefics
pip install torch==2.4.1 --index-url https://download.pytorch.org/whl/cu121
pip install -r requirements.txt
cd transformers
pip install -e .
We can download prepared FGVR datasets here:
After downloading, unzip and organize the directory like the following and we are ready to go:
Finedefics_ICLR2025
└── data
├── aircraft-102 ✈️
├── bird-200 🦤
├── car-196 🚙
├── dog-120 🐕
├── flower-102 🌼
├── pet-37 🐈
├── pretrain.csv
└── finetune.csv
huggingface-cli download HuggingFaceM4/idefics2-8b --local-dir /path/to/save/model
After downloading, organize the directory like the following:
Finedefics_ICLR2025
└── pretrained_weights
└── idefics2-8b
sh train.sh
We use FOCI-Benchmark to evaluate our model.
Requirements can be found in requirements.txt. We recommend using Python ≥ 3.9 and PyTorch ≥ 2.2.1.
An example of evaluating on dog-120 dataset is:
python run_ic_bench.py --model=/path/to/model --dataset=dog-120 --prompt_query='Which of these dogs is shown in the image?' --image_root=/path/to/dog-120 --batchsize=4
Note: Available datasets are aircraft-102, bird-200, car-196, dog-120, flower-102, pet-37.
See scripts for examples of evaluating Finedefics on all benchmark datasets.
Our code is trivial to extend to new models, especially if they use HuggingFace:
Our code is also trivial to extend to new image classification datasets:
Our code references FineR, FOCI-Benchmark, HACL. Many thanks to the authors.
If you find it useful for your research and applications, please cite related papers using this BibTeX:
@article{he2025analyzing,
title={Analyzing and boosting the power of fine-grained visual recognition for multi-modal large language models},
author={He, Hulingxiao and Li, Geng and Geng, Zijun and Xu, Jinglin and Peng, Yuxin},
journal={arXiv preprint arXiv:2501.15140},
year={2025}
}
@article{he2026fine,
title={Fine-R1: Make Multi-modal LLMs Excel in Fine-Grained Visual Recognition by Chain-of-Thought Reasoning},
author={He, Hulingxiao and Geng, Zijun and Peng, Yuxin},
journal={arXiv preprint arXiv:2602.07605},
year={2026}
}
@article{he2026taxonomy,
title={Taxonomy-Aware Representation Alignment for Hierarchical Visual Recognition with Large Multimodal Models},
author={He, Hulingxiao and Tan, Zhi and Peng, Yuxin},
journal={arXiv preprint arXiv:2603.00431},
year={2026}
}
17 commits
7 commits
Python
98.8%