You need to agree to share your Hugging Face information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

uc-dataset: binary image–question supervision for a calibrated universal classifier

This dataset trains and evaluates a model that returns a calibrated probability P(yes | image, question) for any yes/no question or statement about an image (for example "Is the earring silver?", "The cat is left of the dog.", "Was this painted by Rembrandt?"). It combines human annotations from 20+ public datasets with labels from MLLM pipelines and programmatic rules. The dataset holds text and labels only. Images are referenced by (image_source, image_path) and must be downloaded from the original datasets (see Getting the images).

Code: github.com/LGirrbach/universal-classifier (code/data_generation/export_hf.py builds this dataset from the training mix default_xfer and the benchmarks in data/benchmarks/).

Columns

column type meaning
slice string train / validation: the training slice the sample comes from (attrgen, xfer, human_yesno, spatial, grounded, finesynth, extdata). test: the benchmark name (vqav2, ovad@h1, valse, ...)
image_source string the dataset the image is taken from (coco2017, openimages_v7, inat2021, wikiart, ...)
image_path string how to identify the image in that dataset (relative path, file name or parquet row; see the table below)
prompt string the yes/no question or the statement to verify
answer string yes, no, or uncertain

answer = "uncertain" marks items whose labellers disagree: the two MLLM verifiers in attrgen, xfer and finesynth, or the 10 human answers in VQAv2 (yes share between 0.3 and 0.7). Our default training run leaves them out. To match it, filter with answer != "uncertain". Every row is one (image, prompt) pair. An image appears in as many rows as it has questions.

from datasets import load_dataset

ds = load_dataset("LGirrbach/uc-dataset", token=True)          # private repo: needs an HF token with access
train = ds["train"].filter(lambda r: r["answer"] != "uncertain")
vsr = ds["test"].filter(lambda r: r["slice"] == "vsr")

Splits

split rows images content
train 5,652,545 323,972 training mix default_xfer (all seven slices)
validation 274,337 7,507 the validation part of the same slices (model selection, Platt calibration)
test 1,287,538 79,437 all 37 benchmarks (21 official third-party benchmarks + 16 of our own validation and diagnostic sets)

Disjointness. No image from train or validation appears in any test benchmark. The build removes every benchmark image from every slice, and it also keeps all 5,000 COCO val2017 images out of train and validation. Train and validation are disjoint by image.

Training slices (train / validation)

slice train rows (yes / no / uncertain) train images val rows image source labels
attrgen 2,899,117 (687,555 / 1,592,454 / 619,108) 100,616 155,755 COCO train2017 An LLM proposes attribute, scene, count and existence questions per image; an MLLM selects them; two MLLMs verify (Qwen3.8-27B-FP8, Gemma-4-26B-A4B-it). uncertain = the verifiers disagree
xfer 612,947 (208,101 / 273,636 / 131,210) 108,251 82,337 COCO train2017 cross-image transfer: attrgen question strings asked on other COCO images and verified by the same two MLLMs, to balance P(yes | question)
human_yesno 344,085 (161,129 / 163,763 / 19,193) 89,039 19,128 COCO train2017 human: VQAv2 yes/no questions (uncertain = annotators split), GQA balanced yes/no, VSR train (statements)
spatial 109,552 (54,782 / 54,770 / 0) 20,031 8,282 COCO train2017 programmatic left/right, above/below and closer/farther questions between COCO objects (COCO boxes + Depth-Anything-V2)
grounded 661,301 (254,824 / 406,477 / 0) 33,508 2,638 COCO train2017 (PACO-LVIS, VAW via VG→COCO) human object and part attributes from PACO-LVIS and VAW
finesynth 396,895 (115,701 / 143,481 / 137,713) 21,430 – COCO train2017 FineSynth region attributes (SAM 3 regions + attribute schema + two-MLLM verification), with diverse question templates and referring expressions
extdata 628,648 (315,411 / 313,237 / 0) 223,349 6,197 OpenImages V7, Fashionpedia, iNat2021, WikiArt, CUB, Stanford Cars, FGVC-Aircraft, DTD human labels and dataset metadata. Most questions come as a (positive image, negative image) pair with the identical string, so P(yes | question) = 0.5. OpenImages negatives and region attributes are confirmed by both MLLMs

