# openimages/dataset architecture

> Architecture diagram of the GitHub repository openimages/dataset, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/openimages/dataset
- Repository: https://github.com/openimages/dataset

## Overview

This repository is an Open Images dataset resource repository with standalone image-download and model-inference utilities, rather than a single application pipeline. The clearest user workflow is supplying split/image IDs to download images from the public S3 bucket; separate tools classify local images or extract classifier bottleneck values. The README says the dataset moved to a new site as of V4. The sampled sources support these utility flows, but do not establish how the annotation assets or unsampled version documents are consumed.

Main entry points: [`tools/classify.py`](https://github.com/openimages/dataset/blob/main/tools/classify.py) (Inception classifier), [`downloader.py`](https://github.com/openimages/dataset/blob/main/downloader.py) (Image downloader), [`tools/classify_oidv2.py`](https://github.com/openimages/dataset/blob/main/tools/classify_oidv2.py) (OIDv2 classifier), [`tools/compute_bottleneck.py`](https://github.com/openimages/dataset/blob/main/tools/compute_bottleneck.py) (Bottleneck extractor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Dataset access"]
  node_image_ids["Image ID list"]
  node_downloader["Image downloader<br/>[downloader.py]"]
  node_local_images["Downloaded images"]
end

subgraph group_inference["Inference tools"]
  node_classifier_v1["Inception classifier<br/>[classify.py]"]
  node_classifier_v2["OIDv2 classifier<br/>[classify_oidv2.py]"]
  node_bottleneck["Bottleneck extractor"]
  node_inception["Inception v3 model"]
  node_checkpoint_v1["Inception checkpoint"]
  node_checkpoint_v2["OIDv2 checkpoint"]
end

subgraph group_resources["Dataset resources"]
  node_label_data["Label maps and names<br/>[dict.csv]"]
  node_bbox_hierarchy["Bounding-box hierarchy"]
  node_bbox_visualizer["Bounding-box viewer"]
end

node_user(("Dataset user"))
node_s3[("Open Images S3")]

node_user -->|"provides IDs"| node_image_ids
node_image_ids -->|"reads list"| node_downloader
node_downloader -->|"downloads images"| node_s3
node_downloader -->|"writes files"| node_local_images
node_user -->|"runs on image"| node_classifier_v1
node_classifier_v1 -->|"runs inference"| node_inception
node_classifier_v1 -->|"restores model"| node_checkpoint_v1
node_classifier_v1 -->|"loads labels"| node_label_data
node_user -->|"runs on image"| node_classifier_v2
node_classifier_v2 -->|"restores model"| node_checkpoint_v2
node_classifier_v2 -->|"loads labels"| node_label_data
node_user -->|"requests features"| node_bottleneck
node_bottleneck -->|"runs inference"| node_inception
node_bottleneck -->|"restores model"| node_checkpoint_v1
node_user -.->|"opens viewer"| node_bbox_visualizer

click node_downloader "https://github.com/openimages/dataset/blob/main/downloader.py"
click node_classifier_v1 "https://github.com/openimages/dataset/blob/main/tools/classify.py"
click node_classifier_v2 "https://github.com/openimages/dataset/blob/main/tools/classify_oidv2.py"
click node_bottleneck "https://github.com/openimages/dataset/blob/main/tools/compute_bottleneck.py"
click node_label_data "https://github.com/openimages/dataset/blob/main/dict.csv"
click node_bbox_hierarchy "https://github.com/openimages/dataset/blob/main/assets/bbox_hierarchy.json"
click node_bbox_visualizer "https://github.com/openimages/dataset/blob/main/bbox_labels_vis.html"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_image_ids,node_downloader,node_local_images,node_user toneBlue
class node_classifier_v1,node_classifier_v2,node_bottleneck,node_inception,node_checkpoint_v1,node_checkpoint_v2,node_s3 toneAmber
class node_label_data,node_bbox_hierarchy,node_bbox_visualizer toneMint
```

## Components

### Dataset access

- **Image ID list**
- [Image downloader](https://github.com/openimages/dataset/blob/main/downloader.py): `downloader.py`
- **Downloaded images**

### Inference tools

- [Inception classifier](https://github.com/openimages/dataset/blob/main/tools/classify.py): `tools/classify.py`
- [OIDv2 classifier](https://github.com/openimages/dataset/blob/main/tools/classify_oidv2.py): `tools/classify_oidv2.py`
- [Bottleneck extractor](https://github.com/openimages/dataset/blob/main/tools/compute_bottleneck.py): `tools/compute_bottleneck.py`
- **Inception v3 model**
- **Inception checkpoint**
- **OIDv2 checkpoint**

### Dataset resources

- [Label maps and names](https://github.com/openimages/dataset/blob/main/dict.csv): `dict.csv`
- [Bounding-box hierarchy](https://github.com/openimages/dataset/blob/main/assets/bbox_hierarchy.json): `assets/bbox_hierarchy.json`
- [Bounding-box viewer](https://github.com/openimages/dataset/blob/main/bbox_labels_vis.html): `bbox_labels_vis.html`

### Other components

- **Dataset user**
- **Open Images S3**

## Connections

- Dataset user → Image ID list: provides IDs
- Image ID list → Image downloader: reads list (evidence: `downloader.py`)
- Image downloader → Open Images S3: downloads images (evidence: `downloader.py`)
- Image downloader → Downloaded images: writes files (evidence: `downloader.py`)
- Dataset user → Inception classifier: runs on image (evidence: `tools/classify.py`)
- Inception classifier → Inception v3 model: runs inference (evidence: `tools/classify.py`)
- Inception classifier → Inception checkpoint: restores model (evidence: `tools/classify.py`)
- Inception classifier → Label maps and names: loads labels (evidence: `tools/classify.py`)
- Dataset user → OIDv2 classifier: runs on image (evidence: `tools/classify_oidv2.py`)
- OIDv2 classifier → OIDv2 checkpoint: restores model (evidence: `tools/classify_oidv2.py`)
- OIDv2 classifier → Label maps and names: loads labels (evidence: `tools/classify_oidv2.py`)
- Dataset user → Bottleneck extractor: requests features (evidence: `tools/compute_bottleneck.py`)
- Bottleneck extractor → Inception v3 model: runs inference (evidence: `tools/compute_bottleneck.py`)
- Bottleneck extractor → Inception checkpoint: restores model (evidence: `tools/compute_bottleneck.py`)
- Dataset user → Bounding-box viewer: opens viewer
