# Visual Genome (2016)

> 108,000 images where crowd workers named every object, its attributes and how objects relate.

Page: https://mralbu.github.io/ai-datasets/d/visual-genome

## Key facts

- Category: Vision
- Task: Scene graphs, dense captions and visual question answering
- Creators: Ranjay Krishna, Yuke Zhu, Oliver Groth, Justin Johnson, Kenji Hata, Joshua Kravitz, Stephanie Chen, Yannis Kalantidis, Li-Jia Li, David A. Shamma, Michael S. Bernstein, Li Fei-Fei (Stanford and others)
- Size: 108,077 images; 3.8M objects, 2.8M attributes, 2.3M relationships, 5.4M region descriptions, 1.7M questions
- Splits: images 108,077
- Input: A photo (about half are also in COCO)
- Labels: Boxes for objects with attributes ("blue", "drawn"), relationships between them ("pillow on couch"), region phrases and Q&A, mapped to WordNet
- License: CC BY 4.0
- Paper: [Visual Genome: Connecting Language and Vision Using Crowdsourced Dense Image Annotations](https://arxiv.org/abs/1602.07332)
- Homepage: https://homes.cs.washington.edu/~ranjay/visualgenome/
- Hugging Face: [ranjaykrishna/visual_genome](https://huggingface.co/datasets/ranjaykrishna/visual_genome)
- Samples on the site come from: [ljnlonoljpiljm/visual_genome](https://huggingface.co/datasets/ljnlonoljpiljm/visual_genome)
- Sampled at Hub revision 87c825ca1e070d9bc2f9d86f84e60b2346b96c45 (2026-11-08)

## Why it matters

ImageNet says what is in a picture and COCO where. Visual Genome tried to capture what is going on: every object, what it looks like and how it relates to the others, as a graph. The annotations were too dense to use whole at first, but an object detector trained on them gave the "bottom-up" image features that powered VQA, captioning and early vision-language transformers (ViLBERT, LXMERT, Oscar) from 2017 to about 2020. It also started scene graph generation as a task, and GQA built its questions from these graphs.

## Worth knowing

- An average image has about 35 objects, 26 attributes and 21 relationships, plus 50 region descriptions written by different workers.
- Relationships are dominated by a few predicates. "on", "has", "wearing" and "of" cover a large share, which makes predicting the rare ones the real challenge.
- Labels are free text, later mapped to WordNet synsets, so the same thing appears as "curtains", "curtain" and "drape".
- Hover over a relationship to draw its subject (orange), its object (blue) and the arrow between them; hover over an object or a region phrase to see its box.

## Get the data

The samples come from a Parquet copy (ljnlonoljpiljm/visual_genome) with images, objects, relationships, regions and Q&A in one table; the official repository uses a loading script.

```bash
# pip install -U huggingface_hub
hf download ranjaykrishna/visual_genome --repo-type dataset \
  --local-dir visual-genome
```

```python
from datasets import load_dataset   # pip install datasets

ds = load_dataset("ranjaykrishna/visual_genome")
print(ds)
```

## Related datasets

- [MS COCO](https://huggingface.co/datasets/rafaelpadilla/coco2017): 2014, half of Visual Genome's images come from it (on this site: https://mralbu.github.io/ai-datasets/d/coco)
- [Flickr30k](https://huggingface.co/datasets/nlphuji/flickr30k): 2014, captions with phrases linked to boxes (Entities) (on this site: https://mralbu.github.io/ai-datasets/d/flickr30k)
- [VQA v2](https://huggingface.co/datasets/lmms-lab-encoder/VQAv2): 2017, the VQA benchmark on COCO images (on this site: https://mralbu.github.io/ai-datasets/d/vqa-v2)
- [GQA](https://cs.stanford.edu/people/dorarad/gqa/): 2019, 22 million questions generated from these scene graphs
- [Open Images V6](https://storage.googleapis.com/openimages/web/index.html): 2020, relationships and localized narratives at larger scale
- [Panoptic Scene Graph](https://psgdataset.org/): 2022, relationships between segmentation masks instead of boxes

## Landmark papers

- [Neural Motifs: Scene Graph Parsing with Global Context](https://arxiv.org/abs/1711.06640) (2018)
- [Bottom-Up and Top-Down Attention for Image Captioning and Visual Question Answering](https://arxiv.org/abs/1707.07998) (2018)
- [LXMERT: Learning Cross-Modality Encoder Representations from Transformers](https://arxiv.org/abs/1908.07490) (2019)

## Papers on this site that use it

- [BLIP-2 (2023)](https://mralbu.github.io/ai-datasets/p/blip-2.md): Connected off-the-shelf frozen ViTs and frozen LLMs through a compact 188M-parameter Querying Transformer trained in two stages.
