florence-2-eval
Florence-2: Advancing a Unified Representation for a Variety of Vision Tasks — Bin Xiao et al. (arXiv:2311.06242, 2023)
What this evaluates
Evaluates a unified vision foundation model's zero-shot and fine-tuned capabilities across diverse computer vision tasks. It probes the model's ability to perform image captioning, visual question answering, object detection, referring expression comprehension, and semantic segmentation using a single sequence-to-sequence architecture.
Datasets
- COCO — total ?; splits: train2017 (-1), val2017 (-1), Karpathy test (-1)
- Flickr30k — total ?; splits: test (-1)
- RefCOCO/+/g — total ?; splits: val (-1), test-A (-1), test-B (-1)
- VQAv2 — total ?; splits: test-dev (-1)
- ADE20K — total ?; splits: val (-1)
Metrics
CIDEr (primary) — range: [0, inf)
- Consensus-based Image Description Evaluation. Computes n-gram overlap between generated captions and multiple ground-truth captions, weighted by inverse document frequency (IDF) scores.
mAP — range: [0, 1]
- Mean Average Precision at IoU thresholds 0.5:0.95 (APb for detection, APm for segmentation).
Recall@1 — range: [0, 1]
- Percentage of queries where the correct bounding box is ranked first among predictions.
Accuracy — range: [0, 1]
- Exact match ratio between predicted class/label and ground truth for VQA and referring expression comprehension tasks.
mIoU — range: [0, 1]
- Mean Intersection over Union between predicted segmentation masks and ground truth masks across all classes.
Input / output format
Input: RGB image resized to 384x384 (or 768x768 for high-res tuning) concatenated with a task-specific text prompt (e.g., '', '', '') in a sequence-to-sequence format.
Output: Text sequence generated by the decoder, representing a caption, bounding box coordinates (normalized), segmentation mask tokens, or a class label.
Scoring recipe
def score(predictions, golds, task):
if task == 'captioning': return cider_score(predictions, golds)
if task == 'detection': return map_score(predictions, golds, iou=0.5)
if task == 'referring': return recall_at_1(predictions, golds)
if task == 'vqa': return accuracy(predictions, golds)
if task == 'segmentation': return miou_score(predictions, golds)
return 0
Common pitfalls
- Using the standard COCO test set instead of the Karpathy split for captioning evaluation, which yields different scores.
- Comparing VQA accuracy without accounting for external OCR usage in baseline models, as some baselines use OCR tokens while Florence-2 does not.
- Confusing zero-shot evaluation (no task-specific fine-tuning) with generalist fine-tuning (single model trained on multiple public datasets).
Evidence (verbatim from paper)
For image-level tasks, Florence-2-L achieves a 135.6 CIDEr score on the COCO caption benchmark... For region-level grounding and referring expression comprehension tasks, Florence-2-L establishes a new record in zero-shot performance achieving a 5.7 improvement in Flickr30k Recall@1... Additionally, our pre-trained model attains a 35.8% mIOU in the Refcoco referring expression segmentation (RES) task
Citation
@misc{xiao2023florence2,
title={Florence-2: Advancing a Unified Representation for a Variety of Vision Tasks},
author={Bin Xiao et al.},
year={2023},
note={arXiv:2311.06242}
}
1---2name: florence-2-eval3description: Evaluates a unified vision foundation model's zero-shot and fine-tuned capabilities across diverse computer vision tasks. It probes the model's ability to perform image captioning, visual question answering, object detection, referring expression comprehension, and semantic segmentation using a single sequence-to-sequence architecture. Use when the user wants to benchmark on COCO, Flickr30k, RefCOCO/+/g, VQAv2, ADE20K, or asks about evaluating this task. Reports CIDEr.4---56# florence-2-eval78> Florence-2: Advancing a Unified Representation for a Variety of Vision Tasks — Bin Xiao et al. (arXiv:2311.06242, 2023)910## What this evaluates1112Evaluates a unified vision foundation model's zero-shot and fine-tuned capabilities across diverse computer vision tasks. It probes the model's ability to perform image captioning, visual question answering, object detection, referring expression comprehension, and semantic segmentation using a single sequence-to-sequence architecture.1314## Datasets1516- **COCO** — total ?; splits: train2017 (-1), val2017 (-1), Karpathy test (-1)17- **Flickr30k** — total ?; splits: test (-1)18- **RefCOCO/+/g** — total ?; splits: val (-1), test-A (-1), test-B (-1)19- **VQAv2** — total ?; splits: test-dev (-1)20- **ADE20K** — total ?; splits: val (-1)2122## Metrics2324- `CIDEr` **(primary)** — range: [0, inf)25 - Consensus-based Image Description Evaluation. Computes n-gram overlap between generated captions and multiple ground-truth captions, weighted by inverse document frequency (IDF) scores.26- `mAP` — range: [0, 1]27 - Mean Average Precision at IoU thresholds 0.5:0.95 (APb for detection, APm for segmentation).28- `Recall@1` — range: [0, 1]29 - Percentage of queries where the correct bounding box is ranked first among predictions.30- `Accuracy` — range: [0, 1]31 - Exact match ratio between predicted class/label and ground truth for VQA and referring expression comprehension tasks.32- `mIoU` — range: [0, 1]33 - Mean Intersection over Union between predicted segmentation masks and ground truth masks across all classes.3435## Input / output format3637**Input**: RGB image resized to 384x384 (or 768x768 for high-res tuning) concatenated with a task-specific text prompt (e.g., '<CAPTION>', '<DETECT>', '<REFERRING_EXPRESSION>') in a sequence-to-sequence format.3839**Output**: Text sequence generated by the decoder, representing a caption, bounding box coordinates (normalized), segmentation mask tokens, or a class label.4041## Scoring recipe4243```python44def score(predictions, golds, task):45 if task == 'captioning': return cider_score(predictions, golds)46 if task == 'detection': return map_score(predictions, golds, iou=0.5)47 if task == 'referring': return recall_at_1(predictions, golds)48 if task == 'vqa': return accuracy(predictions, golds)49 if task == 'segmentation': return miou_score(predictions, golds)50 return 051```5253## Common pitfalls5455- Using the standard COCO test set instead of the Karpathy split for captioning evaluation, which yields different scores.56- Comparing VQA accuracy without accounting for external OCR usage in baseline models, as some baselines use OCR tokens while Florence-2 does not.57- Confusing zero-shot evaluation (no task-specific fine-tuning) with generalist fine-tuning (single model trained on multiple public datasets).5859## Evidence (verbatim from paper)6061> For image-level tasks, Florence-2-L achieves a 135.6 CIDEr score on the COCO caption benchmark... For region-level grounding and referring expression comprehension tasks, Florence-2-L establishes a new record in zero-shot performance achieving a 5.7 improvement in Flickr30k Recall@1... Additionally, our pre-trained model attains a 35.8% mIOU in the Refcoco referring expression segmentation (RES) task6263## Citation6465```bibtex66@misc{xiao2023florence2,67 title={Florence-2: Advancing a Unified Representation for a Variety of Vision Tasks},68 author={Bin Xiao et al.},69 year={2023},70 note={arXiv:2311.06242}71}72```7374- arXiv: 2311.06242