Validation = all questions on the COCO images of attrgen shard 011 and of VSR dev, PACO-LVIS / VAW val, and a 1 % hash split of every external (non-COCO) source. FineSynth has no validation part.

Test benchmarks (slice = benchmark name)

Official (third-party, human labels):

benchmark rows images image_source content
coco_exist 393,879 4,929 coco2017 existence of each of the 80 COCO categories per image (COCO instance annotations) on held-out COCO train2017 images
vqav2 10,127 4,140 coco2017 VQAv2 yes/no questions on held-out COCO images (uncertain = annotators split)
gqa 7,581 1,496 coco2017 GQA balanced yes/no questions on held-out COCO images
vsr 2,195 1,874 coco2017 VSR (random split) test statements
ovad 15,023 500 coco2017 (val2017) OVAD object attributes, human positive and negative labels
paco_attr 15,010 629 coco2017 PACO-LVIS test object and part attributes
paco_part 11,788 2,537 coco2017 PACO-LVIS test: presence of optional object parts
vaw 15,008 1,714 coco2017 VAW test attributes (on VG images that have a COCO id)
valse 15,404 6,069 coco2017, visual_genome, swig, visdial_v1.0_val2018 VALSE caption/foil pairs (11 phenomena, validated samples only): caption = yes, foil = no
cub 18,126 5,786 cub_200_2011 CUB-200 species and part attributes (official test split)
cars 30,028 8,039 stanford_cars Stanford Cars model, make and body type (cars_test)
aircraft 13,090 3,332 fgvc_aircraft_2013b FGVC-Aircraft variant, family and manufacturer (test split)
inat 23,908 10,000 inat2021 iNat2021 species, one val image per species
dtd 4,438 1,879 dtd DTD textures
wikiart 6,712 3,877 wikiart WikiArt artist, style and genre (8 % hash split)
fashionpedia 10,692 1,156 fashionpedia Fashionpedia garment attributes (val/test images)
openimages 69,419 27,539 openimages_v7 OpenImages V7 validation: human-label items only (existence, relations, attributes)
ovad@h1..3, vaw@h1..3, paco_attr@h1..3, paco_part@h1..3 15,023 / 14,595 / 14,324 / 11,589 each as above as above robustness: the same labels rephrased with three question templates that never occur in training (h1: "Would you say that …?", h2: "In this photo, …?", h3: "Check whether …")

Validation and diagnostics (our own MLLM or programmatic labels, not official):

benchmark rows images content
attrgen 142,408 4,929 attrgen pipeline on held-out COCO shard 012 (includes uncertain)
attrgen_balanced 64,762 4,929 the same images, questions rebalanced per string with cross-image transfer labels
finesynth, finesynth@h1..3 57,775 each 4,607 FineSynth region attributes on held-out images, plus three held-out templates
spatial 6,000 1,046 programmatic spatial relations (COCO boxes + Depth-Anything-V2) on held-out images
openimages_mllm 14,247 6,771 OpenImages V7 validation: MLLM-labelled region and attribute questions

Getting the images

Download each source below and set a root directory per image_source; the image is then <root>/<image_path> (WikiArt is the one exception: see below). Sizes are approximate download sizes.

