# harshbg/sign-language-interpreter-using-deep-learning architecture

> Architecture diagram of the GitHub repository harshbg/sign-language-interpreter-using-deep-learning, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/harshbg/sign-language-interpreter-using-deep-learning
- Repository: https://github.com/harshbg/sign-language-interpreter-using-deep-learning

## Overview

The repository is a webcam-based ASL gesture interpreter with a gesture-data preparation and model-training workflow, followed by live recognition, text/calculator modes, and optional speech. The README documents the staged data workflow; sampled source shows webcam capture, histogram segmentation, CNN training and the runtime. Links for unsampled modules are limited to explicit README relationships.

Main entry points: [`Code/final.py`](https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/final.py) (Live Recognition), [`Code/create_gestures.py`](https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/create_gestures.py) (Gesture Capture), [`Code`](https://github.com/harshbg/sign-language-interpreter-using-deep-learning/tree/master/Code) (Gesture Images), [`Code/set_hand_histogram.py`](https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/set_hand_histogram.py) (Hand Histogram)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Gesture Capture"]
  node_histogram["Hand Histogram"]
  node_histfile["Histogram File"]
  node_gesturecapture["Gesture Capture<br/>[create_gestures.py]"]
  node_gesturedata["Gesture Images"]
  node_labels[("Gesture Labels<br/>[gesture_db.db]")]
end

subgraph group_data["Dataset Preparation"]
  node_augmentation["Image Flipping<br/>[Rotate_images.py]"]
  node_preview["Gesture Preview"]
  node_dataset["Dataset Split<br/>[load_images.py]"]
  node_splitfiles["Train/Val/Test Data"]
end

subgraph group_model["Model Training"]
  node_trainer["CNN Trainer<br/>[cnn_model_train.py]"]
  node_modelartifact["Trained CNN"]
end

subgraph group_runtime["Live Interpretation"]
  node_recognizer["Live Recognition<br/>[final.py]"]
  node_prediction["Gesture Prediction<br/>[final.py]"]
  node_textmode["Text Mode<br/>[final.py]"]
  node_calculatormode["Calculator Mode<br/>[final.py]"]
  node_speech["Speech Output<br/>[final.py]"]
  node_display["Recognition Display<br/>[final.py]"]
end

node_user(("Operator"))
node_camera["Webcam"]

node_user -->|"sets calibration"| node_histogram
node_camera -->|"provides frames"| node_histogram
node_histogram -->|"writes histogram"| node_histfile
node_user -->|"labels gestures"| node_gesturecapture
node_camera -->|"provides frames"| node_gesturecapture
node_gesturecapture -->|"loads histogram"| node_histfile
node_gesturecapture -->|"saves images"| node_gesturedata
node_gesturecapture -->|"stores labels"| node_labels
node_gesturedata -->|"provides images"| node_augmentation
node_augmentation -->|"writes variants"| node_gesturedata
node_gesturedata -->|"displays samples"| node_preview
node_gesturedata -->|"loads images"| node_dataset
node_dataset -->|"writes splits"| node_splitfiles
node_splitfiles -->|"loads train/validation"| node_trainer
node_trainer -->|"saves checkpoint"| node_modelartifact
node_user -->|"starts interpreter"| node_recognizer
node_camera -->|"provides video"| node_recognizer
node_recognizer -->|"loads histogram"| node_histfile
node_recognizer -->|"loads model"| node_modelartifact
node_recognizer -->|"looks up gesture name"| node_labels
node_recognizer -->|"segments and predicts"| node_prediction
node_recognizer -->|"dispatches mode"| node_textmode
node_recognizer -->|"dispatches mode"| node_calculatormode
node_textmode -->|"uses prediction"| node_prediction
node_calculatormode -->|"uses prediction"| node_prediction
node_textmode -->|"speaks text"| node_speech
node_calculatormode -->|"speaks result"| node_speech
node_textmode -->|"renders interpretation"| node_display
node_calculatormode -->|"renders calculation"| node_display

click node_histogram "https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/set_hand_histogram.py"
click node_histfile "https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/hist"
click node_gesturecapture "https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/create_gestures.py"
click node_gesturedata "https://github.com/harshbg/sign-language-interpreter-using-deep-learning/tree/master/Code"
click node_labels "https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/gesture_db.db"
click node_augmentation "https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/Rotate_images.py"
click node_preview "https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/display_gestures.py"
click node_dataset "https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/load_images.py"
click node_splitfiles "https://github.com/harshbg/sign-language-interpreter-using-deep-learning/tree/master/Code"
click node_trainer "https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/cnn_model_train.py"
click node_modelartifact "https://github.com/harshbg/sign-language-interpreter-using-deep-learning/tree/master/Code"
click node_recognizer "https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/final.py"
click node_prediction "https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/final.py"
click node_textmode "https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/final.py"
click node_calculatormode "https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/final.py"
click node_speech "https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/final.py"
click node_display "https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/final.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_histogram,node_histfile,node_gesturecapture,node_gesturedata,node_labels toneBlue
class node_augmentation,node_preview,node_dataset,node_splitfiles toneAmber
class node_trainer,node_modelartifact toneMint
class node_recognizer,node_prediction,node_textmode,node_calculatormode,node_speech,node_display toneRose
class node_user,node_camera toneIndigo
```

## Components

### Gesture Capture

- [Hand Histogram](https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/set_hand_histogram.py): `Code/set_hand_histogram.py`
- [Histogram File](https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/hist): `Code/hist`
- [Gesture Capture](https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/create_gestures.py): `Code/create_gestures.py`
- [Gesture Images](https://github.com/harshbg/sign-language-interpreter-using-deep-learning/tree/master/Code): `Code`
- [Gesture Labels](https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/gesture_db.db): `Code/gesture_db.db`

### Dataset Preparation

- [Image Flipping](https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/Rotate_images.py): `Code/Rotate_images.py`
- [Gesture Preview](https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/display_gestures.py): `Code/display_gestures.py`
- [Dataset Split](https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/load_images.py): `Code/load_images.py`
- [Train/Val/Test Data](https://github.com/harshbg/sign-language-interpreter-using-deep-learning/tree/master/Code): `Code`

### Model Training

- [CNN Trainer](https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/cnn_model_train.py): `Code/cnn_model_train.py`
- [Trained CNN](https://github.com/harshbg/sign-language-interpreter-using-deep-learning/tree/master/Code): `Code`

### Live Interpretation

- [Live Recognition](https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/final.py): `Code/final.py`
- [Gesture Prediction](https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/final.py): `Code/final.py`
- [Text Mode](https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/final.py): `Code/final.py`
- [Calculator Mode](https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/final.py): `Code/final.py`
- [Speech Output](https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/final.py): `Code/final.py`
- [Recognition Display](https://github.com/harshbg/sign-language-interpreter-using-deep-learning/blob/master/Code/final.py): `Code/final.py`

### Other components

- **Operator**
- **Webcam**

## Connections

- Operator → Hand Histogram: sets calibration (evidence: `README.md`)
- Webcam → Hand Histogram: provides frames (evidence: `Code/set_hand_histogram.py`)
- Hand Histogram → Histogram File: writes histogram (evidence: `Code/set_hand_histogram.py`)
- Operator → Gesture Capture: labels gestures (evidence: `README.md`)
- Webcam → Gesture Capture: provides frames (evidence: `Code/create_gestures.py`)
- Gesture Capture → Histogram File: loads histogram (evidence: `Code/create_gestures.py`)
- Gesture Capture → Gesture Images: saves images (evidence: `Code/create_gestures.py`)
- Gesture Capture → Gesture Labels: stores labels (evidence: `Code/create_gestures.py`)
- Gesture Images → Image Flipping: provides images (evidence: `README.md`)
- Image Flipping → Gesture Images: writes variants (evidence: `README.md`)
- Gesture Images → Gesture Preview: displays samples (evidence: `README.md`)
- Gesture Images → Dataset Split: loads images (evidence: `Code/load_images.py`)
- Dataset Split → Train/Val/Test Data: writes splits (evidence: `Code/load_images.py`)
- Train/Val/Test Data → CNN Trainer: loads train/validation (evidence: `Code/cnn_model_train.py`)
- CNN Trainer → Trained CNN: saves checkpoint (evidence: `Code/cnn_model_train.py`)
- Operator → Live Recognition: starts interpreter (evidence: `README.md`)
- Webcam → Live Recognition: provides video (evidence: `Code/final.py`)
- Live Recognition → Histogram File: loads histogram (evidence: `Code/final.py`)
- Live Recognition → Trained CNN: loads model (evidence: `Code/final.py`)
- Live Recognition → Gesture Labels: looks up gesture name (evidence: `Code/final.py`)
- Live Recognition → Gesture Prediction: segments and predicts (evidence: `Code/final.py`)
- Live Recognition → Text Mode: dispatches mode (evidence: `Code/final.py`)
- Live Recognition → Calculator Mode: dispatches mode (evidence: `Code/final.py`)
- Text Mode → Gesture Prediction: uses prediction (evidence: `Code/final.py`)
- Calculator Mode → Gesture Prediction: uses prediction (evidence: `Code/final.py`)
- Text Mode → Speech Output: speaks text (evidence: `Code/final.py`)
- Calculator Mode → Speech Output: speaks result (evidence: `Code/final.py`)
- Text Mode → Recognition Display: renders interpretation (evidence: `Code/final.py`)
- Calculator Mode → Recognition Display: renders calculation (evidence: `Code/final.py`)
