Views
No views yet
| COCO val2017 detection (mode A) | mAP@[.5:.95] | AP50 | AR100 |
|---|---|---|---|
| This model (0.23B) | 0.438 | 0.574 | 0.504 |
| Qwen3-VL-4B (4.0B) | 0.390 | 0.531 | 0.441 |
| Task | Metric | This model | Qwen3-VL-4B |
|---|---|---|---|
| COCO detection | mAP | 0.438 ✅ | 0.390 |
| VQAv2 | acc | 0.775 | 0.815 |
| GQA | exact match | 0.486 | 0.622 |
| TallyQA | count EM | 0.779 | 0.844 |
| PixMo-Count | count EM | 0.615 | 0.651 |
| RefCOCO/+/g | acc@0.5 | 0.80 | 0.90 |
1import torch
2from transformers import Florence2ForConditionalGeneration, AutoProcessor
3from PIL import Image
4
5model_id = "neuromorphic-research/florence2-base-0.5b-detection"
6model = Florence2ForConditionalGeneration.from_pretrained(model_id, dtype=torch.bfloat16).to("cuda").eval()
7proc = AutoProcessor.from_pretrained(model_id)
8
9image = Image.open("image.jpg").convert("RGB")
10inputs = proc(text="<OD>", images=image, return_tensors="pt").to("cuda", torch.bfloat16)
11out = model.generate(input_ids=inputs["input_ids"], pixel_values=inputs["pixel_values"],
12 max_new_tokens=1024, num_beams=3)
13text = proc.batch_decode(out, skip_special_tokens=False)[0]
14print(proc.post_process_generation(text, task="<OD>", image_size=image.size))<OPEN_VOCABULARY_DETECTION>, <CAPTION_TO_PHRASE_GROUNDING>, and short-answer VQA.florence-community/Florence-2-base-ft on a multi-task mix: COCO detection
(all-class + per-class), RefCOCO/+/g grounding, VQAv2, GQA, TallyQA, PixMo-Count. bf16, LR 4e-6
(vision tower 2e-6), gradient checkpointing. License: MIT (inherits Florence-2-base-ft).