image_source image_path format used in how to get it
coco2017 train2017/000000xxxxxx.jpg, val2017/000000xxxxxx.jpg train, val, test http://images.cocodataset.org/zips/train2017.zip (18 GB), http://images.cocodataset.org/zips/val2017.zip (1 GB). Questions from VQAv2, GQA, VSR, VAW, PACO and VALSE (COCO 2014 / Visual7W) were mapped to COCO 2017 file names; the 12-digit id is the COCO image id.
openimages_v7 train/<ImageID>.jpg, validation/<ImageID>.jpg train, val, test https://s3.amazonaws.com/open-images-dataset/{train,validation}/<ImageID>.jpg, one image per file (or the official downloader, https://storage.googleapis.com/openimages/web/download_v7.html). We use about 67k train and 34k validation images, only those with Rotation == 0, downscaled to a maximum side of 1024 px. The questions do not depend on resolution.
inat2021 train/<class dir>/<uuid>.jpg, val/<class dir>/<uuid>.jpg train, val, test full iNat2021 train (not train_mini) and val: https://ml-inat-competition-datasets.s3.amazonaws.com/2021/train.tar.gz (224 GB), https://ml-inat-competition-datasets.s3.amazonaws.com/2021/val.tar.gz (8 GB); see https://github.com/visipedia/inat_comp/tree/master/2021
cub_200_2011 images/<class dir>/<file>.jpg train, val, test CUB_200_2011.tgz from https://data.caltech.edu/records/65de6-vp158 (paths relative to CUB_200_2011/)
stanford_cars cars_train/<5 digits>.jpg, cars_test/<5 digits>.jpg train, val, test The original Stanford site is offline. Use a mirror of cars_train / cars_test with the devkit and cars_test_annos_withlabels.mat (for example the Kaggle dataset jessicali9530/stanford-cars-dataset).
fgvc_aircraft_2013b data/images/<7 digits>.jpg train, val, test https://www.robots.ox.ac.uk/~vgg/data/fgvc-aircraft/archives/fgvc-aircraft-2013b.tar.gz (paths relative to fgvc-aircraft-2013b/)
dtd images/<class>/<file>.jpg train, val, test https://www.robots.ox.ac.uk/~vgg/data/dtd/download/dtd-r1.0.1.tar.gz (paths relative to dtd/)
fashionpedia train/<hash>.jpg, test/<hash>.jpg train, val, test https://s3.amazonaws.com/ifashionist-dataset/images/train2020.zip → train/, https://s3.amazonaws.com/ifashionist-dataset/images/val_test2020.zip → test/
wikiart data/train-000NN-of-00072.parquet:<row> train, val, test HF dataset huggan/wikiart at revision d559852d2b232e0fcf195e775866964f0564f2b5: the image is in column image of that parquet file at that row (0-based). Because the files are read in sorted order, the row also equals the global index in load_dataset("huggan/wikiart", split="train", revision=...). We stored the images downscaled to a 1024 px maximum side.
visual_genome <VG image id>.jpg test (valse) Visual Genome v1.2 images: https://cs.stanford.edu/people/rak248/VG_100K_2/images.zip and https://cs.stanford.edu/people/rak248/VG_100K_2/images2.zip (the file is in VG_100K/ or VG_100K_2/). VALSE Visual7W images that have a COCO id are listed under coco2017 instead.
swig <verb>_<n>.jpg test (valse) SWiG / imSitu images: https://swig-data-weights.s3.us-east-2.amazonaws.com/images_512.zip (13.6 GB; only 1.1k files are needed, which you can extract with HTTP range requests)
visdial_v1.0_val2018 VisualDialog_val2018_<12 digits>.jpg test (valse) VisDial v1.0 validation images (VisualDialog_val2018.zip), https://visualdialog.org/data

Example resolver:

import io
import pyarrow.parquet as pq
from huggingface_hub import hf_hub_download
from PIL import Image

ROOTS = {"coco2017": "/data/coco/images", "openimages_v7": "/data/openimages/images", "inat2021": "/data/inat2021",
         "cub_200_2011": "/data/CUB_200_2011", "stanford_cars": "/data/stanford_cars",
         "fgvc_aircraft_2013b": "/data/fgvc-aircraft-2013b", "dtd": "/data/dtd", "fashionpedia": "/data/fashionpedia",
         "visual_genome": "/data/VisualGenome/images", "swig": "/data/swig/images_512",
         "visdial_v1.0_val2018": "/data/visdial/VisualDialog_val2018"}
WIKIART_REV = "d559852d2b232e0fcf195e775866964f0564f2b5"

