# popla69/hand-sign-detection-final architecture

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

- Interactive diagram: https://gitdiagram.com/popla69/hand-sign-detection-final
- Repository: https://github.com/popla69/hand-sign-detection-final

## Overview

This repository is a webcam-based ASL alphabet recognizer. Its principal workflow captures video, detects a hand, extracts landmarks and engineered features, evaluates an ensemble of three models, filters and stabilizes predictions, then displays the recognized letter. The README documents that workflow; sampled `main.py` code confirms component setup and ensemble use. The repository also contains a separate pipeline orchestrator and temporal-sign handling. Source evidence is partial, so relationships not documented or visible in the excerpts are omitted.

Main entry points: [`src/ensemble_predictor.py`](https://github.com/popla69/hand-sign-detection-final/blob/main/src/ensemble_predictor.py) (Ensemble prediction), [`src/data_structures.py`](https://github.com/popla69/hand-sign-detection-final/blob/main/src/data_structures.py) (Shared data types), [`src/feature_engineering.py`](https://github.com/popla69/hand-sign-detection-final/blob/main/src/feature_engineering.py) (Feature engineering), [`src/camera_capture.py`](https://github.com/popla69/hand-sign-detection-final/blob/main/src/camera_capture.py) (Camera capture)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Capture and Features"]
  node_camera["Camera capture<br/>[camera_capture.py]"]
  node_detection["Hand detection<br/>[hand_detection.py]"]
  node_landmarks["Landmark extraction"]
  node_features["Feature engineering"]
  node_temporal["Temporal modeling"]
  node_dynamic["Dynamic signs"]
end

subgraph group_inference["Recognition Models"]
  node_mlp["Landmark MLP<br/>[landmark_mlp.py]"]
  node_cnn["Temporal CNN<br/>[temporal_cnn.py]"]
  node_mobilenet["MobileNet vision"]
  node_ensemble["Ensemble prediction"]
  node_calibration["Confidence calibration"]
end

subgraph group_results["Prediction Output"]
  node_gate["Confidence filtering<br/>[confidence_gate.py]"]
  node_stabilizer["Temporal stabilization"]
  node_output["Display output"]
end

subgraph group_foundation["Shared Runtime"]
  node_pipeline["Pipeline orchestrator<br/>[pipeline.py]"]
  node_config["System configuration<br/>[config.py]"]
  node_types["Shared data types<br/>[data_structures.py]"]
  node_logger["Logging<br/>[logger.py]"]
end

node_user(("ASL signer"))

node_user -->|"shows signs"| node_camera
node_camera -->|"provides frames"| node_detection
node_detection -->|"provides hand region"| node_landmarks
node_landmarks -->|"provides landmarks"| node_features
node_features -->|"buffers features"| node_temporal
node_temporal -->|"provides sequence"| node_ensemble
node_features -->|"provides features"| node_mlp
node_ensemble -->|"evaluates model"| node_mlp
node_ensemble -->|"evaluates model"| node_cnn
node_ensemble -->|"evaluates model"| node_mobilenet
node_ensemble -->|"calibrates confidence"| node_calibration
node_ensemble -->|"provides prediction"| node_gate
node_gate -->|"filters result"| node_stabilizer
node_stabilizer -->|"provides stable letter"| node_output
node_camera -->|"initialized by"| node_pipeline
node_detection -->|"initialized by"| node_pipeline
node_temporal -->|"configured by"| node_pipeline
node_features -->|"uses data types"| node_types
node_landmarks -->|"uses data types"| node_types
node_mlp -->|"uses data types"| node_types
node_cnn -->|"uses data types"| node_types
node_ensemble -->|"uses data types"| node_types
node_output -->|"uses data types"| node_types

click node_camera "https://github.com/popla69/hand-sign-detection-final/blob/main/src/camera_capture.py"
click node_detection "https://github.com/popla69/hand-sign-detection-final/blob/main/src/hand_detection.py"
click node_landmarks "https://github.com/popla69/hand-sign-detection-final/blob/main/src/landmark_extraction.py"
click node_features "https://github.com/popla69/hand-sign-detection-final/blob/main/src/feature_engineering.py"
click node_temporal "https://github.com/popla69/hand-sign-detection-final/blob/main/src/temporal_modeling.py"
click node_dynamic "https://github.com/popla69/hand-sign-detection-final/blob/main/src/dynamic_sign_handler.py"
click node_mlp "https://github.com/popla69/hand-sign-detection-final/blob/main/src/landmark_mlp.py"
click node_cnn "https://github.com/popla69/hand-sign-detection-final/blob/main/src/temporal_cnn.py"
click node_mobilenet "https://github.com/popla69/hand-sign-detection-final/blob/main/src/mobilenet_vision.py"
click node_ensemble "https://github.com/popla69/hand-sign-detection-final/blob/main/src/ensemble_predictor.py"
click node_calibration "https://github.com/popla69/hand-sign-detection-final/blob/main/src/temperature_scaling.py"
click node_gate "https://github.com/popla69/hand-sign-detection-final/blob/main/src/confidence_gate.py"
click node_stabilizer "https://github.com/popla69/hand-sign-detection-final/blob/main/src/temporal_stabilizer.py"
click node_output "https://github.com/popla69/hand-sign-detection-final/blob/main/src/text_output_handler.py"
click node_pipeline "https://github.com/popla69/hand-sign-detection-final/blob/main/src/pipeline.py"
click node_config "https://github.com/popla69/hand-sign-detection-final/blob/main/src/config.py"
click node_types "https://github.com/popla69/hand-sign-detection-final/blob/main/src/data_structures.py"
click node_logger "https://github.com/popla69/hand-sign-detection-final/blob/main/src/logger.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_camera,node_detection,node_landmarks,node_features,node_temporal,node_dynamic toneBlue
class node_mlp,node_cnn,node_mobilenet,node_ensemble,node_calibration toneAmber
class node_gate,node_stabilizer,node_output toneMint
class node_pipeline,node_config,node_types,node_logger toneRose
class node_user toneIndigo
```

## Components

### Capture and Features

- [Camera capture](https://github.com/popla69/hand-sign-detection-final/blob/main/src/camera_capture.py): `src/camera_capture.py`
- [Hand detection](https://github.com/popla69/hand-sign-detection-final/blob/main/src/hand_detection.py): `src/hand_detection.py`
- [Landmark extraction](https://github.com/popla69/hand-sign-detection-final/blob/main/src/landmark_extraction.py): `src/landmark_extraction.py`
- [Feature engineering](https://github.com/popla69/hand-sign-detection-final/blob/main/src/feature_engineering.py): `src/feature_engineering.py`
- [Temporal modeling](https://github.com/popla69/hand-sign-detection-final/blob/main/src/temporal_modeling.py): `src/temporal_modeling.py`
- [Dynamic signs](https://github.com/popla69/hand-sign-detection-final/blob/main/src/dynamic_sign_handler.py): `src/dynamic_sign_handler.py`

### Recognition Models

- [Landmark MLP](https://github.com/popla69/hand-sign-detection-final/blob/main/src/landmark_mlp.py): `src/landmark_mlp.py`
- [Temporal CNN](https://github.com/popla69/hand-sign-detection-final/blob/main/src/temporal_cnn.py): `src/temporal_cnn.py`
- [MobileNet vision](https://github.com/popla69/hand-sign-detection-final/blob/main/src/mobilenet_vision.py): `src/mobilenet_vision.py`
- [Ensemble prediction](https://github.com/popla69/hand-sign-detection-final/blob/main/src/ensemble_predictor.py): `src/ensemble_predictor.py`
- [Confidence calibration](https://github.com/popla69/hand-sign-detection-final/blob/main/src/temperature_scaling.py): `src/temperature_scaling.py`

### Prediction Output

- [Confidence filtering](https://github.com/popla69/hand-sign-detection-final/blob/main/src/confidence_gate.py): `src/confidence_gate.py`
- [Temporal stabilization](https://github.com/popla69/hand-sign-detection-final/blob/main/src/temporal_stabilizer.py): `src/temporal_stabilizer.py`
- [Display output](https://github.com/popla69/hand-sign-detection-final/blob/main/src/text_output_handler.py): `src/text_output_handler.py`

### Shared Runtime

- [Pipeline orchestrator](https://github.com/popla69/hand-sign-detection-final/blob/main/src/pipeline.py): `src/pipeline.py`
- [System configuration](https://github.com/popla69/hand-sign-detection-final/blob/main/src/config.py): `src/config.py`
- [Shared data types](https://github.com/popla69/hand-sign-detection-final/blob/main/src/data_structures.py): `src/data_structures.py`
- [Logging](https://github.com/popla69/hand-sign-detection-final/blob/main/src/logger.py): `src/logger.py`

### Other components

- **ASL signer**

## Connections

- ASL signer → Camera capture: shows signs (evidence: `README.md`)
- Camera capture → Hand detection: provides frames (evidence: `README.md`)
- Hand detection → Landmark extraction: provides hand region (evidence: `README.md`)
- Landmark extraction → Feature engineering: provides landmarks (evidence: `README.md`)
- Feature engineering → Temporal modeling: buffers features (evidence: `README.md`)
- Temporal modeling → Ensemble prediction: provides sequence (evidence: `README.md`)
- Feature engineering → Landmark MLP: provides features (evidence: `README.md`)
- Ensemble prediction → Landmark MLP: evaluates model (evidence: `src/ensemble_predictor.py`)
- Ensemble prediction → Temporal CNN: evaluates model (evidence: `src/ensemble_predictor.py`)
- Ensemble prediction → MobileNet vision: evaluates model (evidence: `src/ensemble_predictor.py`)
- Ensemble prediction → Confidence calibration: calibrates confidence (evidence: `src/ensemble_predictor.py`)
- Ensemble prediction → Confidence filtering: provides prediction (evidence: `README.md`)
- Confidence filtering → Temporal stabilization: filters result (evidence: `README.md`)
- Temporal stabilization → Display output: provides stable letter (evidence: `README.md`)
- Camera capture → Pipeline orchestrator: initialized by (evidence: `src/pipeline.py`)
- Hand detection → Pipeline orchestrator: initialized by (evidence: `src/pipeline.py`)
- Temporal modeling → Pipeline orchestrator: configured by (evidence: `src/pipeline.py`)
- Feature engineering → Shared data types: uses data types (evidence: `src/feature_engineering.py`)
- Landmark extraction → Shared data types: uses data types (evidence: `src/landmark_extraction.py`)
- Landmark MLP → Shared data types: uses data types (evidence: `src/landmark_mlp.py`)
- Temporal CNN → Shared data types: uses data types (evidence: `src/temporal_cnn.py`)
- Ensemble prediction → Shared data types: uses data types (evidence: `src/ensemble_predictor.py`)
- Display output → Shared data types: uses data types (evidence: `src/text_output_handler.py`)
