# mende237/pedestrian-tracking-yaounde architecture

> Architecture diagram of the GitHub repository mende237/pedestrian-tracking-yaounde, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mende237/pedestrian-tracking-yaounde
- Repository: https://github.com/mende237/pedestrian-tracking-yaounde

## Overview

This is a video-based pedestrian tracking and trajectory-analysis pipeline for Yaoundé footage, with comparison to ETH/UCY benchmarks. The main workflow is to run tracking over recordings, calculate speeds and merge trajectories, then visualize interactions or compare motion statistics. Tracking, extraction, and orchestration are excerpted; visualization and comparison are also excerpted. The README documents the pipeline’s outputs and use, but source excerpts do not show how tracking produces its annotated video beyond the tracking implementation itself.

Main entry points: [`src/run_all.py`](https://github.com/mende237/pedestrian-tracking-yaounde/blob/master/src/run_all.py) (Batch orchestrator), [`src/track.py`](https://github.com/mende237/pedestrian-tracking-yaounde/blob/master/src/track.py) (Detection and tracking), [`src/compare_eth_ucy.py`](https://github.com/mende237/pedestrian-tracking-yaounde/blob/master/src/compare_eth_ucy.py) (Benchmark comparison), [`src/extract_traj.py`](https://github.com/mende237/pedestrian-tracking-yaounde/blob/master/src/extract_traj.py) (Speed extraction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pipeline["Tracking pipeline"]
  node_orchestrator["Batch orchestrator<br/>[run_all.py]"]
  node_detector["Detection and tracking<br/>[track.py]"]
  node_rawcsv["Per-video trajectories"]
  node_speed["Speed extraction<br/>[extract_traj.py]"]
  node_merged["Merged trajectories<br/>[run_all.py]"]
end

subgraph group_analysis["Trajectory analysis"]
  node_interactionplots["Conflict-zone analysis"]
end

subgraph group_outputs["Visual outputs"]
  node_trajectoryplots["Trajectory visualizations<br/>[visualize.py]"]
  node_annotatedvideo["Annotated tracking video"]
  node_gif["Tracking GIF<br/>[make_gif.py]"]
end

subgraph group_benchmarks["Benchmark comparison"]
  node_ethdata["ETH/UCY annotations"]
  node_comparison["Benchmark comparison<br/>[compare_eth_ucy.py]"]
  node_summary["Comparison results<br/>[compare_eth_ucy.py]"]
end

node_operator(("Researcher"))
node_recordings["Input videos"]

node_operator -->|"runs pipeline"| node_orchestrator
node_recordings -->|"selects recordings"| node_orchestrator
node_orchestrator -->|"runs tracking"| node_detector
node_detector -->|"writes detections"| node_rawcsv
node_orchestrator -->|"computes speeds"| node_speed
node_rawcsv -->|"reads trajectories"| node_speed
node_orchestrator -->|"merges recordings"| node_merged
node_rawcsv -->|"reads CSVs"| node_merged
node_merged -->|"plots trajectories"| node_trajectoryplots
node_merged -->|"plots interactions"| node_interactionplots
node_merged -->|"compares Yaoundé"| node_comparison
node_ethdata -->|"loads annotations"| node_comparison
node_comparison -->|"writes summary"| node_summary
node_detector -->|"saves video"| node_annotatedvideo
node_annotatedvideo -->|"samples frames"| node_gif

click node_orchestrator "https://github.com/mende237/pedestrian-tracking-yaounde/blob/master/src/run_all.py"
click node_detector "https://github.com/mende237/pedestrian-tracking-yaounde/blob/master/src/track.py"
click node_speed "https://github.com/mende237/pedestrian-tracking-yaounde/blob/master/src/extract_traj.py"
click node_merged "https://github.com/mende237/pedestrian-tracking-yaounde/blob/master/src/run_all.py"
click node_trajectoryplots "https://github.com/mende237/pedestrian-tracking-yaounde/blob/master/src/visualize.py"
click node_interactionplots "https://github.com/mende237/pedestrian-tracking-yaounde/blob/master/src/visualize_interactions.py"
click node_comparison "https://github.com/mende237/pedestrian-tracking-yaounde/blob/master/src/compare_eth_ucy.py"
click node_summary "https://github.com/mende237/pedestrian-tracking-yaounde/blob/master/src/compare_eth_ucy.py"
click node_gif "https://github.com/mende237/pedestrian-tracking-yaounde/blob/master/src/make_gif.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_orchestrator,node_detector,node_rawcsv,node_speed,node_merged toneBlue
class node_interactionplots toneAmber
class node_trajectoryplots,node_annotatedvideo,node_gif toneMint
class node_ethdata,node_comparison,node_summary toneRose
class node_operator,node_recordings toneIndigo
```

## Components

### Tracking pipeline

- [Batch orchestrator](https://github.com/mende237/pedestrian-tracking-yaounde/blob/master/src/run_all.py): `src/run_all.py`
- [Detection and tracking](https://github.com/mende237/pedestrian-tracking-yaounde/blob/master/src/track.py): `src/track.py`
- **Per-video trajectories**
- [Speed extraction](https://github.com/mende237/pedestrian-tracking-yaounde/blob/master/src/extract_traj.py): `src/extract_traj.py`
- [Merged trajectories](https://github.com/mende237/pedestrian-tracking-yaounde/blob/master/src/run_all.py): `src/run_all.py`

### Trajectory analysis

- [Conflict-zone analysis](https://github.com/mende237/pedestrian-tracking-yaounde/blob/master/src/visualize_interactions.py): `src/visualize_interactions.py`

### Visual outputs

- [Trajectory visualizations](https://github.com/mende237/pedestrian-tracking-yaounde/blob/master/src/visualize.py): `src/visualize.py`
- **Annotated tracking video**
- [Tracking GIF](https://github.com/mende237/pedestrian-tracking-yaounde/blob/master/src/make_gif.py): `src/make_gif.py`

### Benchmark comparison

- **ETH/UCY annotations**
- [Benchmark comparison](https://github.com/mende237/pedestrian-tracking-yaounde/blob/master/src/compare_eth_ucy.py): `src/compare_eth_ucy.py`
- [Comparison results](https://github.com/mende237/pedestrian-tracking-yaounde/blob/master/src/compare_eth_ucy.py): `src/compare_eth_ucy.py`

### Other components

- **Researcher**
- **Input videos**

## Connections

- Researcher → Batch orchestrator: runs pipeline (evidence: `README.md`)
- Input videos → Batch orchestrator: selects recordings (evidence: `README.md`)
- Batch orchestrator → Detection and tracking: runs tracking (evidence: `src/run_all.py`)
- Detection and tracking → Per-video trajectories: writes detections (evidence: `src/track.py`)
- Batch orchestrator → Speed extraction: computes speeds (evidence: `src/run_all.py`)
- Per-video trajectories → Speed extraction: reads trajectories (evidence: `README.md`)
- Batch orchestrator → Merged trajectories: merges recordings (evidence: `src/run_all.py`)
- Per-video trajectories → Merged trajectories: reads CSVs (evidence: `src/run_all.py`)
- Merged trajectories → Trajectory visualizations: plots trajectories (evidence: `README.md`)
- Merged trajectories → Conflict-zone analysis: plots interactions (evidence: `README.md`)
- Merged trajectories → Benchmark comparison: compares Yaoundé (evidence: `README.md`)
- ETH/UCY annotations → Benchmark comparison: loads annotations (evidence: `src/compare_eth_ucy.py`)
- Benchmark comparison → Comparison results: writes summary (evidence: `src/compare_eth_ucy.py`)
- Detection and tracking → Annotated tracking video: saves video (evidence: `src/track.py`)
- Annotated tracking video → Tracking GIF: samples frames (evidence: `README.md`)
