locus-2b-grounding / README.md
multimodalart's picture
multimodalart HF Staff
Upload folder using huggingface_hub
a99b8df verified
|
Raw History Blame Contribute Delete
1.86 kB
---
title: LOCUS-2B Visual Grounding
emoji: 🎯
colorFrom: green
colorTo: purple
sdk: gradio
sdk_version: 6.30.0
app_file: app.py
python_version: "3.12"
short_description: Ground referring expressions with draft-and-verify boxes
startup_duration_timeout: 30m
---
# LOCUS-2B — Locate Once, Check Until Settled
Ground a referring expression in an image and get its bounding box.
[LOCUS-2B](https://huggingface.co/MTalha2001/LOCUS-2B) is
[Qwen3-VL-2B-Instruct](https://huggingface.co/Qwen/Qwen3-VL-2B-Instruct) with a small box head,
trained with the [Locus recipe](https://github.com/muhammad-talha-ad/LOCUS):
1. The image is prefilled once; every expression about it runs as a short branch over the cached prefix.
2. The box head drafts the box in one pass.
3. The draft is rendered as the coordinate tokens the model would write, and the model verifies all
of them in parallel by Jacobi iteration until the draft stops changing.
With exact acceptance the returned box is the model's own greedy coordinate-token answer, reached
in a few passes instead of one decoding step per token.
## Usage
Upload an image and enter one referring expression per line. Pick an output mode:
- **Verified, exact** — the greedy coordinate-token box (a few verifier passes).
- **Verified, typical (α = 0.5)** — fewer passes, no longer exactly greedy.
- **Head only** — the one-pass draft, fastest.
Each row of the results table shows the expression, its box `[x0, y0, x1, y1]` in pixels, the
head's IoU-aware confidence and the number of verifier passes used.
The `locus/` directory vendored in this Space is the inference path of the
[Apache-2.0 LOCUS repository](https://github.com/muhammad-talha-ad/LOCUS). Example images are from
the CC0 pool [`linoyts/repo-to-space-example-inputs`](https://huggingface.co/datasets/linoyts/repo-to-space-example-inputs).