# tony671378/soul_is_dead architecture

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

## Overview

Soul Is Dead is a single-script forensic accident-video analyzer. An analyst supplies footage; `god.py` loads the damage detector and severity classifier, analyzes each frame, smooths detection signals, fuses them with classification, and writes an annotated video plus a severity chart and Markdown report. The chart and report summarize statistics gathered during processing. The README documents these capabilities; implementation evidence comes from the excerpted `god.py`. The notebook and checked-in example outputs are not part of the runtime flow.

Main entry points: [`god.py`](https://github.com/tony671378/soul_is_dead/blob/main/god.py) (Damage Detection), [`videos/accident_footage.mp4`](https://github.com/tony671378/soul_is_dead/blob/main/videos/accident_footage.mp4) (Accident Footage), [`models/damage_model.pt`](https://github.com/tony671378/soul_is_dead/blob/main/models/damage_model.pt) (Damage Weights), [`models/accident_model.pt`](https://github.com/tony671378/soul_is_dead/blob/main/models/accident_model.pt) (Severity Weights)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_analysis["Video Analysis"]
  node_footage["Accident Footage"]
  node_runner["Analysis Runner<br/>[god.py]"]
  node_capture["Frame Capture<br/>[god.py]"]
  node_temporal_smoothing["Temporal Smoothing<br/>[god.py]"]
  node_severity_fusion["Severity Fusion<br/>[god.py]"]
  node_stats[("Analysis Statistics<br/>[god.py]")]
end

subgraph group_inference["Model Inference"]
  node_damage_weights["Damage Weights<br/>[damage_model.pt]"]
  node_severity_weights["Severity Weights<br/>[accident_model.pt]"]
  node_damage_detection["Damage Detection<br/>[god.py]"]
  node_box_filter["Box Filtering<br/>[god.py]"]
  node_severity_classification["Severity Classification<br/>[god.py]"]
end

subgraph group_outputs["Review Outputs"]
  node_annotation["Frame Annotation<br/>[god.py]"]
  node_annotated_video["Annotated Video<br/>[god.py]"]
  node_severity_chart["Severity Chart<br/>[god.py]"]
  node_forensic_report["Forensic Report<br/>[god.py]"]
end

node_analyst(("Analyst"))

node_analyst -->|"provides footage"| node_footage
node_footage -->|"read by"| node_capture
node_runner -->|"opens video"| node_capture
node_runner -->|"loads weights"| node_damage_weights
node_runner -->|"loads weights"| node_severity_weights
node_capture -->|"supplies frames"| node_damage_detection
node_damage_detection -->|"filters boxes"| node_box_filter
node_damage_detection -->|"supplies frames"| node_severity_classification
node_box_filter -->|"updates history"| node_temporal_smoothing
node_temporal_smoothing -->|"supplies smoothed signals"| node_severity_fusion
node_severity_classification -->|"supplies prediction"| node_severity_fusion
node_severity_fusion -->|"updates counts"| node_stats
node_damage_detection -->|"plots detections"| node_annotation
node_severity_fusion -->|"labels frames"| node_annotation
node_annotation -->|"writes frames"| node_annotated_video
node_stats -->|"generates chart"| node_severity_chart
node_stats -->|"generates report"| node_forensic_report

click node_footage "https://github.com/tony671378/soul_is_dead/blob/main/videos/accident_footage.mp4"
click node_runner "https://github.com/tony671378/soul_is_dead/blob/main/god.py"
click node_capture "https://github.com/tony671378/soul_is_dead/blob/main/god.py"
click node_damage_weights "https://github.com/tony671378/soul_is_dead/blob/main/models/damage_model.pt"
click node_severity_weights "https://github.com/tony671378/soul_is_dead/blob/main/models/accident_model.pt"
click node_damage_detection "https://github.com/tony671378/soul_is_dead/blob/main/god.py"
click node_box_filter "https://github.com/tony671378/soul_is_dead/blob/main/god.py"
click node_severity_classification "https://github.com/tony671378/soul_is_dead/blob/main/god.py"
click node_temporal_smoothing "https://github.com/tony671378/soul_is_dead/blob/main/god.py"
click node_severity_fusion "https://github.com/tony671378/soul_is_dead/blob/main/god.py"
click node_stats "https://github.com/tony671378/soul_is_dead/blob/main/god.py"
click node_annotation "https://github.com/tony671378/soul_is_dead/blob/main/god.py"
click node_annotated_video "https://github.com/tony671378/soul_is_dead/blob/main/god.py"
click node_severity_chart "https://github.com/tony671378/soul_is_dead/blob/main/god.py"
click node_forensic_report "https://github.com/tony671378/soul_is_dead/blob/main/god.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_footage,node_runner,node_capture,node_temporal_smoothing,node_severity_fusion,node_stats toneBlue
class node_damage_weights,node_severity_weights,node_damage_detection,node_box_filter,node_severity_classification toneAmber
class node_annotation,node_annotated_video,node_severity_chart,node_forensic_report toneMint
class node_analyst toneIndigo
```

## Components

### Video Analysis

- [Accident Footage](https://github.com/tony671378/soul_is_dead/blob/main/videos/accident_footage.mp4): `videos/accident_footage.mp4`
- [Analysis Runner](https://github.com/tony671378/soul_is_dead/blob/main/god.py): `god.py`
- [Frame Capture](https://github.com/tony671378/soul_is_dead/blob/main/god.py): `god.py`
- [Temporal Smoothing](https://github.com/tony671378/soul_is_dead/blob/main/god.py): `god.py`
- [Severity Fusion](https://github.com/tony671378/soul_is_dead/blob/main/god.py): `god.py`
- [Analysis Statistics](https://github.com/tony671378/soul_is_dead/blob/main/god.py): `god.py`

### Model Inference

- [Damage Weights](https://github.com/tony671378/soul_is_dead/blob/main/models/damage_model.pt): `models/damage_model.pt`
- [Severity Weights](https://github.com/tony671378/soul_is_dead/blob/main/models/accident_model.pt): `models/accident_model.pt`
- [Damage Detection](https://github.com/tony671378/soul_is_dead/blob/main/god.py): `god.py`
- [Box Filtering](https://github.com/tony671378/soul_is_dead/blob/main/god.py): `god.py`
- [Severity Classification](https://github.com/tony671378/soul_is_dead/blob/main/god.py): `god.py`

### Review Outputs

- [Frame Annotation](https://github.com/tony671378/soul_is_dead/blob/main/god.py): `god.py`
- [Annotated Video](https://github.com/tony671378/soul_is_dead/blob/main/god.py): `god.py`
- [Severity Chart](https://github.com/tony671378/soul_is_dead/blob/main/god.py): `god.py`
- [Forensic Report](https://github.com/tony671378/soul_is_dead/blob/main/god.py): `god.py`

### Other components

- **Analyst**

## Connections

- Analyst → Accident Footage: provides footage (evidence: `README.md`)
- Accident Footage → Frame Capture: read by (evidence: `god.py`)
- Analysis Runner → Frame Capture: opens video (evidence: `god.py`)
- Analysis Runner → Damage Weights: loads weights (evidence: `god.py`)
- Analysis Runner → Severity Weights: loads weights (evidence: `god.py`)
- Frame Capture → Damage Detection: supplies frames (evidence: `god.py`)
- Damage Detection → Box Filtering: filters boxes (evidence: `god.py`)
- Damage Detection → Severity Classification: supplies frames (evidence: `god.py`)
- Box Filtering → Temporal Smoothing: updates history (evidence: `god.py`)
- Temporal Smoothing → Severity Fusion: supplies smoothed signals (evidence: `god.py`)
- Severity Classification → Severity Fusion: supplies prediction (evidence: `god.py`)
- Severity Fusion → Analysis Statistics: updates counts (evidence: `god.py`)
- Damage Detection → Frame Annotation: plots detections (evidence: `god.py`)
- Severity Fusion → Frame Annotation: labels frames (evidence: `god.py`)
- Frame Annotation → Annotated Video: writes frames (evidence: `god.py`)
- Analysis Statistics → Severity Chart: generates chart (evidence: `god.py`)
- Analysis Statistics → Forensic Report: generates report (evidence: `god.py`)
