Image Segmentation
Transformers
Safetensors
mlrs
feature-extraction
remote-sensing
reasoning-segmentation
earth-observation
custom_code
Instructions to use INSAIT-Institute/MLRS with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use INSAIT-Institute/MLRS with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-segmentation", model="INSAIT-Institute/MLRS", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("INSAIT-Institute/MLRS", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -9,29 +9,32 @@ tags:
|
|
| 9 |
- reasoning-segmentation
|
| 10 |
- earth-observation
|
| 11 |
- custom_code
|
| 12 |
-
license: other # TODO:
|
| 13 |
---
|
| 14 |
|
| 15 |
# MLRS
|
| 16 |
|
| 17 |
-
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
| 21 |
answers in text or calls a segmentation tool:
|
| 22 |
|
| 23 |
```
|
| 24 |
<think>...</think><segmentation>{"noun phrase": "...", "objects": [{"bbox": [x1, y1, x2, y2]}]}</segmentation>
|
| 25 |
```
|
| 26 |
|
| 27 |
-
Each noun phrase
|
| 28 |
-
jointly. SAM3 returns one mask per phrase, clipped to the predicted boxes. Text-only tasks
|
| 29 |
answer with `<answer>...</answer>` and return no masks.
|
| 30 |
|
| 31 |
This repository only holds the finetuned deltas (a LoRA adapter and SAM3 mask-decoder weights).
|
| 32 |
The base models are downloaded from the Hub at the revisions pinned in `config.json`.
|
| 33 |
|
| 34 |
-
> `facebook/sam3` is gated. Accept its license on the Hub and log in (`hf auth login`) before loading.
|
| 35 |
|
| 36 |
## Usage
|
| 37 |
|
|
@@ -40,7 +43,7 @@ import torch
|
|
| 40 |
from PIL import Image
|
| 41 |
from transformers import AutoModel, AutoProcessor
|
| 42 |
|
| 43 |
-
repo = "
|
| 44 |
model = AutoModel.from_pretrained(repo, trust_remote_code=True, dtype=torch.bfloat16, device_map="cuda")
|
| 45 |
processor = AutoProcessor.from_pretrained(repo, trust_remote_code=True)
|
| 46 |
|
|
@@ -76,10 +79,18 @@ back to the size of the input image.
|
|
| 76 |
|
| 77 |
- The defaults reproduce the evaluation setup: greedy decoding, `max_new_tokens=1024`, and the
|
| 78 |
LoRA adapter kept unmerged. `AutoModel.from_pretrained(..., merge_lora=True)` generates faster, with small numerical differences.
|
| 79 |
-
- Tested with `transformers==
|
| 80 |
|
| 81 |
## Citation
|
| 82 |
|
| 83 |
```bibtex
|
| 84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
```
|
|
|
|
| 9 |
- reasoning-segmentation
|
| 10 |
- earth-observation
|
| 11 |
- custom_code
|
| 12 |
+
license: other # TODO: SAM License on sam3_delta.safetensors, Apache-2.0 on the rest, some training datasets might be research use only
|
| 13 |
---
|
| 14 |
|
| 15 |
# MLRS
|
| 16 |
|
| 17 |
+
**More with Less: a Large Scale Remote Sensing VLM with a Simple Recipe**
|
| 18 |
|
| 19 |
+
Accepted to **ACCV 2026**. 📄 Paper: https://arxiv.org/abs/2607.15942
|
| 20 |
+
|
| 21 |
+
MLRS is a remote-sensing vision-language model that answers questions and performs reasoning segmentation.
|
| 22 |
+
MLRS supports wide range of inputs: ultra-high-res, SAR, thermal, false-color, multi-temporal, multi-view, visual prompting, multi-image.
|
| 23 |
+
A LoRA-finetuned **InternVL3.5-8B** reasons about the image (or multiple images in rgb format) and either
|
| 24 |
answers in text or calls a segmentation tool:
|
| 25 |
|
| 26 |
```
|
| 27 |
<think>...</think><segmentation>{"noun phrase": "...", "objects": [{"bbox": [x1, y1, x2, y2]}]}</segmentation>
|
| 28 |
```
|
| 29 |
|
| 30 |
+
Each noun phrase, its boxes (on a 0–999 grid), and the last rgb image are passed to **SAM3**, whose mask decoder was finetuned
|
| 31 |
+
jointly via GRTO. SAM3 returns one mask per phrase, clipped to the predicted boxes. Text-only tasks
|
| 32 |
answer with `<answer>...</answer>` and return no masks.
|
| 33 |
|
| 34 |
This repository only holds the finetuned deltas (a LoRA adapter and SAM3 mask-decoder weights).
|
| 35 |
The base models are downloaded from the Hub at the revisions pinned in `config.json`.
|
| 36 |
|
| 37 |
+
> `facebook/sam3` is gated. Accept its license on the Hub and log in (`hf auth login` or set `HF_TOKEN` env.variable) before loading.
|
| 38 |
|
| 39 |
## Usage
|
| 40 |
|
|
|
|
| 43 |
from PIL import Image
|
| 44 |
from transformers import AutoModel, AutoProcessor
|
| 45 |
|
| 46 |
+
repo = "INSAIT-Institute/MLRS"
|
| 47 |
model = AutoModel.from_pretrained(repo, trust_remote_code=True, dtype=torch.bfloat16, device_map="cuda")
|
| 48 |
processor = AutoProcessor.from_pretrained(repo, trust_remote_code=True)
|
| 49 |
|
|
|
|
| 79 |
|
| 80 |
- The defaults reproduce the evaluation setup: greedy decoding, `max_new_tokens=1024`, and the
|
| 81 |
LoRA adapter kept unmerged. `AutoModel.from_pretrained(..., merge_lora=True)` generates faster, with small numerical differences.
|
| 82 |
+
- Tested with `transformers==5.18.0`, `peft==0.18.0`, `torch==2.9.0`.
|
| 83 |
|
| 84 |
## Citation
|
| 85 |
|
| 86 |
```bibtex
|
| 87 |
+
@misc{ailuro2026mlrs,
|
| 88 |
+
title={{More with Less}: a Large Scale Remote Sensing {VLM} with a Simple Recipe},
|
| 89 |
+
author={Stefan Maria Ailuro and Mario Markov and Mohammad Mahdi and Luc Van Gool and Danda Pani Paudel},
|
| 90 |
+
year={2026},
|
| 91 |
+
eprint={2607.15942},
|
| 92 |
+
archivePrefix={arXiv},
|
| 93 |
+
primaryClass={cs.CV},
|
| 94 |
+
url={https://arxiv.org/abs/2607.15942},
|
| 95 |
+
}
|
| 96 |
```
|