# open-starlab/trackid3x3 architecture

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

- Interactive diagram: https://gitdiagram.com/open-starlab/trackid3x3
- Repository: https://github.com/open-starlab/trackid3x3

## Overview

TrackID3x3 combines a fixed-camera 3x3 basketball tracking baseline with downstream player identification and analysis. The documented workflow is to obtain tracks, prepare tracklet crops, identify legible jersey numbers outdoors, and derive attributes; indoor and outdoor attribute methods and TI-HOTA evaluation are also documented. CAMELTrack and several notebook workflows named in the README are absent from the supplied tree, so their internals and connections are not mapped. The source excerpts support the BoT-SORT tracking and jersey legibility links; other relationships are shown only where README or indexed references support them.

Main entry points: [`BoT-SORT/tracker/bot_sort.py`](https://github.com/open-starlab/trackid3x3/blob/main/BoT-SORT/tracker/bot_sort.py) (BoT-SORT tracker), [`jersey-number-pipeline/main.py`](https://github.com/open-starlab/trackid3x3/blob/main/jersey-number-pipeline/main.py) (Jersey pipeline), [`BoT-SORT/tools/demo.py`](https://github.com/open-starlab/trackid3x3/blob/main/BoT-SORT/tools/demo.py) (Video inference), [`BoT-SORT/tracker/mc_bot_sort.py`](https://github.com/open-starlab/trackid3x3/blob/main/BoT-SORT/tracker/mc_bot_sort.py) (Camera-aware tracker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_tracking["Detection and tracking"]
  node_yolox["YOLOX detector<br/>[yolox.py]"]
  node_yolov7["YOLOv7 detector<br/>[yolo.py]"]
  node_demo["Video inference<br/>[demo.py]"]
  node_tracker["BoT-SORT tracker<br/>[bot_sort.py]"]
  node_mc_tracker["Camera-aware tracker<br/>[mc_bot_sort.py]"]
  node_matching["Track matching<br/>[matching.py]"]
  node_kalman["Motion filtering<br/>[kalman_filter.py]"]
  node_camera_motion["Camera motion<br/>[gmc.py]"]
  node_reid["ReID embeddings"]
  node_embedding["Embedding head<br/>[embedding_head.py]"]
end

subgraph group_identity["Player identification"]
  node_crops["Tracklet crops<br/>[crop_images.py]"]
  node_jersey["Jersey pipeline<br/>[main.py]"]
  node_legibility["Legibility classifier"]
  node_ocr["Number recognition<br/>[str.py]"]
  node_config["Pipeline configuration<br/>[configuration.py]"]
end

subgraph group_attributes["Attribute analysis"]
  node_indoor_attributes["Indoor attributes"]
  node_torso["Torso organization"]
  node_histogram["Color histograms"]
  node_attribute_results["Player attributes"]
end

subgraph group_evaluation["Dataset and evaluation"]
  node_video["Game video"]
  node_dataset[("TrackID3x3 dataset")]
  node_ti_hota["TI-HOTA evaluation"]
end

node_operator(("Video operator"))

node_operator -->|"runs inference"| node_demo
node_video -->|"supplies frames"| node_demo
node_demo -->|"runs detector"| node_yolox
node_demo -->|"updates tracks"| node_tracker
node_tracker -->|"matches detections"| node_matching
node_tracker -->|"filters motion"| node_kalman
node_tracker -->|"compensates motion"| node_camera_motion
node_tracker -->|"extracts features"| node_reid
node_mc_tracker -->|"matches detections"| node_matching
node_mc_tracker -->|"filters motion"| node_kalman
node_mc_tracker -->|"compensates motion"| node_camera_motion
node_mc_tracker -->|"extracts features"| node_reid
node_reid -->|"builds embeddings"| node_embedding
node_dataset -->|"contains footage"| node_video
node_operator -->|"prepares track crops"| node_crops
node_crops -->|"provides tracklet images"| node_jersey
node_jersey -->|"filters images"| node_legibility
node_jersey -->|"loads settings"| node_config
node_jersey -.->|"recognizes numbers"| node_ocr
node_operator -->|"runs indoor analysis"| node_indoor_attributes
node_operator -->|"organizes images"| node_torso
node_torso -->|"provides torso images"| node_histogram
node_histogram -->|"supplies color features"| node_attribute_results
node_jersey -->|"supplies jersey results"| node_attribute_results
node_operator -->|"runs evaluation"| node_ti_hota
node_dataset -.->|"evaluated as tracking data"| node_ti_hota
node_demo -.->|"supports alternate detection"| node_yolov7

click node_yolox "https://github.com/open-starlab/trackid3x3/blob/main/BoT-SORT/yolox/models/yolox.py"
click node_yolov7 "https://github.com/open-starlab/trackid3x3/blob/main/BoT-SORT/yolov7/models/yolo.py"
click node_demo "https://github.com/open-starlab/trackid3x3/blob/main/BoT-SORT/tools/demo.py"
click node_tracker "https://github.com/open-starlab/trackid3x3/blob/main/BoT-SORT/tracker/bot_sort.py"
click node_mc_tracker "https://github.com/open-starlab/trackid3x3/blob/main/BoT-SORT/tracker/mc_bot_sort.py"
click node_matching "https://github.com/open-starlab/trackid3x3/blob/main/BoT-SORT/tracker/matching.py"
click node_kalman "https://github.com/open-starlab/trackid3x3/blob/main/BoT-SORT/tracker/kalman_filter.py"
click node_camera_motion "https://github.com/open-starlab/trackid3x3/blob/main/BoT-SORT/tracker/gmc.py"
click node_reid "https://github.com/open-starlab/trackid3x3/blob/main/BoT-SORT/fast_reid/fast_reid_interfece.py"
click node_embedding "https://github.com/open-starlab/trackid3x3/blob/main/BoT-SORT/fast_reid/fastreid/modeling/heads/embedding_head.py"
click node_crops "https://github.com/open-starlab/trackid3x3/blob/main/script/Outdoor/crop_images.py"
click node_jersey "https://github.com/open-starlab/trackid3x3/blob/main/jersey-number-pipeline/main.py"
click node_legibility "https://github.com/open-starlab/trackid3x3/blob/main/jersey-number-pipeline/legibility_classifier.py"
click node_ocr "https://github.com/open-starlab/trackid3x3/blob/main/jersey-number-pipeline/str.py"
click node_config "https://github.com/open-starlab/trackid3x3/blob/main/jersey-number-pipeline/configuration.py"
click node_torso "https://github.com/open-starlab/trackid3x3/blob/main/script/Outdoor/organization_torso_images.py"
click node_histogram "https://github.com/open-starlab/trackid3x3/blob/main/script/Outdoor/calculate_color_hist.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_yolox,node_yolov7,node_demo,node_tracker,node_mc_tracker,node_matching,node_kalman,node_camera_motion,node_reid,node_embedding toneBlue
class node_crops,node_jersey,node_legibility,node_ocr,node_config toneAmber
class node_indoor_attributes,node_torso,node_histogram,node_attribute_results toneMint
class node_video,node_dataset,node_ti_hota toneRose
class node_operator toneIndigo
```

## Components

### Detection and tracking

- [YOLOX detector](https://github.com/open-starlab/trackid3x3/blob/main/BoT-SORT/yolox/models/yolox.py): `BoT-SORT/yolox/models/yolox.py`
- [YOLOv7 detector](https://github.com/open-starlab/trackid3x3/blob/main/BoT-SORT/yolov7/models/yolo.py): `BoT-SORT/yolov7/models/yolo.py`
- [Video inference](https://github.com/open-starlab/trackid3x3/blob/main/BoT-SORT/tools/demo.py): `BoT-SORT/tools/demo.py`
- [BoT-SORT tracker](https://github.com/open-starlab/trackid3x3/blob/main/BoT-SORT/tracker/bot_sort.py): `BoT-SORT/tracker/bot_sort.py`
- [Camera-aware tracker](https://github.com/open-starlab/trackid3x3/blob/main/BoT-SORT/tracker/mc_bot_sort.py): `BoT-SORT/tracker/mc_bot_sort.py`
- [Track matching](https://github.com/open-starlab/trackid3x3/blob/main/BoT-SORT/tracker/matching.py): `BoT-SORT/tracker/matching.py`
- [Motion filtering](https://github.com/open-starlab/trackid3x3/blob/main/BoT-SORT/tracker/kalman_filter.py): `BoT-SORT/tracker/kalman_filter.py`
- [Camera motion](https://github.com/open-starlab/trackid3x3/blob/main/BoT-SORT/tracker/gmc.py): `BoT-SORT/tracker/gmc.py`
- [ReID embeddings](https://github.com/open-starlab/trackid3x3/blob/main/BoT-SORT/fast_reid/fast_reid_interfece.py): `BoT-SORT/fast_reid/fast_reid_interfece.py`
- [Embedding head](https://github.com/open-starlab/trackid3x3/blob/main/BoT-SORT/fast_reid/fastreid/modeling/heads/embedding_head.py): `BoT-SORT/fast_reid/fastreid/modeling/heads/embedding_head.py`

### Player identification

- [Tracklet crops](https://github.com/open-starlab/trackid3x3/blob/main/script/Outdoor/crop_images.py): `script/Outdoor/crop_images.py`
- [Jersey pipeline](https://github.com/open-starlab/trackid3x3/blob/main/jersey-number-pipeline/main.py): `jersey-number-pipeline/main.py`
- [Legibility classifier](https://github.com/open-starlab/trackid3x3/blob/main/jersey-number-pipeline/legibility_classifier.py): `jersey-number-pipeline/legibility_classifier.py`
- [Number recognition](https://github.com/open-starlab/trackid3x3/blob/main/jersey-number-pipeline/str.py): `jersey-number-pipeline/str.py`
- [Pipeline configuration](https://github.com/open-starlab/trackid3x3/blob/main/jersey-number-pipeline/configuration.py): `jersey-number-pipeline/configuration.py`

### Attribute analysis

- **Indoor attributes**
- [Torso organization](https://github.com/open-starlab/trackid3x3/blob/main/script/Outdoor/organization_torso_images.py): `script/Outdoor/organization_torso_images.py`
- [Color histograms](https://github.com/open-starlab/trackid3x3/blob/main/script/Outdoor/calculate_color_hist.py): `script/Outdoor/calculate_color_hist.py`
- **Player attributes**

### Dataset and evaluation

- **Game video**
- **TrackID3x3 dataset**
- **TI-HOTA evaluation**

### Other components

- **Video operator**

## Connections

- Video operator → Video inference: runs inference
- Game video → Video inference: supplies frames (evidence: `BoT-SORT/tools/demo.py`)
- Video inference → YOLOX detector: runs detector (evidence: `BoT-SORT/tools/demo.py`)
- Video inference → BoT-SORT tracker: updates tracks (evidence: `BoT-SORT/tools/demo.py`)
- BoT-SORT tracker → Track matching: matches detections (evidence: `BoT-SORT/tracker/bot_sort.py`)
- BoT-SORT tracker → Motion filtering: filters motion (evidence: `BoT-SORT/tracker/bot_sort.py`)
- BoT-SORT tracker → Camera motion: compensates motion (evidence: `BoT-SORT/tracker/bot_sort.py`)
- BoT-SORT tracker → ReID embeddings: extracts features (evidence: `BoT-SORT/tracker/bot_sort.py`)
- Camera-aware tracker → Track matching: matches detections (evidence: `BoT-SORT/tracker/mc_bot_sort.py`)
- Camera-aware tracker → Motion filtering: filters motion (evidence: `BoT-SORT/tracker/mc_bot_sort.py`)
- Camera-aware tracker → Camera motion: compensates motion (evidence: `BoT-SORT/tracker/mc_bot_sort.py`)
- Camera-aware tracker → ReID embeddings: extracts features (evidence: `BoT-SORT/tracker/mc_bot_sort.py`)
- ReID embeddings → Embedding head: builds embeddings (evidence: `BoT-SORT/fast_reid/fast_reid_interfece.py`)
- TrackID3x3 dataset → Game video: contains footage
- Video operator → Tracklet crops: prepares track crops
- Tracklet crops → Jersey pipeline: provides tracklet images
- Jersey pipeline → Legibility classifier: filters images (evidence: `jersey-number-pipeline/main.py`)
- Jersey pipeline → Pipeline configuration: loads settings (evidence: `jersey-number-pipeline/main.py`)
- Jersey pipeline → Number recognition: recognizes numbers
- Video operator → Indoor attributes: runs indoor analysis
- Video operator → Torso organization: organizes images
- Torso organization → Color histograms: provides torso images
- Color histograms → Player attributes: supplies color features
- Jersey pipeline → Player attributes: supplies jersey results
- Video operator → TI-HOTA evaluation: runs evaluation
- TrackID3x3 dataset → TI-HOTA evaluation: evaluated as tracking data
- Video inference → YOLOv7 detector: supports alternate detection
