# ykotseruba/jaad architecture

> Architecture diagram of the GitHub repository ykotseruba/jaad, 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/ykotseruba/jaad
- Repository: https://github.com/ykotseruba/jaad

## Overview

JAAD is an annotated pedestrian-driving video dataset with a Python interface for preparing images and generating model-ready data. The principal workflow is: a researcher supplies the dataset location, the interface can extract video frames, parses and combines XML annotations into a cached database, applies subset and split options, and returns sequence or detection data. The XML label families are distinct inputs to that preparation workflow. The excerpts show annotation aggregation calls, while README statements document several interface capabilities; unsampled implementation details are not inferred.

Main entry points: [`jaad_data.py`](https://github.com/ykotseruba/jaad/blob/JAAD_2.0/jaad_data.py) (Annotation Parsing), [`split_ids`](https://github.com/ykotseruba/jaad/tree/JAAD_2.0/split_ids) (Split Selection), [`annotations`](https://github.com/ykotseruba/jaad/tree/JAAD_2.0/annotations) (Frame Labels), [`annotations_attributes`](https://github.com/ykotseruba/jaad/tree/JAAD_2.0/annotations_attributes) (Pedestrian Attributes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sources["Dataset Annotations"]
  node_frame_labels["Frame Labels"]
  node_ped_attributes["Pedestrian Attributes"]
  node_appearance["Appearance Labels"]
  node_traffic["Traffic Labels"]
  node_vehicle["Vehicle Labels"]
end

subgraph group_interface["Python Interface"]
  node_frame_extract["Frame Extraction<br/>[jaad_data.py]"]
  node_xml_parser["Annotation Parsing<br/>[jaad_data.py]"]
  node_annotation_db[("Annotation Database<br/>[jaad_data.py]")]
end

subgraph group_selection["Data Selection"]
  node_split_config["Split Selection"]
  node_data_options["Data Options<br/>[jaad_data.py]"]
end

subgraph group_outputs["Model Data"]
  node_sequence_data["Sequence Generation<br/>[jaad_data.py]"]
  node_detection_data["Detection Generation<br/>[jaad_data.py]"]
end

node_researcher(("Researcher"))
node_clips["Video Clips"]

node_researcher -->|"requests extraction"| node_frame_extract
node_clips -->|"provides videos"| node_frame_extract
node_frame_extract -->|"saves images"| node_researcher
node_researcher -->|"uses interface"| node_xml_parser
node_xml_parser -->|"parses annotations"| node_frame_labels
node_xml_parser -->|"parses attributes"| node_ped_attributes
node_xml_parser -->|"parses appearance"| node_appearance
node_xml_parser -->|"parses traffic"| node_traffic
node_xml_parser -->|"parses vehicle labels"| node_vehicle
node_xml_parser -->|"combines annotations"| node_annotation_db
node_annotation_db -->|"supplies annotations"| node_data_options
node_split_config -->|"defines default splits"| node_data_options
node_researcher -->|"sets parameters"| node_data_options
node_data_options -->|"configures sequences"| node_sequence_data
node_data_options -->|"configures detection"| node_detection_data
node_sequence_data -->|"returns sequences"| node_researcher
node_detection_data -->|"returns or saves data"| node_researcher

click node_frame_extract "https://github.com/ykotseruba/jaad/blob/JAAD_2.0/jaad_data.py"
click node_xml_parser "https://github.com/ykotseruba/jaad/blob/JAAD_2.0/jaad_data.py"
click node_frame_labels "https://github.com/ykotseruba/jaad/tree/JAAD_2.0/annotations"
click node_ped_attributes "https://github.com/ykotseruba/jaad/tree/JAAD_2.0/annotations_attributes"
click node_appearance "https://github.com/ykotseruba/jaad/tree/JAAD_2.0/annotations_appearance"
click node_traffic "https://github.com/ykotseruba/jaad/tree/JAAD_2.0/annotations_traffic"
click node_vehicle "https://github.com/ykotseruba/jaad/tree/JAAD_2.0/annotations_vehicle"
click node_annotation_db "https://github.com/ykotseruba/jaad/blob/JAAD_2.0/jaad_data.py"
click node_split_config "https://github.com/ykotseruba/jaad/tree/JAAD_2.0/split_ids"
click node_data_options "https://github.com/ykotseruba/jaad/blob/JAAD_2.0/jaad_data.py"
click node_sequence_data "https://github.com/ykotseruba/jaad/blob/JAAD_2.0/jaad_data.py"
click node_detection_data "https://github.com/ykotseruba/jaad/blob/JAAD_2.0/jaad_data.py"

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_frame_labels,node_ped_attributes,node_appearance,node_traffic,node_vehicle toneBlue
class node_frame_extract,node_xml_parser,node_annotation_db toneAmber
class node_split_config,node_data_options toneMint
class node_sequence_data,node_detection_data toneRose
class node_researcher,node_clips toneIndigo
```

## Components

### Dataset Annotations

- [Frame Labels](https://github.com/ykotseruba/jaad/tree/JAAD_2.0/annotations): `annotations`
- [Pedestrian Attributes](https://github.com/ykotseruba/jaad/tree/JAAD_2.0/annotations_attributes): `annotations_attributes`
- [Appearance Labels](https://github.com/ykotseruba/jaad/tree/JAAD_2.0/annotations_appearance): `annotations_appearance`
- [Traffic Labels](https://github.com/ykotseruba/jaad/tree/JAAD_2.0/annotations_traffic): `annotations_traffic`
- [Vehicle Labels](https://github.com/ykotseruba/jaad/tree/JAAD_2.0/annotations_vehicle): `annotations_vehicle`

### Python Interface

- [Frame Extraction](https://github.com/ykotseruba/jaad/blob/JAAD_2.0/jaad_data.py): `jaad_data.py`
- [Annotation Parsing](https://github.com/ykotseruba/jaad/blob/JAAD_2.0/jaad_data.py): `jaad_data.py`
- [Annotation Database](https://github.com/ykotseruba/jaad/blob/JAAD_2.0/jaad_data.py): `jaad_data.py`

### Data Selection

- [Split Selection](https://github.com/ykotseruba/jaad/tree/JAAD_2.0/split_ids): `split_ids`
- [Data Options](https://github.com/ykotseruba/jaad/blob/JAAD_2.0/jaad_data.py): `jaad_data.py`

### Model Data

- [Sequence Generation](https://github.com/ykotseruba/jaad/blob/JAAD_2.0/jaad_data.py): `jaad_data.py`
- [Detection Generation](https://github.com/ykotseruba/jaad/blob/JAAD_2.0/jaad_data.py): `jaad_data.py`

### Other components

- **Researcher**
- **Video Clips**

## Connections

- Researcher → Frame Extraction: requests extraction (evidence: `README.md`)
- Video Clips → Frame Extraction: provides videos (evidence: `README.md`)
- Frame Extraction → Researcher: saves images (evidence: `README.md`)
- Researcher → Annotation Parsing: uses interface (evidence: `README.md`)
- Annotation Parsing → Frame Labels: parses annotations (evidence: `jaad_data.py`)
- Annotation Parsing → Pedestrian Attributes: parses attributes (evidence: `jaad_data.py`)
- Annotation Parsing → Appearance Labels: parses appearance (evidence: `jaad_data.py`)
- Annotation Parsing → Traffic Labels: parses traffic (evidence: `jaad_data.py`)
- Annotation Parsing → Vehicle Labels: parses vehicle labels (evidence: `jaad_data.py`)
- Annotation Parsing → Annotation Database: combines annotations (evidence: `jaad_data.py`)
- Annotation Database → Data Options: supplies annotations (evidence: `README.md`)
- Split Selection → Data Options: defines default splits (evidence: `README.md`)
- Researcher → Data Options: sets parameters (evidence: `README.md`)
- Data Options → Sequence Generation: configures sequences (evidence: `README.md`)
- Data Options → Detection Generation: configures detection (evidence: `README.md`)
- Sequence Generation → Researcher: returns sequences (evidence: `README.md`)
- Detection Generation → Researcher: returns or saves data (evidence: `README.md`)
