# iauh23/spectrum-fusion architecture

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

- Interactive diagram: https://gitdiagram.com/iauh23/spectrum-fusion
- Repository: https://github.com/iauh23/spectrum-fusion

## Overview

spectrum-fusion is a Python evaluation harness for comparing RGB and thermal person detectors against point annotations. A user runs the baseline entry point, which loads ground truth and processes each modality’s images through detection, point matching, and frame-weighted/localization scoring, then saves per-frame and aggregate results. RGB/thermal fusion, overlap analysis, and confidence sweeps are documented future work, not implemented runtime stages. The source excerpts show the main calls; dataset pairing is also documented in the README.

Main entry points: [`src/baseline.py`](https://github.com/iauh23/spectrum-fusion/blob/main/src/baseline.py) (Baseline Runner), [`src/gt_parser.py`](https://github.com/iauh23/spectrum-fusion/blob/main/src/gt_parser.py) (GT Parser), [`src/metrics.py`](https://github.com/iauh23/spectrum-fusion/blob/main/src/metrics.py) (Metric Scoring), [`data/rgb`](https://github.com/iauh23/spectrum-fusion/tree/main/data/rgb) (RGB Images)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Evaluation Inputs"]
  node_rgb_images["RGB Images"]
  node_thermal_images["Thermal Images"]
  node_gt_xml["Point Annotations"]
  node_weights["YOLO Weights"]
end

subgraph group_pipeline["Evaluation Pipeline"]
  node_baseline["Baseline Runner<br/>[baseline.py]"]
  node_parser["GT Parser<br/>[gt_parser.py]"]
  node_detector["Person Detector<br/>[detect.py]"]
  node_matcher["Point Matcher<br/>[matcher.py]"]
end

subgraph group_results["Metrics and Results"]
  node_metrics["Metric Scoring<br/>[metrics.py]"]
  node_outputs["Run Reports"]
end

node_user(("Researcher"))

node_user -->|"runs"| node_baseline
node_baseline -->|"loads annotations"| node_parser
node_parser -->|"parses XML"| node_gt_xml
node_baseline -->|"reads frames"| node_rgb_images
node_baseline -->|"reads frames"| node_thermal_images
node_baseline -->|"loads model"| node_weights
node_baseline -->|"requests detections"| node_detector
node_baseline -->|"matches points"| node_matcher
node_baseline -->|"scores frames"| node_metrics
node_baseline -->|"aggregates scores"| node_metrics
node_baseline -->|"writes reports"| node_outputs

click node_rgb_images "https://github.com/iauh23/spectrum-fusion/tree/main/data/rgb"
click node_thermal_images "https://github.com/iauh23/spectrum-fusion/tree/main/data/infrared"
click node_gt_xml "https://github.com/iauh23/spectrum-fusion/tree/main/data/GT"
click node_baseline "https://github.com/iauh23/spectrum-fusion/blob/main/src/baseline.py"
click node_parser "https://github.com/iauh23/spectrum-fusion/blob/main/src/gt_parser.py"
click node_detector "https://github.com/iauh23/spectrum-fusion/blob/main/src/detect.py"
click node_matcher "https://github.com/iauh23/spectrum-fusion/blob/main/src/matcher.py"
click node_metrics "https://github.com/iauh23/spectrum-fusion/blob/main/src/metrics.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_rgb_images,node_thermal_images,node_gt_xml,node_weights toneBlue
class node_baseline,node_parser,node_detector,node_matcher toneAmber
class node_metrics,node_outputs toneMint
class node_user toneIndigo
```

## Components

### Evaluation Inputs

- [RGB Images](https://github.com/iauh23/spectrum-fusion/tree/main/data/rgb): `data/rgb`
- [Thermal Images](https://github.com/iauh23/spectrum-fusion/tree/main/data/infrared): `data/infrared`
- [Point Annotations](https://github.com/iauh23/spectrum-fusion/tree/main/data/GT): `data/GT`
- **YOLO Weights**

### Evaluation Pipeline

- [Baseline Runner](https://github.com/iauh23/spectrum-fusion/blob/main/src/baseline.py): `src/baseline.py`
- [GT Parser](https://github.com/iauh23/spectrum-fusion/blob/main/src/gt_parser.py): `src/gt_parser.py`
- [Person Detector](https://github.com/iauh23/spectrum-fusion/blob/main/src/detect.py): `src/detect.py`
- [Point Matcher](https://github.com/iauh23/spectrum-fusion/blob/main/src/matcher.py): `src/matcher.py`

### Metrics and Results

- [Metric Scoring](https://github.com/iauh23/spectrum-fusion/blob/main/src/metrics.py): `src/metrics.py`
- **Run Reports**

### Other components

- **Researcher**

## Connections

- Researcher → Baseline Runner: runs (evidence: `README.md`)
- Baseline Runner → GT Parser: loads annotations (evidence: `src/baseline.py`)
- GT Parser → Point Annotations: parses XML (evidence: `src/gt_parser.py`)
- Baseline Runner → RGB Images: reads frames (evidence: `src/baseline.py`)
- Baseline Runner → Thermal Images: reads frames (evidence: `src/baseline.py`)
- Baseline Runner → YOLO Weights: loads model (evidence: `src/baseline.py`)
- Baseline Runner → Person Detector: requests detections (evidence: `src/baseline.py`)
- Baseline Runner → Point Matcher: matches points (evidence: `src/baseline.py`)
- Baseline Runner → Metric Scoring: scores frames (evidence: `src/baseline.py`)
- Baseline Runner → Metric Scoring: aggregates scores (evidence: `src/baseline.py`)
- Baseline Runner → Run Reports: writes reports (evidence: `src/baseline.py`)
