The dataset viewer is not available for this dataset.
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
ReGuLaR Data
This repository contains the ReGuLaR training mix with images, question-answer pairs, bounding boxes, and relation annotations. Metadata is provided as parquet shards; images are provided as compressed source-specific archives to keep the repository uploadable.
Files
data/train-xxxxx-of-yyyyy.parquet
image_archives/*.tar.zst
records.jsonl
manifest.json
stats.json
extract_images.sh
The parquet schema contains:
id,source,datasetimage: primary image path, relative to the dataset root after extractionimages: all image paths for the sample; mGrounding samples may contain multiple imagesquestion,answerrelations_json: subject-relation-object annotations serialized as JSONscene_graph_json: compact scene graph or relation evidence serialized as JSONmetadata_json: source-specific metadata serialized as JSON
Download And Extract Images
from huggingface_hub import snapshot_download
snapshot_download("zihuwang/ReGuLaR", repo_type="dataset", local_dir="regular_data")
Then extract the image archives from the dataset root:
cd regular_data
bash extract_images.sh
Equivalently, you can extract archives manually:
for f in image_archives/*.tar.zst; do tar --zstd -xf "$f"; done
This creates the images/ directory expected by the metadata paths:
images/gqa/...
images/openimage/...
images/clevr/...
images/visual_genome/...
images/psg/...
images/mgrounding/...
images/vsr/...
Usage
import json
from pathlib import Path
from PIL import Image
from datasets import load_dataset
root = Path("regular_data")
ds = load_dataset("parquet", data_files=str(root / "data/*.parquet"), split="train")
ex = ds[0]
image = Image.open(root / ex["image"]).convert("RGB")
all_images = [Image.open(root / p).convert("RGB") for p in ex["images"]]
relations = json.loads(ex["relations_json"])
scene_graph = json.loads(ex["scene_graph_json"])
metadata = json.loads(ex["metadata_json"])
Each relation follows a subject-relation-object format. Subject and object entries
include names and bounding boxes when available. Bounding boxes use bbox_xyxy.
Notes
The dataset combines examples derived from GQA, OpenImage, CLEVR, Visual Genome, PSG, mGrounding, and VSR. Please follow the licenses and terms of the original data sources.
- Downloads last month
- 172