shubhampatle's picture
Update model card
a9af5d4 verified
|
Raw History Blame Contribute Delete
8.74 kB
---
license: other
license_name: nvidia-license
license_link: LICENSE
library_name: transformers
pipeline_tag: image-text-to-text
base_model: nvidia/LocateAnything-3B
language:
- en
tags:
- locateanything
- remote-sensing
- aerial-imagery
- earth-observation
- object-detection
- visual-grounding
- pointing
- parallel-instance-decoding
- pid
- custom_code
---
# ParallelInstanceDecoding-LocateAnything-3B
This repository contains the fully fine-tuned LocateAnything-3B checkpoint for
**Parallel Instance Decoding (PID)** from *Parallel Instance Decoding for
Language-Guided Localization in Aerial Images*.
Given a textual reference (a class name or a phrase), PID first generates one
point address for every matching object instance and then predicts the
horizontal bounding boxes of all addresses in a single parallel decoding pass.
An instance-isolated attention mask lets each box attend to the full image, its
reference and its own address, but not to the other boxes, so the boxes do not
depend on each other and can be predicted together. The same model performs
category-conditioned detection, referring-expression grounding and pointing.
- **Code:** [shubhamrpatle/PID](https://github.com/shubhamrpatle/PID)
- **Project page:** [Parallel Instance Decoding](https://shubhamrpatle.github.io/PID/)
- **Base model:** [nvidia/LocateAnything-3B](https://huggingface.co/nvidia/LocateAnything-3B)
## Model details
- Base model: LocateAnything-3B (MoonViT-SO-400M vision encoder, Qwen2.5-3B language model)
- Method: Parallel Instance Decoding (PID)
- Tasks: category-conditioned horizontal-box detection, referring-expression
grounding and pointing in aerial images
- Training: full fine-tuning of all 3,517,975,280 parameters (MoonViT, projector,
Qwen language model and output head); no adapter
- Coordinates: LocateAnything's discrete coordinate tokens over `[0, 1000]`
- Checkpoint format: BF16 safetensors with the LocateAnything model code (`trust_remote_code`)
- Selected checkpoint: Stage-2 update 2,400, chosen by validation loss; the
source training checkpoint has SHA-256
`a1f8da46db0b3447b59900a848b035a11aeefa5b465f7a5faf6e2e64f52aedf3`
(recorded in `refwave_export.json`)
The internal method name in the code and in `refwave_export.json` is `refwave`,
the project's working name; read it as PID.
## Important loading note
Use this checkpoint with the released [PID code](https://github.com/shubhamrpatle/PID).
`AutoModel.from_pretrained(..., trust_remote_code=True)` loads the
LocateAnything architecture, but the two-round PID inference (address
prediction, then the instance-isolated parallel box pass) is implemented in
the code repository.
```bash
git clone https://github.com/shubhamrpatle/PID.git
cd PID
# Create the environment as described in INSTALL.md (Python 3.10, PyTorch 2.5.1, CUDA 12.1).
hf download shubhampatle/ParallelInstanceDecoding-LocateAnything-3B --local-dir ./ParallelInstanceDecoding-LocateAnything-3B
```
The release uses:
```text
torch==2.5.1
transformers==4.57.1
```
To generate predictions with these weights, point `MODEL_DIR` at the downloaded
folder:
```bash
export WORK_ROOT=/scratch/$USER/refwave-assets
export MODEL_DIR="$PWD/ParallelInstanceDecoding-LocateAnything-3B"
bash evaluate.sh 4 released
```
Then follow the repository's
[evaluation guide](https://github.com/shubhamrpatle/PID/blob/main/docs/EVALUATION.md).
The benchmark numbers in the paper were scored with the code in
[`paper_evaluation/`](https://github.com/shubhamrpatle/PID/blob/main/paper_evaluation/README.md).
## Prompts
These are the exact prompts used for training and evaluation (`<image>\n` precedes each):
| Interface | Prompt |
|---|---|
| Category addresses | `Point to all instances that match the following categories: {category}.` |
| Expression addresses | `Point to: {expression}.` |
| Pointing | `Point to: {reference}.` |
| Address-conditioned box | `Locate the single {reference} containing point <box><u><v></box> in horizontal box format. Return None if absent.` |
| Response | Format |
|---|---|
| Addresses | `<ref>{reference}</ref>` followed by one `<box><u><v></box>` per instance |
| Box | `<box><x1><y1><x2><y2></box>` |
| Absent | `<box>None</box>` |
Coordinates are integers in `[0, 1000]`, normalized to the image. Each category
is requested separately. Pointing returns the addresses directly, without the
box pass.
## Evaluation configuration
The paper evaluation uses:
```text
image_token_limit=6000 # pre-merge image patches
class_wave=18
box_wave=200
round2_execution=fused_one_pass
max_new_tokens=16384
temperature=0.7, top_p=0.9, repetition_penalty=1.1, generation_mode=hybrid
attn_implementation=sdpa, dtype=bfloat16
```
## Training
The model was fully fine-tuned from LocateAnything-3B in two curriculum stages,
each for two epochs:
1. Stage 1 (coarse): 116,386 episodes, 7,276 optimizer updates.
2. Stage 2 (dense, with replay): 39,851 episodes, 2,492 optimizer updates,
initialized from the best Stage-1 checkpoint.
Each episode trains both rounds: reference to point addresses, and address to
one box, with the two losses weighted equally. Training used eight GPUs, one
episode per GPU and four accumulation steps (effective batch 32), FP32 weights
with BF16 autocast, AdamW with weight decay 0.01, 3% warm-up and a cosine
schedule, and seed 20260908.
| Learning rate | Stage 1 | Stage 2 |
|---|---:|---:|
| Qwen language model | 2e-6 | 1e-6 |
| Output head | 1e-6 | 5e-7 |
| MoonViT | 1e-6 | 1e-6 |
| Projector | 1e-5 | 1e-5 |
## Results
| Task | Benchmark | Metric | PID |
|---|---|---|---:|
| Detection | DIOR | F1@0.50 / mF1 | 82.24 / 65.91 |
| Detection | DOTAv2 | F1@0.50 / mF1 | 66.90 / 42.68 |
| Grounding | DIOR-RSVG | Acc@0.5 / mIoU | 78.99 / 70.59 |
| Grounding | VRSBench-VG | Acc@0.5 / mIoU | 76.25 / 65.11 |
| Pointing | DIOR / DOTAv2 | F1@Point | 85.31 / 68.28 |
| Pointing | DIOR-RSVG / VRSBench-VG | F1@Point | 83.64 / 86.53 |
Detection queries request the categories annotated in each image; a predicted
box counts only when both its location and its category are correct.
Under the same data, curriculum and trainable components, PID improves F1@0.50
over the direct-box LocateAnything-3B baseline by 8.3 points on DIOR and 7.3
points on DOTAv2, and reduces complete-response latency by 22.4% (0.990 s to
0.768 s per image) and 43.6% (3.930 s to 2.218 s), respectively. The efficiency
measurements use CUDA-synchronized timing on NVIDIA A100 PCIe 40 GB GPUs. On
DOTAv2 test images with little overlap with the training imagery, the accuracy
gain is smaller. Refer to the paper and project page for complete tables.
## Intended use
This model is intended for non-commercial research on:
- category-conditioned object detection in aerial and satellite images;
- referring-expression grounding and pointing in aerial images; and
- efficient generative localization with parallel box prediction.
Users are responsible for complying with the licenses and terms of the source
images and evaluation datasets.
## License
These weights are derived from LocateAnything-3B and are released under the
same [NVIDIA License](LICENSE), which permits use, reproduction and
modification for **academic and non-profit research purposes only**;
commercial use is not permitted. LocateAnything-3B is built on
[Qwen2.5-3B-Instruct](https://huggingface.co/Qwen/Qwen2.5-3B-Instruct) (Qwen
Research License) and [MoonViT-SO-400M](https://huggingface.co/moonshotai/MoonViT-SO-400M)
(MIT License). The PID code is Apache-2.0; the weights keep the license above.
## Limitations
PID relies on accurate point addresses; missing, repeated or ambiguous
addresses can lead to missed, duplicate or incorrect boxes, and overlapping
boxes can make object identification ambiguous in dense scenes. The model
predicts horizontal boxes and points, not oriented boxes. Address prediction is
still autoregressive, and the memory cost of the parallel box pass grows with
the number of objects. When all categories are requested, PID rejects absent
categories less reliably than a class-isolated direct-box model, and categories
unseen during training were not evaluated. Specialized detectors remain faster
in absolute time.
## Citation
```bibtex
@misc{patle2026pid,
title = {Parallel Instance Decoding for Language-Guided Localization in Aerial Images},
author = {Patle, Shubham and Zaheer, Muhammad Zaigham and Fiaz, Mustansar and Rasheed, Hanoona Abdul and Khan, Fahad Shahbaz and Khan, Salman},
year = {2026}
}
```
## Acknowledgements
This work builds on [LocateAnything](https://github.com/NVlabs/Eagle/tree/main/Embodied)
and the released LocateAnything-3B checkpoint. See the code repository for full
acknowledgements.