zhshj0110 commited on
Commit
ab1bade
·
verified ·
1 Parent(s): 1f711c6

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. README.md +152 -0
  2. test.parquet +3 -0
README.md CHANGED
@@ -1,3 +1,155 @@
1
  ---
 
 
 
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ pretty_name: LensBench
3
+ language:
4
+ - en
5
  license: apache-2.0
6
+ task_categories:
7
+ - image-segmentation
8
+ tags:
9
+ - image
10
+ - text
11
+ - referring-expression-segmentation
12
+ - visual-grounding
13
+ - benchmark
14
+ size_categories:
15
+ - 1K<n<10K
16
+ configs:
17
+ - config_name: default
18
+ data_files:
19
+ - split: test
20
+ path: test.parquet
21
  ---
22
+
23
+ # LensBench
24
+
25
+ LensBench is a segmentation benchmark for explicit and implicit instructions across general, aerial, driving, and panoramic images. It contains **1,200 human-reviewed paired evaluation units and 4,800 instruction-level samples**.
26
+
27
+ [Paper](https://arxiv.org/abs/2610.23279) · [Project page](https://seerray-lab.github.io/Xiaomi-Lens-0/) · [Code](https://github.com/SeerRay-Lab/Xiaomi-Lens-0) · [Model](https://huggingface.co/SeerRay-Lab/Xiaomi-Lens-0)
28
+
29
+ ## Dataset design
30
+
31
+ Each evaluation unit has four instructions crossing single/multiple targets with explicit/implicit wording. For a given target-cardinality condition, both wordings share the same target mask. Multiple targets are represented by their union mask. Targets and masks are fixed before instruction synthesis, followed by automated consistency checks and human review of each complete unit.
32
+
33
+ | Domain | Paired units | Explicit / single | Explicit / multiple | Implicit / single | Implicit / multiple | Total samples |
34
+ | --- | ---: | ---: | ---: | ---: | ---: | ---: |
35
+ | General | 300 | 300 | 300 | 300 | 300 | 1,200 |
36
+ | Aerial | 300 | 300 | 300 | 300 | 300 | 1,200 |
37
+ | Driving | 300 | 300 | 300 | 300 | 300 | 1,200 |
38
+ | Panoramic | 300 | 300 | 300 | 300 | 300 | 1,200 |
39
+ | **Total** | **1,200** | **1,200** | **1,200** | **1,200** | **1,200** | **4,800** |
40
+
41
+ The release provides a single `test` split for evaluation.
42
+
43
+ ## Files and fields
44
+
45
+ ```text
46
+ LensBench/
47
+ ├── README.md
48
+ └── test.parquet
49
+ ```
50
+
51
+ Images are embedded in the Parquet file; no separate image download is needed.
52
+
53
+ | Field | Type | Description |
54
+ | --- | --- | --- |
55
+ | `index` | int64 | Unique instruction-level sample index; not a paired-unit identifier. |
56
+ | `image` | Hugging Face Image | Embedded image bytes and original filename; decoded to a PIL image by `datasets`. |
57
+ | `instruction` | string | English instruction describing the segmentation target. |
58
+ | `segmentation` | struct | COCO compressed RLE with `size` and `counts`. |
59
+ | `segmentation.size` | list of int32 | Mask dimensions in `[height, width]` order. |
60
+ | `segmentation.counts` | string | Compressed COCO RLE counts; encode as ASCII bytes before decoding with `pycocotools`. |
61
+ | `domain` | string | `general`, `aerial`, `driving`, or `panoramic`. |
62
+ | `explicitness` | string | `explicit` or `implicit`. |
63
+ | `cardinality` | string | `single` or `multiple`. |
64
+
65
+ The release does not contain a bounding-box field. When a box is needed, derive it from the target mask; for multiple targets, use the enclosing box of the union mask.
66
+
67
+ ## Quick start
68
+
69
+ Install the loading and mask-decoding dependencies:
70
+
71
+ ```bash
72
+ pip install datasets pillow pycocotools huggingface_hub
73
+ ```
74
+
75
+ Load the dataset and decode the first target mask:
76
+
77
+ ```python
78
+ from datasets import load_dataset
79
+ from pycocotools import mask as mask_utils
80
+
81
+
82
+ dataset = load_dataset("SeerRay-Lab/LensBench", split="test")
83
+ sample = dataset[0]
84
+ image = sample["image"]
85
+ rle = {
86
+ "size": sample["segmentation"]["size"],
87
+ "counts": sample["segmentation"]["counts"].encode("ascii"),
88
+ }
89
+ mask = mask_utils.decode(rle)
90
+
91
+ assert mask.shape == (image.height, image.width)
92
+ print(sample["instruction"])
93
+ print(sample["domain"], sample["explicitness"], sample["cardinality"])
94
+ print(image.size, mask.shape)
95
+ ```
96
+
97
+ To download the release and load it locally:
98
+
99
+ ```bash
100
+ hf download SeerRay-Lab/LensBench --repo-type dataset --local-dir LensBench
101
+ ```
102
+
103
+ ```python
104
+ from datasets import load_dataset
105
+
106
+
107
+ dataset = load_dataset(
108
+ "parquet", data_files={"test": "LensBench/test.parquet"}, split="test"
109
+ )
110
+ implicit_samples = dataset.filter(lambda sample: sample["explicitness"] == "implicit")
111
+ ```
112
+
113
+ ## Evaluation
114
+
115
+ Results below are reproduced from Table 7 in Section 4.3 of the [Xiaomi-Lens-0 Technical Report (arXiv v1)](https://arxiv.org/html/2610.23279v1#S4.T7). The report evaluates all listed models with the same instructions, with each model predicting masks directly.
116
+
117
+ Marginal results pool single and multiple targets. Each cell reports **mask cIoU / box Prec@0.5** (%, higher is better). Prec@0.5 uses a box IoU threshold of 0.5. Multiple targets use the union mask and its enclosing box. Bold marks the best score, and underlining marks the second-best score for each metric and column, including ties.
118
+
119
+ | Method | Explicit | Implicit | General | Aerial | Driving | Panoramic |
120
+ |:--| :-: | :-: | :-: | :-: | :-: | :-: |
121
+ | GPT-5.6-Sol | 63.8 / 73.2 | <u>61.2</u> / <u>70.0</u> | <u>68.4</u> / 67.9 | 42.2 / 58.5 | <u>68.4</u> / **81.8** | 57.1 / <u>78.3</u> |
122
+ | Gemini-3.6-Flash | 61.4 / <u>74.5</u> | 61.0 / **70.3** | 63.6 / 65.8 | <u>50.1</u> / <u>62.5</u> | 66.8 / <u>81.0</u> | <u>60.8</u> / **80.3** |
123
+ | MiMo-V2.5 | 51.4 / 52.2 | 47.4 / 46.8 | 54.2 / 45.2 | 32.6 / 38.6 | 50.5 / 52.8 | 45.4 / 61.4 |
124
+ | Seed-2.1-Pro | 62.1 / 70.2 | 55.9 / 64.5 | 60.6 / 56.7 | <u>50.1</u> / 58.5 | 66.8 / 77.4 | 59.9 / 76.7 |
125
+ | Qwen3.8-Max | <u>67.6</u> / 69.2 | **64.5** / 63.8 | **74.2** / **79.7** | 33.5 / <u>62.5</u> | 58.0 / 57.7 | <u>60.8</u> / 66.2 |
126
+ | Kimi-K3 | 29.4 / 39.1 | 28.3 / 33.0 | 38.5 / 26.1 | 13.8 / 44.9 | 47.2 / 31.1 | 13.4 / 42.1 |
127
+ | GLM-5.3-Flash | 44.3 / 37.5 | 43.5 / 33.3 | 48.9 / 26.3 | 28.0 / 33.4 | 51.6 / 47.5 | 30.6 / 34.4 |
128
+ | DeepSeek-V4-Flash-Vision-Exp | 41.8 / 30.7 | 41.1 / 27.3 | 46.1 / 28.1 | 25.9 / 28.9 | 43.9 / 27.9 | 32.8 / 31.0 |
129
+ | SAM 3 | 17.3 / 38.1 | 15.4 / 19.5 | 23.8 / 24.8 | 4.3 / 27.3 | 27.7 / 35.1 | 11.1 / 27.9 |
130
+ | **Xiaomi-Lens-0<sub>4B</sub>** | **71.4** / **85.0** | 54.7 / <u>70.0</u> | 63.9 / <u>79.1</u> | **57.1** / **79.6** | **68.6** / 79.4 | **62.3** / 72.1 |
131
+
132
+ See the [paper](https://arxiv.org/abs/2610.23279) and [project results](https://seerray-lab.github.io/Xiaomi-Lens-0/#data) for the evaluation protocol and comparisons. Preserve the domain, explicitness, and cardinality labels when reporting subgroup results.
133
+
134
+ ## License
135
+
136
+ The images and annotations in this release are licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).
137
+
138
+ ## Citation
139
+
140
+ If you use LensBench, please cite:
141
+
142
+ ```bibtex
143
+ @misc{xiaomilens0,
144
+ title = {Xiaomi-Lens-0 Technical Report},
145
+ author = {Pei Fu and Yike Liu and Yue Sun and Hanmo Wang and
146
+ Xiuwen Xi and Ruoceng Zhang and Shaojie Zhang and
147
+ Chao Jiang and Hang Li and Bingrui Liu and Zhenbo Luo and
148
+ Heng Qu and Changjian Xu and Ming Xu and Jian Luan},
149
+ year = {2026},
150
+ eprint = {2610.23279},
151
+ archivePrefix = {arXiv},
152
+ primaryClass = {cs.CV},
153
+ url = {https://arxiv.org/abs/2610.23279}
154
+ }
155
+ ```
test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ba4bb11ef8084fc4a8aed020f9f3e15c4c2eab2913c60673667d0bf0c423e615
3
+ size 2729412519