Upload 5 files
Browse files- .gitattributes +1 -0
- README.md +96 -0
- extract_images.sh +9 -0
- manifest.json +52 -0
- records.jsonl +3 -0
- stats.json +52 -0
.gitattributes
CHANGED
|
@@ -58,3 +58,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
records.jsonl filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pretty_name: ReGuLaR
|
| 3 |
+
task_categories:
|
| 4 |
+
- visual-question-answering
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 100K<n<1M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# ReGuLaR Data
|
| 12 |
+
|
| 13 |
+
This repository contains the ReGuLaR training mix with images, question-answer pairs,
|
| 14 |
+
bounding boxes, and relation annotations. Metadata is provided as parquet shards; images
|
| 15 |
+
are provided as compressed source-specific archives to keep the repository uploadable.
|
| 16 |
+
|
| 17 |
+
## Files
|
| 18 |
+
|
| 19 |
+
```text
|
| 20 |
+
data/train-xxxxx-of-yyyyy.parquet
|
| 21 |
+
image_archives/*.tar.zst
|
| 22 |
+
records.jsonl
|
| 23 |
+
manifest.json
|
| 24 |
+
stats.json
|
| 25 |
+
extract_images.sh
|
| 26 |
+
```
|
| 27 |
+
|
| 28 |
+
The parquet schema contains:
|
| 29 |
+
|
| 30 |
+
- `id`, `source`, `dataset`
|
| 31 |
+
- `image`: primary image path, relative to the dataset root after extraction
|
| 32 |
+
- `images`: all image paths for the sample; mGrounding samples may contain multiple images
|
| 33 |
+
- `question`, `answer`
|
| 34 |
+
- `relations_json`: subject-relation-object annotations serialized as JSON
|
| 35 |
+
- `scene_graph_json`: compact scene graph or relation evidence serialized as JSON
|
| 36 |
+
- `metadata_json`: source-specific metadata serialized as JSON
|
| 37 |
+
|
| 38 |
+
## Download And Extract Images
|
| 39 |
+
|
| 40 |
+
```bash
|
| 41 |
+
from huggingface_hub import snapshot_download
|
| 42 |
+
snapshot_download("zihuwang/ReGuLaR", repo_type="dataset", local_dir="regular_data")
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
Then extract the image archives from the dataset root:
|
| 46 |
+
|
| 47 |
+
```bash
|
| 48 |
+
cd regular_data
|
| 49 |
+
bash extract_images.sh
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
Equivalently, you can extract archives manually:
|
| 53 |
+
|
| 54 |
+
```bash
|
| 55 |
+
for f in image_archives/*.tar.zst; do tar --zstd -xf "$f"; done
|
| 56 |
+
```
|
| 57 |
+
|
| 58 |
+
This creates the `images/` directory expected by the metadata paths:
|
| 59 |
+
|
| 60 |
+
```text
|
| 61 |
+
images/gqa/...
|
| 62 |
+
images/openimage/...
|
| 63 |
+
images/clevr/...
|
| 64 |
+
images/visual_genome/...
|
| 65 |
+
images/psg/...
|
| 66 |
+
images/mgrounding/...
|
| 67 |
+
images/vsr/...
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
## Usage
|
| 71 |
+
|
| 72 |
+
```python
|
| 73 |
+
import json
|
| 74 |
+
from pathlib import Path
|
| 75 |
+
from PIL import Image
|
| 76 |
+
from datasets import load_dataset
|
| 77 |
+
|
| 78 |
+
root = Path("regular_data")
|
| 79 |
+
ds = load_dataset("parquet", data_files=str(root / "data/*.parquet"), split="train")
|
| 80 |
+
|
| 81 |
+
ex = ds[0]
|
| 82 |
+
image = Image.open(root / ex["image"]).convert("RGB")
|
| 83 |
+
all_images = [Image.open(root / p).convert("RGB") for p in ex["images"]]
|
| 84 |
+
|
| 85 |
+
relations = json.loads(ex["relations_json"])
|
| 86 |
+
scene_graph = json.loads(ex["scene_graph_json"])
|
| 87 |
+
metadata = json.loads(ex["metadata_json"])
|
| 88 |
+
```
|
| 89 |
+
|
| 90 |
+
Each relation follows a subject-relation-object format. Subject and object entries
|
| 91 |
+
include names and bounding boxes when available. Bounding boxes use `bbox_xyxy`.
|
| 92 |
+
|
| 93 |
+
## Notes
|
| 94 |
+
|
| 95 |
+
The dataset combines examples derived from GQA, OpenImage, CLEVR, Visual Genome, PSG,
|
| 96 |
+
mGrounding, and VSR. Please follow the licenses and terms of the original data sources.
|
extract_images.sh
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
|
| 4 |
+
cd "$(dirname "$0")"
|
| 5 |
+
for archive in image_archives/*.tar.zst; do
|
| 6 |
+
[ -e "$archive" ] || continue
|
| 7 |
+
echo "Extracting $archive"
|
| 8 |
+
tar --zstd -xf "$archive"
|
| 9 |
+
done
|
manifest.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"description": "Clean public ReGuLaR training mix.",
|
| 3 |
+
"records": "records.jsonl",
|
| 4 |
+
"counts_by_source": {
|
| 5 |
+
"gqa": 245000,
|
| 6 |
+
"openimage": 50000,
|
| 7 |
+
"visual_genome": 15000,
|
| 8 |
+
"psg": 6000,
|
| 9 |
+
"vsr": 5000,
|
| 10 |
+
"mgrounding": 5000,
|
| 11 |
+
"clevr": 25000
|
| 12 |
+
},
|
| 13 |
+
"counts_by_dataset": {
|
| 14 |
+
"gqa": 240000,
|
| 15 |
+
"openimages_v7": 50000,
|
| 16 |
+
"blink_proxy_vg_spatial": 10000,
|
| 17 |
+
"blink_proxy_psg_false": 5000,
|
| 18 |
+
"blink_proxy_gqa_absence": 5000,
|
| 19 |
+
"blink_proxy_vsr_true": 5000,
|
| 20 |
+
"mgrounding_630k": 5000,
|
| 21 |
+
"blink_proxy_vg_counting": 5000,
|
| 22 |
+
"blink_proxy_psg_absent_relation_false": 1000,
|
| 23 |
+
"clevr_v1_referring_relationships": 25000
|
| 24 |
+
},
|
| 25 |
+
"skipped_legacy_datasets": {
|
| 26 |
+
"blink_proxy_sunrgbd_depth": 4000,
|
| 27 |
+
"blink_proxy_gqa_psg_relation_flip_false": 9109,
|
| 28 |
+
"blink_proxy_manual_not_facing_false": 401,
|
| 29 |
+
"blink_proxy_jigsaw": 4000,
|
| 30 |
+
"blink_proxy_gqa_touching": 336,
|
| 31 |
+
"blink_proxy_gqa_touching_synth": 25,
|
| 32 |
+
"blink_proxy_vg_touching": 139
|
| 33 |
+
},
|
| 34 |
+
"expected_counts_by_source": {
|
| 35 |
+
"gqa": 245000,
|
| 36 |
+
"openimage": 50000,
|
| 37 |
+
"clevr": 25000,
|
| 38 |
+
"visual_genome": 15000,
|
| 39 |
+
"psg": 6000,
|
| 40 |
+
"mgrounding": 5000,
|
| 41 |
+
"vsr": 5000
|
| 42 |
+
},
|
| 43 |
+
"stats": {
|
| 44 |
+
"total_records": 351000,
|
| 45 |
+
"unique_public_images": 140161,
|
| 46 |
+
"copy_images": true
|
| 47 |
+
},
|
| 48 |
+
"parquet": {
|
| 49 |
+
"total_records": 351000,
|
| 50 |
+
"total_shards": 15
|
| 51 |
+
}
|
| 52 |
+
}
|
records.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:175e2752dd62ecd4b9ced4aeb8731015a9bee69ea0d7d0a5ae12aa2a5c59e819
|
| 3 |
+
size 3232086798
|
stats.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"description": "Clean public ReGuLaR training mix.",
|
| 3 |
+
"records": "records.jsonl",
|
| 4 |
+
"counts_by_source": {
|
| 5 |
+
"gqa": 245000,
|
| 6 |
+
"openimage": 50000,
|
| 7 |
+
"visual_genome": 15000,
|
| 8 |
+
"psg": 6000,
|
| 9 |
+
"vsr": 5000,
|
| 10 |
+
"mgrounding": 5000,
|
| 11 |
+
"clevr": 25000
|
| 12 |
+
},
|
| 13 |
+
"counts_by_dataset": {
|
| 14 |
+
"gqa": 240000,
|
| 15 |
+
"openimages_v7": 50000,
|
| 16 |
+
"blink_proxy_vg_spatial": 10000,
|
| 17 |
+
"blink_proxy_psg_false": 5000,
|
| 18 |
+
"blink_proxy_gqa_absence": 5000,
|
| 19 |
+
"blink_proxy_vsr_true": 5000,
|
| 20 |
+
"mgrounding_630k": 5000,
|
| 21 |
+
"blink_proxy_vg_counting": 5000,
|
| 22 |
+
"blink_proxy_psg_absent_relation_false": 1000,
|
| 23 |
+
"clevr_v1_referring_relationships": 25000
|
| 24 |
+
},
|
| 25 |
+
"skipped_legacy_datasets": {
|
| 26 |
+
"blink_proxy_sunrgbd_depth": 4000,
|
| 27 |
+
"blink_proxy_gqa_psg_relation_flip_false": 9109,
|
| 28 |
+
"blink_proxy_manual_not_facing_false": 401,
|
| 29 |
+
"blink_proxy_jigsaw": 4000,
|
| 30 |
+
"blink_proxy_gqa_touching": 336,
|
| 31 |
+
"blink_proxy_gqa_touching_synth": 25,
|
| 32 |
+
"blink_proxy_vg_touching": 139
|
| 33 |
+
},
|
| 34 |
+
"expected_counts_by_source": {
|
| 35 |
+
"gqa": 245000,
|
| 36 |
+
"openimage": 50000,
|
| 37 |
+
"clevr": 25000,
|
| 38 |
+
"visual_genome": 15000,
|
| 39 |
+
"psg": 6000,
|
| 40 |
+
"mgrounding": 5000,
|
| 41 |
+
"vsr": 5000
|
| 42 |
+
},
|
| 43 |
+
"stats": {
|
| 44 |
+
"total_records": 351000,
|
| 45 |
+
"unique_public_images": 140161,
|
| 46 |
+
"copy_images": true
|
| 47 |
+
},
|
| 48 |
+
"parquet": {
|
| 49 |
+
"total_records": 351000,
|
| 50 |
+
"total_shards": 15
|
| 51 |
+
}
|
| 52 |
+
}
|