File size: 5,338 Bytes
95a906d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
---
language:
- en
task_categories:
- image-text-to-text
license: other
license_name: idea-license-1.0
license_link: https://huggingface.co/datasets/IDEA-Research/HumanRef-CoT-45k/blob/9e1afd27358d774f626a78992c7b716fa403da54/LICENSE
size_categories:
- 10K<n<100K
tags:
- visual-grounding
- referring-expression-comprehension
- bounding-boxes
- tsv
---

# Grounding training data — raw TSV bundle

This repository currently contains **HumanRef training data only**, repackaged
into the indexed TSV storage layout used by
[Rex-Omni-Finetune-ToyData](https://huggingface.co/datasets/Mountchicken/Rex-Omni-Finetune-ToyData).
It is a derived storage export, not an official HumanRef release.

| Dataset | Split | Query rows | Positive | Rejection |
| --- | --- | ---: | ---: | ---: |
| HumanRef | train | 45,408 | 37,057 | 8,351 |

There are 86,937 selected target boxes. Images are stored as 45,408 source records;
repeated images are retained. A prior decoded-image audit found 14,723 unique
RGB images. This release contains no validation or test split.

## Download and load

Download repository files with `huggingface_hub.snapshot_download` or the Hub CLI,
then use the included plain Python reader. This is an indexed TSV bundle, not a
Parquet dataset or a Hugging Face `datasets.load_dataset` loading script.

```bash
pip install huggingface_hub 'Pillow>=10,<13'
```

```python
import sys
from huggingface_hub import snapshot_download

root = snapshot_download(
    repo_id="huuthientran/HumanRef",
    repo_type="dataset",
    allow_patterns=["humanref/*", "loader.py", "requirements.txt", "benchmarks.json"],
)
sys.path.insert(0, root)
from loader import RawTSVDataset

data = RawTSVDataset(f"{root}/humanref")
raw = data[0]                     # original image_bytes + annotation dictionary
sample = data.decode(raw)         # RGB image; no EXIF auto-rotation
boxes = sample["annotation"]["boxes"]
positive = RawTSVDataset(f"{root}/humanref", positive_only=True)
```

The loader requires only Pillow. Pin `revision` in `snapshot_download` to a
repository commit for reproducible experiments. Data files total about 11 GiB.

## Files and format

```text
README.md
loader.py
requirements.txt
benchmarks.json
humanref/
  train.images.tsv
  train.images.tsv.lineidx
  train.annotations.tsv
  train.annotations.tsv.lineidx
  train.positive.annotations.tsv.lineidx
  images.jsonl
  manifest.json
  validation.json
  SOURCE_LICENSE
```

Image rows are `image_byte_offset<TAB>base64_original_image_bytes`.
Annotation rows are `image_byte_offset<TAB>annotation_JSON`.
Each `.lineidx` stores byte offsets, not row numbers. The positive index selects
positive annotation rows without rewriting the base data. `images.jsonl` records
image checksums and dimensions; `manifest.json` records file checksums and source
provenance. `validation.json` reports validation performed before publication.

For positive queries, `boxes` contains selected targets:

```json
{"bbox": [10, 20, 100, 200], "phrase": "the person on the left"}
```

For rejection queries, it contains a null box:

```json
{"bbox": null, "phrase": "an unmatched description"}
```

Boxes are **absolute pixel xyxy**. Source `region_map` indices select candidates
from original pixel-xywh `gt_boxes`; only selected candidates become targets.
Every query retains the complete original `source_annotation`, including candidate
boxes, region mapping, and source reasoning text, together with source subset and
offset provenance. Source reasoning is provenance, not an inference prompt or a
direct-box answer. Separate copies of the original annotation TSVs are omitted
because their annotations are already embedded in every exported query.

Image bytes and original annotations are preserved. No resizing, re-encoding,
EXIF transpose, clipping, normalization, quantization, filtering, or deduplication
is applied. Qwen pixel/normalized formatting and Rex coordinate-token formatting
belong in the experiment's runtime adapter. For a compatible grounding reader,
configure the box format as `xyxy`.

## Scope and quality

All image-byte checksums, file checksums, byte offsets, selected-target mappings,
and positive/rejection counts passed validation. Loader samples were decoded;
full exports were checked by image checksums and headers, not a second exhaustive
raster decode.

This is raw training storage. Known duplicate queries, conflicting targets, and
boxes extending beyond image boundaries remain unchanged. Select a training
policy explicitly; do not silently clip or treat candidate boxes as targets.
The manifest's `ready_for_training: false` indicates that experiment-specific
selection and model formatting are still required, not a failed storage check.

## Source and license

Source: [IDEA-Research/HumanRef-CoT-45k](https://huggingface.co/datasets/IDEA-Research/HumanRef-CoT-45k),
revision `9e1afd27358d774f626a78992c7b716fa403da54`.
Both `humanref_cot` and `humanref_cot_rejection` are included in source order.
The four source TSV checksums matched the audited source revision.

The upstream [IDEA License 1.0](humanref/SOURCE_LICENSE) is included unchanged;
it grants use for non-commercial research and requires a separate license for
commercial use. Original attribution: "T  is licensed under the IDEA License 1.0,
Copyright (c) IDEA. All Rights Reserved."