Instructions to use yuchenwu73/GeoBox-R1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yuchenwu73/GeoBox-R1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="yuchenwu73/GeoBox-R1") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("yuchenwu73/GeoBox-R1") model = AutoModelForMultimodalLM.from_pretrained("yuchenwu73/GeoBox-R1", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use yuchenwu73/GeoBox-R1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yuchenwu73/GeoBox-R1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yuchenwu73/GeoBox-R1", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/yuchenwu73/GeoBox-R1
- SGLang
How to use yuchenwu73/GeoBox-R1 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "yuchenwu73/GeoBox-R1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yuchenwu73/GeoBox-R1", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "yuchenwu73/GeoBox-R1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yuchenwu73/GeoBox-R1", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use yuchenwu73/GeoBox-R1 with Docker Model Runner:
docker model run hf.co/yuchenwu73/GeoBox-R1
GeoBox-R1: Curriculum-Guided SFT and Geometric RL for Unified Box-Level Remote Sensing Visual Grounding
Chenxi Lan*, Yuchen Wu*, Minghang Zhou, Tianyu Li, Zhihao Qiu, Guoqing Wangâ€
*Equal contribution †Corresponding author
Under review at AAAI 2027
Project page · Code
Overview
GeoBox-R1 is a 4B vision-language model for unified remote-sensing visual grounding. Given an aerial or satellite image and a referring expression, the same model can produce either a horizontal bounding box (HBB) or an oriented bounding box (OBB).
The model starts from Qwen3-VL-4B-Instruct and is trained in two stages:
- Curriculum-guided SFT orders examples from HBB grounding to OBB grounding and then HBB-to-OBB chain-of-thought reasoning.
- Geometric RL (GDPO) improves geometric precision with rotated-IoU and adaptive Wasserstein rewards, without a learned reward model.
Results
Macro averages are shown below. Full comparisons, per-dataset results, and the evaluation protocol are available on the project page.
Among the evaluated baselines, GeoBox-R1 achieves the best macro averages while using 4B parameters. GDPO is trained only on OBB samples, but it also improves HBB performance over the SFT stage.
Usage
Install a recent Transformers release together with PyTorch, Pillow, and Accelerate, then run:
from PIL import Image
from transformers import AutoModelForImageTextToText, AutoProcessor
model_id = "yuchenwu73/GeoBox-R1"
model = AutoModelForImageTextToText.from_pretrained(
model_id,
dtype="auto",
device_map="auto",
)
processor = AutoProcessor.from_pretrained(model_id)
image = Image.open("scene.png").convert("RGB")
expression = "the brown SUV on the right"
prompt = f"""Locate the instance that matches the description: [{expression}]. Report oriented bbox coordinates in following JSON format:
```json
[
\t{{"oriented_bbox": [[x1, y1], [x2, y2], [x3, y3], [x4, y4]]}}
]
```"""
messages = [
{
"role": "user",
"content": [
{"type": "image"},
{"type": "text", "text": prompt},
],
}
]
text = processor.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
)
inputs = processor(text=[text], images=[image], return_tensors="pt").to(model.device)
generated = model.generate(**inputs, max_new_tokens=256)
generated = generated[:, inputs.input_ids.shape[1]:]
print(processor.batch_decode(generated, skip_special_tokens=True)[0])
For HBB grounding, replace the prompt with:
prompt = f"""Locate the instance that matches the description: [{expression}]. Report horizontal bbox coordinates in following JSON format:
```json
[
\t{{"horizontal_bbox": [x1, y1, x2, y2]}}
]
```"""
Coordinates are quantized to [0, 1000]. Multiply x coordinates by the image width divided by
1000, and y coordinates by the image height divided by 1000, to recover pixel coordinates.
The repository also provides evaluation scripts, an interactive demo, and the complete training pipeline: github.com/yuchenwu73/GeoBox-R1.
License
The model weights are released under the CC BY-NC 4.0 license. Users must also comply with the licenses and terms of the underlying Qwen3-VL model and any input datasets they use.
Citation
@misc{geoboxr1,
title = {GeoBox-R1: Curriculum-Guided SFT and Geometric RL for
Unified Box-Level Remote Sensing Visual Grounding},
author = {Lan, Chenxi and Wu, Yuchen and Zhou, Minghang and
Li, Tianyu and Qiu, Zhihao and Wang, Guoqing},
year = {2026},
url = {https://yuchenwu73.github.io/geobox-r1/},
note = {Preprint}
}
- Downloads last month
- 50