FelixKAI
/

UHR-BAT2 / README.md
FelixKAI's picture
Duplicate from RL-MIND/UHR-BAT2
94c9578
|
Raw History Blame Contribute Delete
7 kB
---
license: apache-2.0
language:
- en
- zh
library_name: transformers
pipeline_tag: image-text-to-text
base_model: Qwen/Qwen3-VL-8B-Instruct
base_model_relation: finetune
tags:
- qwen3_vl
- vision-language
- remote-sensing
- visual-question-answering
- geospatial
- uhr-bat2
model-index:
- name: UHR-BAT2
results:
- task:
type: visual-question-answering
dataset:
type: RSHR-Bench
name: RSHR-Bench (all 1932 QA records)
metrics:
- type: accuracy
name: Accuracy (%)
value: 50.72463768115942
- task:
type: visual-question-answering
dataset:
type: XLRS-Bench-lite
name: XLRS-Bench-lite (strict option-set matching)
metrics:
- type: accuracy
name: Accuracy (%)
value: 52.27272727272727
- task:
type: visual-question-answering
dataset:
type: MME-RealWorld
name: MME-RealWorld (full Remote Sensing subset)
metrics:
- type: accuracy
name: Accuracy (%)
value: 56.79507758159444
---
# UHR-BAT2
[English](README.md) | [简体中文](README_zh.md)
[Hugging Face](https://huggingface.co/RL-MIND/UHR-BAT2) · [ModelScope](https://www.modelscope.cn/models/KAIWANG/UHR-BAT2) · [Evaluation details](EVALUATION.md)
**A Qwen3-VL-8B model fine-tuned for remote-sensing visual question answering.**
UHR-BAT2 is a full-weight fine-tune of [Qwen3-VL-8B-Instruct](https://huggingface.co/Qwen/Qwen3-VL-8B-Instruct), trained on a selected 10,000-example GeoLLaVA manifest. It keeps the native Qwen3-VL architecture and can be loaded with Transformers. The released checkpoint is `qwen3vl-8b-geollava-ft3-selected-10k`.
## Main results
These are complete, unpruned model evaluations, audited against existing prediction records on **2026-10-13**. The reported results use the corrected option-scoring protocol.
| Dataset | Accuracy | Correct / Total | Metric |
|---|---:|---:|---|
| **RSHR-Bench** | **50.72%** | 980 / 1,932 | All-QA option accuracy |
| **XLRS-Bench-lite** | **52.27%** | 1,610 / 3,080 | Strict option-set accuracy |
| **MME-RealWorld Remote Sensing** | **56.80%** | 2,123 / 3,738 | Full remote-sensing subset accuracy |
RSHR's single-turn subset is **45.66% (726/1,590)**. XLRS includes **52.45% (1,563/2,980)** on single-choice questions and **47.00% (47/100)** on multi-select tasks. MME uses the full 3,738-record remote-sensing subset, not its 150-record Lite subset.
The evaluated image budget is `min_pixels=784`, `max_pixels=1,310,720` per image. Images are resized within this budget. Single-choice evaluation uses FP32 candidate-option logits; XLRS multi-select evaluation uses constrained decoding and exact option-set matching. Ordinary free generation is not the same scoring procedure. See [EVALUATION.md](EVALUATION.md) and [evaluation_results.json](evaluation_results.json) for categories, denominators and protocol details.
## Model and training
| Item | Value |
|---|---|
| Base model | Qwen/Qwen3-VL-8B-Instruct |
| Architecture | Qwen3VLForConditionalGeneration |
| Training data | GeoLLaVA, selected 10K examples |
| Fine-tuning | Frozen vision encoder; train merger and LLM |
| Checkpoint format | Full BF16 safetensors, 4 shards |
| Training completion | 1 epoch, 625 optimizer steps |
| Launch configuration | Adafactor; learning rate 1e-5; global batch 16; maximum sequence length 8,192 |
| Release scope | Dense checkpoint and inference example |
The checkpoint's trainer state confirms one completed epoch and 625 steps. Other training settings above are recorded launcher defaults. This is the final training checkpoint; no validation-selected best checkpoint was recorded. The original [UHR-BAT](https://huggingface.co/RL-MIND/UHR-BAT) uses a different architecture; its custom compression modules and results are not part of this Qwen3-VL weight release.
## Quick start
Use Python 3.10 or later and a CUDA-enabled PyTorch installation. A single image can be processed with the standard Qwen3-VL implementation; custom remote code is not required. GPU memory requirements depend on image size and output length.
```bash
pip install -r requirements.txt
python inference.py --model RL-MIND/UHR-BAT2 \
--image /path/to/remote_sensing_image.jpg \
--question "Describe the land use and visible objects in this image."
```
```python
import torch
from PIL import Image
from transformers import AutoProcessor, Qwen3VLForConditionalGeneration
model_id = "RL-MIND/UHR-BAT2"
processor = AutoProcessor.from_pretrained(model_id)
model = Qwen3VLForConditionalGeneration.from_pretrained(
model_id, dtype="auto", device_map="auto", attn_implementation="sdpa"
).eval()
image = Image.open("remote_sensing_image.jpg").convert("RGB")
messages = [{"role": "user", "content": [
{"type": "image"},
{"type": "text", "text": "Describe this remote-sensing image."},
]}]
prompt = processor.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True
)
inputs = processor(text=[prompt], images=[image], return_tensors="pt")
inputs.pop("token_type_ids", None)
inputs = inputs.to(model.device)
with torch.inference_mode():
output = model.generate(
**inputs, max_new_tokens=128, do_sample=False,
temperature=None, top_p=None, top_k=None, use_cache=True,
)
answer = output[:, inputs["input_ids"].shape[1]:]
print(processor.batch_decode(answer, skip_special_tokens=True)[0])
```
For ModelScope, download the same package and pass the local directory to the example above:
```bash
pip install modelscope
```
```python
from modelscope import snapshot_download
model_id = snapshot_download("KAIWANG/UHR-BAT2")
# Use model_id with AutoProcessor and Qwen3VLForConditionalGeneration above.
```
The example demonstrates image-conditioned generation. It does not reproduce the option-scoring evaluation table by itself.
The release passed a native loading and short image-generation smoke test with Python 3.11.0, PyTorch 2.5.1+cu121, Transformers 4.57.0.dev0 and Accelerate 1.13.0. The test checks package loading and generation, not benchmark accuracy or inference speed. File hashes and tensor metadata are in [release_manifest.json](release_manifest.json).
## Limitations
Counting and small-object localization remain challenging. These resized-input evaluations do not establish native full-resolution ultra-high-resolution performance. A matched evaluation of the unfine-tuned base model is not included, so this release makes no controlled fine-tuning improvement claim. A training-data audit found candidate scene-name/tile matches with RSHR; pixel-level and question-level overlap have not been resolved, so geographic-disjoint generalization is not established.
## License and acknowledgments
Released under [Apache-2.0](LICENSE), following the base model's license. See [NOTICE](NOTICE) for the upstream attribution and modifications. Training and benchmark datasets are not redistributed; their own terms apply. We acknowledge the Qwen team, GeoLLaVA contributors and the benchmark authors.