File size: 4,026 Bytes
b14b750 3354adf ba44f2b 3354adf ba44f2b 3354adf ba44f2b 3354adf ba44f2b 3354adf | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | ---
license: apache-2.0
---
# RSReasoner-Bench
RSReasoner-Bench is a diagnostic benchmark for evaluating geospatial reasoning segmentation across category expression, attribute nature, and same-category competition. It also serves as the held-out test set of RSReasoner. Each target has one aerial image, one segmentation mask, and 13 query conditions referring to the same target.
## Data scale
| Item | Count |
|---|---:|
| Split | `test` |
| Targets / images / masks | 5,800 each |
| Image format and resolution | RGB PNG, 448 × 448 pixels |
| Canonical queries | 23,200 |
| Controlled diagnostic queries | 52,200 |
| Total query-mask pairs | 75,400 |
| Text answers (EI and II) | 11,600 |
| Area / non-area targets | 2,800 / 3,000 |
| With / without same-category competitors | 2,784 / 3,016 |
## Query types
All 13 conditions contain 5,800 queries each and share the same target masks.
| Type | Description | JSONL field |
|---|---|---|
| EP | Explicit-perceptual | `ep_query` |
| IP | Implicit-perceptual | `ip_query` |
| EI | Explicit-inferential | `ei_query` |
| II | Implicit-inferential | `ii_query` |
| C | Category-only reference | `c_query` |
| Ctrl-EP | Controlled explicit-perceptual | `ctrl_ep_query` |
| Ctrl-EI | Controlled explicit-inferential | `ctrl_ei_query` |
| M-PI | Perceptual-first mixed attributes | `m_pi_query` |
| M-IP | Inferential-first mixed attributes | `m_ip_query` |
| EP-Imp | EP with an implicit category reference | `ep_implicit_query` |
| IP-Exp | IP with an explicit category reference | `ip_explicit_query` |
| EI-Imp | EI with an implicit category reference | `ei_implicit_query` |
| II-Exp | II with an explicit category reference | `ii_explicit_query` |
## Fields
Each line of `test/metadata.jsonl` describes one target. In addition to the query fields above, each record contains the following fields.
| Field | Type | Description |
|---|---|---|
| `id` | integer | Unique target identifier. |
| `patch_id` | integer | Source image-patch identifier. |
| `file_name` | string | Image path relative to `test/`, such as `images/000001.png`. |
| `type` | string | Target geometry: `area` or `non-area`. |
| `has_same_category_instance` | integer | `1` if another instance of the same category is present in the image; otherwise `0`. |
| `main_tag` | string | Normalized main OSM tag, expressed as `key=value`. |
| `full_tag` | object | Original OSM key-value dictionary; keys and values are strings. |
| `mask_rle` | object | COCO compressed RLE: `size` is `[height, width]`, and `counts` is a string. |
| `bbox` | array | Target bounding box in pixels: `[x, y, width, height]`. |
| `category_only_category` | string | Category phrase associated with category-only and controlled query construction. |
| `ei_answer` | string | Reference reasoning answer for the EI query. |
| `ii_answer` | string | Reference reasoning answer for the II query. |
## Reading a target
```text
RSReasoner-Bench/
├── README.md
└── test/
├── metadata.jsonl
└── images/
├── 000001.png
└── ...
```
The following example reads one JSONL record and loads its image, segmentation mask, and bounding box. Set `root` to your local dataset directory. Image and mask loading requires `Pillow` and `pycocotools`.
```python
import json
from pathlib import Path
from PIL import Image
from pycocotools import mask as mask_utils
root = Path("RSReasoner-Bench")
split = root / "test"
with (split / "metadata.jsonl").open(encoding="utf-8") as f:
sample = json.loads(next(f)) # For all records: for line in f: sample = json.loads(line)
with Image.open(split / sample["file_name"]) as src:
image = src.copy()
rle = sample["mask_rle"]
mask = mask_utils.decode({
"size": rle["size"],
"counts": rle["counts"].encode("ascii"),
}) # 1 = target, 0 = background
bbox = sample["bbox"] # [x, y, width, height] in pixels
print(sample["id"], sample["ei_query"])
print(image.size, mask.shape) # (448, 448), (448, 448)
print(bbox)
```
|