def load_image(row):
    if row["image_source"] == "wikiart":
        file, r = row["image_path"].split(":")
        local = hf_hub_download("huggan/wikiart", file, repo_type="dataset", revision=WIKIART_REV)
        img = pq.read_table(local, columns=["image"]).slice(int(r), 1).column("image")[0].as_py()
        return Image.open(io.BytesIO(img["bytes"])).convert("RGB")
    return Image.open(f"{ROOTS[row['image_source']]}/{row['image_path']}").convert("RGB")

Rebuilding the labels from raw annotations

You only need the images to use this dataset. To rebuild the slices and benchmarks with the project code, you also need these raw annotations (stored in the project under data/external/ unless noted otherwise):

dataset files source
COCO 2017 annotations_trainval2017.zip (instances; coco_exist, spatial, attrgen object lists) http://images.cocodataset.org/annotations/annotations_trainval2017.zip
VQAv2 v2_{OpenEnded_mscoco_,mscoco_}{train,val}2014_{questions,annotations}.json https://s3.amazonaws.com/cvmlp/vqa/mscoco/vqa/v2_{Questions,Annotations}_{Train,Val}_mscoco.zip, https://visualqa.org/download.html
GQA {train,val,testdev,test,challenge}_balanced_questions.json https://downloads.cs.stanford.edu/nlp/data/gqa/questions1.2.zip
Visual Genome image_data.json (VG id → COCO id, for GQA, VAW and VALSE) https://homes.cs.washington.edu/~ranjay/visualgenome/data/dataset/image_data.json.zip
VSR {train,dev,test}.jsonl (random split) https://huggingface.co/datasets/cambridgeltl/vsr_random/resolve/main/{train,dev,test}.jsonl
OVAD ovad2000.json https://lmb.informatik.uni-freiburg.de/resources/datasets/ovad.zip, https://github.com/OVAD-Benchmark/ovad-benchmark-code
PACO-LVIS paco_lvis_v1_{train,val,test}.json https://dl.fbaipublicfiles.com/paco/annotations/paco_lvis_v1.zip
VAW train_part1.json, train_part2.json, val.json, test.json, attribute_index.json, attribute_types.json, attribute_parent_types.json https://raw.githubusercontent.com/adobe-research/vaw_dataset/main/data/<file>
VALSE data/*.json (11 subsets) https://github.com/Heidelberg-NLP/VALSE
OpenImages V7 class descriptions, attributes and relationships descriptions, VRD train/val, bbox train/val, human image labels train/val, train-images-boxable-with-rotation.csv https://storage.googleapis.com/openimages/{v5,v6,v7,2018_04}/... (exact list: code/slurm/download_openimages.sh)
Fashionpedia instances_attributes_{train,val}2020.json https://s3.amazonaws.com/ifashionist-dataset/annotations/... (code/slurm/download_misc.sh)
WikiArt artist / style / genre labels in the huggan/wikiart parquet files (code/data_generation/extdata/wikiart_extract.py)
CUB / Cars / Aircraft / DTD / iNat2021 class labels, CUB attributes and parts, Cars devkit .mat files, Aircraft variant/family/manufacturer lists, iNat val.json in the archives listed above

The MLLM-derived slices (attrgen, xfer, finesynth, OpenImages verification) were made with Qwen3.8-27B-FP8 and Gemma-4-26B-A4B-it served by vLLM (about 75 H100-hours for attrgen). Their outputs appear here only through prompt / answer.

Not included

  • Soft labels (verifier probabilities for uncertain items), question type and group ids, and the grounding boxes (one or two normalised boxes per region question) that the project uses for an auxiliary grounding loss. They remain in the project's JSONL files.
  • Images (see above).

Licence and attribution

The questions and answers are derived from the datasets listed above. Each keeps its own licence and terms of use (COCO: CC BY 4.0 annotations, Flickr image terms; OpenImages: CC BY 4.0 annotations, CC BY 2.0 images; VQAv2, GQA, VSR, OVAD, PACO, VAW, VALSE, Fashionpedia, iNat2021, CUB, Stanford Cars, FGVC-Aircraft, DTD, WikiArt, Visual Genome, SWiG and VisDial each under their own terms). Please cite the original datasets when you use the corresponding slices or benchmarks.

Downloads last month
30