FOCI (Fine-grained Object ClassIfication)
收藏资源简介:
FOCI是由维尔茨堡大学的研究团队创建的一个用于细粒度对象分类的基准数据集。该数据集整合了五个流行的分类数据集,并从ImageNet-21k中提取了四个特定领域的子集,涵盖了动物、植物、食品和人工制品等多个类别。FOCI的创建旨在通过多选题形式避免开放式问答任务中的答案模糊性,并利用CLIP模型挖掘负标签以保持分类难度。该数据集特别适用于测试大型视觉-语言模型在细粒度对象识别方面的能力,旨在解决现有模型在精确识别不同对象类别上的不足。
FOCI is a benchmark dataset for fine-grained object classification developed by a research team at the University of Würzburg. It integrates five popular classification datasets and extracts four domain-specific subsets from ImageNet-21k, covering categories including animals, plants, food, and artificial artifacts. The dataset is designed to avoid answer ambiguity inherent in open-ended question-and-answer tasks by adopting a multiple-choice format, and leverages the CLIP model to mine negative labels to maintain appropriate classification difficulty. This dataset is particularly well-suited for evaluating the fine-grained object recognition capabilities of large vision-language models, with the goal of addressing the shortcomings of existing models in accurately discriminating between different object categories.
FOCI - 大型视觉语言模型细粒度对象分类基准
关于
我们提出了 FOCI,这是一个针对大型视觉语言模型(LVLMs)的细粒度对象分类基准。FOCI 将现有的图像分类数据集转化为明确的多个选择题。
使用基准
1. 准备数据
在开始之前,您需要下载并准备要使用的图像数据集。我们提供了一个指南 这里。
2. 准备环境
我们建议至少使用 Python >=3.9。需求可以在 requirements.txt 中找到。我们使用了 PyTorch 2.2.1,但旧版本或新版本也可能适用。
3. 运行基准
我们提供了一个简单的 CLI 来运行基准,可以这样调用:
python run_ic_bench.py --model=google/paligemma-3b-mix-224 --dataset=stanford_cars --prompt_query=Which of these cars is shown in the image? --image_root=/media/gregor/cache1/icbench/stanfordcars/stanford_cars
可用的数据集包括 imagenet, imagenet-rendition, imagenet-adversarial, imagenet-sketch, food101, flowers102, fgvc_aircraft, stanford_cars, oxford_pet, geode, imagenet-6k-{animal|plant|food|artifact}。更多示例请参见我们的 scripts。
4. 评估结果
我们提供了一个 notebook 以便于评估 CLI 生成的结果。
5. 额外内容:测试新模型
我们的代码很容易扩展到新模型(尤其是如果它们使用 Hugging Face):
- 基于参考 HfModel 或其他已实现的模型实现您的模型。
- 更新 model_template() 以提供您模型的指令模板。
- 更新 load_model() 以根据名称加载您的模型。
6. 额外内容:在新数据集上测试
我们的代码也很容易扩展到新的图像分类数据集:
- 实现一个加载器函数,该函数创建一个将标签映射到(相对)图像路径的字典,并将其添加到 DATASET_TO_LOADER。
- 完成。首次运行基准时,我们使用 CLIP 查找困难的多个选择选项并将其存储在 data 中,以供后续运行使用。
许可证与引用
这项工作基于 MIT 许可证。第三方软件和数据受其各自许可证的约束。如果您发现我们的代码/数据/模型或想法在您的研究中有用,请考虑引用该论文:
@article{geigle2024foci, author = {Gregor Geigle and Radu Timofte and Goran Glavav{s}}, title = {African or European Swallow? Benchmarking Large Vision-Language Models for Fine-Grained Object Classification}, journal = {arXiv}, volume = {abs/2406.14496}, year = {2024}, url = {https://arxiv.org/abs/2406.14496}, eprinttype = {arXiv}, eprint = {2406.14496}, }

- 1African or European Swallow? Benchmarking Large Vision-Language Models for Fine-Grained Object Classification维尔茨堡大学 · 2024年



