Datasets:
Tasks:
Visual Question Answering
Modalities:
Image
Formats:
imagefolder
Languages:
English
Size:
< 1K
License:
|
Download README.md from maujim/CLEVR_sample_500: direct link, hf CLI and curl.
- Browser
- Download file 5.94 kB
-
https://huggingface.co/datasets/maujim/CLEVR_sample_500/resolve/main/README.md
- Command line
-
hf download hf://datasets/maujim/CLEVR_sample_500/README.md
-
curl -L -o README.md https://huggingface.co/datasets/maujim/CLEVR_sample_500/resolve/main/README.md
5.94 kB
| license: cc-by-4.0 | |
| task_categories: | |
| - visual-question-answering | |
| language: | |
| - en | |
| tags: | |
| - clevr | |
| - compositional-reasoning | |
| - synthetic | |
| - scene-graphs | |
| size_categories: | |
| - n<1K | |
| pretty_name: CLEVR Sample 500 | |
| # CLEVR Sample 500 | |
| A small, aligned subset of [CLEVR v1.0](https://cs.stanford.edu/people/jcjohns/clevr/) for fast end-to-end visual question answering experiments. It contains images and questions for training, validation, and test workflows, plus the scene graphs and labels released for the training and validation splits. | |
| This is a deterministic subset of CLEVR v1.0, not a new or official CLEVR release. | |
| ## Dataset summary | |
| | Split | Images | Questions | Scene graphs | Answers and programs | | |
| | --- | ---: | ---: | ---: | --- | | |
| | Train | 500 | 5,000 | 500 | Yes | | |
| | Validation | 107 | 1,070 | 107 | Yes | | |
| | Test | 107 | 1,070 | Not released | No | | |
| | **Total** | **714** | **7,140** | **607** | — | | |
| ## No-install viewer | |
| To browse the sample without installing anything, download or clone the **complete** dataset repository, then double-click `viewer.html`. The viewer lets you choose the train, validation, or test split; move to previous or next images; jump to an image index; choose a random image; search question text; show or hide answers; inspect functional programs and scene details; and turn on numbered object overlays when available. | |
| Keep `viewer.html` beside the repository's `images/` directory, including `images/train/`, `images/val/`, and `images/test/`. Opening `viewer.html` by itself, without these adjacent image folders and their PNG files, will not display images. | |
| The validation and test counts preserve the approximate image ratio of the full dataset: 70,000 training images to 15,000 validation images to 15,000 test images. Scaling that ratio from 500 training images gives 107 images for each evaluation split. | |
| ## Subset construction | |
| The sample uses a reproducible prefix selection based on the original `image_index`: | |
| - Train: indices `0` through `499` | |
| - Validation: indices `0` through `106` | |
| - Test: indices `0` through `106` | |
| Questions and scene graphs were filtered by the same indices. Original filenames, image indices, question indices, annotations, answers, and functional programs are unchanged; nothing is renumbered. | |
| ## Repository structure | |
| ```text | |
| . | |
| ├── viewer.html # No-install dataset viewer | |
| ├── images | |
| │ ├── train/ # 500 PNG files | |
| │ ├── val/ # 107 PNG files | |
| │ └── test/ # 107 PNG files | |
| ├── questions | |
| │ ├── CLEVR_train_questions.json | |
| │ ├── CLEVR_val_questions.json | |
| │ └── CLEVR_test_questions.json | |
| ├── scenes | |
| │ ├── CLEVR_train_scenes.json | |
| │ └── CLEVR_val_scenes.json | |
| ├── COPYRIGHT.txt | |
| ├── LICENSE.txt | |
| └── README.txt # Original CLEVR format documentation | |
| ``` | |
| ## Annotation format | |
| Each question file contains an `info` object and a `questions` array. Every question includes: | |
| - `split` | |
| - `image_index` | |
| - `image_filename` | |
| - `question` | |
| - `question_index` | |
| Training and validation questions additionally include `answer`, `program`, and `question_family_index`. As in the original release, test answers and functional programs are not provided. | |
| Training and validation scene files contain an `info` object and a `scenes` array. Each scene describes object attributes, 3D and pixel coordinates, camera-relative directions, and spatial relationships. The original CLEVR release does not provide test scene graphs. | |
| ## Loading the dataset | |
| Download a Hugging Face repository snapshot, then join annotations to images using `image_filename`: | |
| ```python | |
| import json | |
| from pathlib import Path | |
| from huggingface_hub import snapshot_download | |
| from PIL import Image | |
| root = Path( | |
| snapshot_download( | |
| repo_id="YOUR_NAMESPACE/CLEVR_sample_500", | |
| repo_type="dataset", | |
| ) | |
| ) | |
| with (root / "questions" / "CLEVR_train_questions.json").open() as file: | |
| questions = json.load(file)["questions"] | |
| example = questions[0] | |
| image = Image.open(root / "images" / "train" / example["image_filename"]) | |
| print(example["question"], example["answer"], image.size) | |
| ``` | |
| Use `CLEVR_val_questions.json` and `images/val` for validation. Test examples have questions but no ground-truth answers. | |
| ## Intended use and limitations | |
| This sample is intended for pipeline development, smoke tests, debugging, and fast iteration. It is too small for reproducing full-dataset CLEVR results or making reliable model comparisons. | |
| Because selection uses the first image indices rather than random or stratified sampling, the subset should not be assumed to preserve the full distribution of object combinations, question families, or answers. Results on this sample are not directly comparable with published results on the complete CLEVR benchmark. | |
| CLEVR is synthetic and measures specific forms of visual and compositional reasoning. It does not represent the visual or linguistic diversity of real-world applications. | |
| ## Source, license, and citation | |
| The files are derived from the official [CLEVR v1.0 dataset](https://dl.fbaipublicfiles.com/clevr/CLEVR_v1.0.zip). The dataset metadata and included license identify the license as [Creative Commons Attribution 4.0 International](https://creativecommons.org/licenses/by/4.0/). See `LICENSE.txt` and `COPYRIGHT.txt` for the bundled terms and attribution notice. | |
| If you use this subset, cite the original CLEVR paper: | |
| ```bibtex | |
| @inproceedings{johnson2017clevr, | |
| title={CLEVR: A Diagnostic Dataset for Compositional Language and Elementary Visual Reasoning}, | |
| author={Johnson, Justin and Hariharan, Bharath and van der Maaten, Laurens and Fei-Fei, Li and Zitnick, C. Lawrence and Girshick, Ross}, | |
| booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition}, | |
| year={2017} | |
| } | |
| ``` | |