# leequin-04/vehicleattributerecognition architecture

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

- Interactive diagram: https://gitdiagram.com/leequin-04/vehicleattributerecognition
- Repository: https://github.com/leequin-04/vehicleattributerecognition

## Overview

This is a vehicle-attribute recognition project whose principal runtime workflow reads video, detects and tracks vehicles, stabilizes identities, predicts attributes, and writes an annotated video. The README also describes type, color, and make recognition across three datasets; dataset inspection and preparation scripts support those recognition tasks. The runtime coordinator and core calls are evidenced in excerpts. Some dataset-related modules are represented from their names and the README, but their internal behavior and integration with model training were not inspected.

Main entry points: [`src/detection_tracking_var/run_detection_tracking.py`](https://github.com/leequin-04/vehicleattributerecognition/blob/main/src/detection_tracking_var/run_detection_tracking.py) (Video pipeline), [`src/detection_tracking_var/identity_manager.py`](https://github.com/leequin-04/vehicleattributerecognition/blob/main/src/detection_tracking_var/identity_manager.py) (Identity manager), [`src/detection_tracking_var/detector_tracker.py`](https://github.com/leequin-04/vehicleattributerecognition/blob/main/src/detection_tracking_var/detector_tracker.py) (Vehicle detector), [`src/detection_tracking_var/attribute_provider.py`](https://github.com/leequin-04/vehicleattributerecognition/blob/main/src/detection_tracking_var/attribute_provider.py) (Attribute provider)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Video recognition"]
  node_runtime["Video pipeline"]
  node_detector["Vehicle detector"]
  node_identity["Identity manager"]
end

subgraph group_attributes["Attribute recognition"]
  node_provider["Attribute provider"]
end

subgraph group_datasets["Dataset support"]
  node_miotcd_prep["MIO-TCD preparation<br/>[prepare_miotcd.py]"]
  node_miotcd_analysis["MIO-TCD analysis<br/>[analyzed_miotcd.py]"]
  node_miotcd_samples["MIO-TCD samples"]
  node_make_prep["Make preparation"]
  node_make_analysis["Make analysis"]
  node_make_verify["Make verification"]
  node_color_analysis["Color analysis"]
end

node_operator(("Video operator"))
node_annotated["Annotated video"]
node_miotcd_raw[("MIO-TCD dataset")]
node_make_raw[("Riotu Cars dataset")]
node_color_raw[("Vehicle Color dataset")]

node_operator -->|"starts"| node_runtime
node_runtime -->|"updates tracks"| node_detector
node_runtime -->|"updates identities"| node_identity
node_runtime -->|"gets display data"| node_identity
node_identity -->|"predicts attributes"| node_provider
node_runtime -->|"writes video"| node_annotated
node_miotcd_raw -->|"reads images"| node_miotcd_prep
node_make_raw -->|"reads images"| node_make_prep
node_miotcd_raw -->|"inspects dataset"| node_miotcd_analysis
node_miotcd_raw -.->|"shows samples"| node_miotcd_samples
node_make_raw -->|"inspects dataset"| node_make_analysis
node_make_raw -.->|"verifies dataset"| node_make_verify
node_color_raw -->|"inspects dataset"| node_color_analysis

click node_runtime "https://github.com/leequin-04/vehicleattributerecognition/blob/main/src/detection_tracking_var/run_detection_tracking.py"
click node_detector "https://github.com/leequin-04/vehicleattributerecognition/blob/main/src/detection_tracking_var/detector_tracker.py"
click node_identity "https://github.com/leequin-04/vehicleattributerecognition/blob/main/src/detection_tracking_var/identity_manager.py"
click node_provider "https://github.com/leequin-04/vehicleattributerecognition/blob/main/src/detection_tracking_var/attribute_provider.py"
click node_miotcd_prep "https://github.com/leequin-04/vehicleattributerecognition/blob/main/src/prepare_miotcd.py"
click node_miotcd_analysis "https://github.com/leequin-04/vehicleattributerecognition/blob/main/src/analyzed_miotcd.py"
click node_miotcd_samples "https://github.com/leequin-04/vehicleattributerecognition/blob/main/src/show_miotcd_samples.py"
click node_make_prep "https://github.com/leequin-04/vehicleattributerecognition/blob/main/src/prepare_vehicle_make.py"
click node_make_analysis "https://github.com/leequin-04/vehicleattributerecognition/blob/main/src/analyze_vehicle_make.py"
click node_make_verify "https://github.com/leequin-04/vehicleattributerecognition/blob/main/src/verify_vehicle_make.py"
click node_color_analysis "https://github.com/leequin-04/vehicleattributerecognition/blob/main/src/analyze_vehicle_color.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_runtime,node_detector,node_identity toneBlue
class node_provider,node_miotcd_raw,node_make_raw,node_color_raw toneAmber
class node_miotcd_prep,node_miotcd_analysis,node_miotcd_samples,node_make_prep,node_make_analysis,node_make_verify,node_color_analysis toneMint
class node_operator,node_annotated toneIndigo
```

## Components

### Video recognition

- [Video pipeline](https://github.com/leequin-04/vehicleattributerecognition/blob/main/src/detection_tracking_var/run_detection_tracking.py): `src/detection_tracking_var/run_detection_tracking.py`
- [Vehicle detector](https://github.com/leequin-04/vehicleattributerecognition/blob/main/src/detection_tracking_var/detector_tracker.py): `src/detection_tracking_var/detector_tracker.py`
- [Identity manager](https://github.com/leequin-04/vehicleattributerecognition/blob/main/src/detection_tracking_var/identity_manager.py): `src/detection_tracking_var/identity_manager.py`

### Attribute recognition

- [Attribute provider](https://github.com/leequin-04/vehicleattributerecognition/blob/main/src/detection_tracking_var/attribute_provider.py): `src/detection_tracking_var/attribute_provider.py`

### Dataset support

- [MIO-TCD preparation](https://github.com/leequin-04/vehicleattributerecognition/blob/main/src/prepare_miotcd.py): `src/prepare_miotcd.py`
- [MIO-TCD analysis](https://github.com/leequin-04/vehicleattributerecognition/blob/main/src/analyzed_miotcd.py): `src/analyzed_miotcd.py`
- [MIO-TCD samples](https://github.com/leequin-04/vehicleattributerecognition/blob/main/src/show_miotcd_samples.py): `src/show_miotcd_samples.py`
- [Make preparation](https://github.com/leequin-04/vehicleattributerecognition/blob/main/src/prepare_vehicle_make.py): `src/prepare_vehicle_make.py`
- [Make analysis](https://github.com/leequin-04/vehicleattributerecognition/blob/main/src/analyze_vehicle_make.py): `src/analyze_vehicle_make.py`
- [Make verification](https://github.com/leequin-04/vehicleattributerecognition/blob/main/src/verify_vehicle_make.py): `src/verify_vehicle_make.py`
- [Color analysis](https://github.com/leequin-04/vehicleattributerecognition/blob/main/src/analyze_vehicle_color.py): `src/analyze_vehicle_color.py`

### Other components

- **Video operator**
- **Annotated video**
- **MIO-TCD dataset**
- **Riotu Cars dataset**
- **Vehicle Color dataset**

## Connections

- Video operator → Video pipeline: starts (evidence: `README.md`)
- Video pipeline → Vehicle detector: updates tracks (evidence: `src/detection_tracking_var/run_detection_tracking.py`)
- Video pipeline → Identity manager: updates identities (evidence: `src/detection_tracking_var/run_detection_tracking.py`)
- Video pipeline → Identity manager: gets display data (evidence: `src/detection_tracking_var/run_detection_tracking.py`)
- Identity manager → Attribute provider: predicts attributes (evidence: `src/detection_tracking_var/identity_manager.py`)
- Video pipeline → Annotated video: writes video (evidence: `src/detection_tracking_var/run_detection_tracking.py`)
- MIO-TCD dataset → MIO-TCD preparation: reads images (evidence: `src/prepare_miotcd.py`)
- Riotu Cars dataset → Make preparation: reads images (evidence: `src/prepare_vehicle_make.py`)
- MIO-TCD dataset → MIO-TCD analysis: inspects dataset (evidence: `src/analyzed_miotcd.py`)
- MIO-TCD dataset → MIO-TCD samples: shows samples
- Riotu Cars dataset → Make analysis: inspects dataset (evidence: `src/analyze_vehicle_make.py`)
- Riotu Cars dataset → Make verification: verifies dataset
- Vehicle Color dataset → Color analysis: inspects dataset (evidence: `src/analyze_vehicle_color.py`)
