# barathi-1993/indian-sign-language-recognition architecture

> Architecture diagram of the GitHub repository barathi-1993/indian-sign-language-recognition, 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/barathi-1993/indian-sign-language-recognition
- Repository: https://github.com/barathi-1993/indian-sign-language-recognition

## Overview

This repository implements isolated Indian Sign Language gesture recognition from webcam input. In the collection workflow, frames are processed into 1662-dimensional MediaPipe Holistic landmark vectors and saved as sequences; preprocessing validates sequences, encodes labels, and splits datasets. Training builds and fits the MOPGRU classifier, while evaluation reports metrics. Separately, real-time inference buffers webcam landmarks, classifies full sequences, and displays thresholded labels. The README documents these core stages; sampled sources establish the concrete calls shown. The data and models directories exist, but their runtime contents were not sampled.

Main entry points: [`src/realtime_inference.py`](https://github.com/barathi-1993/indian-sign-language-recognition/blob/main/src/realtime_inference.py) (Live Recognition), [`src/collect_keypoints.py`](https://github.com/barathi-1993/indian-sign-language-recognition/blob/main/src/collect_keypoints.py) (Keypoint Collection), [`src/preprocess_keypoints.py`](https://github.com/barathi-1993/indian-sign-language-recognition/blob/main/src/preprocess_keypoints.py) (Sequence Preparation), [`src/train.py`](https://github.com/barathi-1993/indian-sign-language-recognition/blob/main/src/train.py) (Training and Reports)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Capture and Features"]
  node_collector["Keypoint Collection"]
  node_mp_utils["Holistic Features<br/>[mediapipe_utils.py]"]
end

subgraph group_dataset["Dataset Preparation"]
  node_raw_data[("Collected Sequences")]
  node_preprocessor["Sequence Preparation"]
  node_processed_data[("Encoded Splits")]
  node_label_encoder["Label Encoder"]
end

subgraph group_learning["Model and Evaluation"]
  node_trainer["Training and Reports<br/>[train.py]"]
  node_mopgru["MOPGRU Model<br/>[mopgru_cell.py]"]
  node_model_store[("Saved Model")]
  node_evaluator["Model Evaluation<br/>[evaluate.py]"]
  node_results["Evaluation Results"]
end

subgraph group_live["Real-Time Inference"]
  node_live_runner["Live Recognition"]
  node_display["Prediction Display"]
end

node_operator(("Operator"))
node_webcam["Webcam"]

node_operator -->|"starts capture"| node_collector
node_webcam -->|"provides frames"| node_collector
node_collector -->|"calls detection and extraction"| node_mp_utils
node_collector -->|"writes sequences"| node_raw_data
node_operator -->|"starts preparation"| node_preprocessor
node_raw_data -->|"reads sequences"| node_preprocessor
node_preprocessor -->|"writes splits"| node_processed_data
node_preprocessor -->|"saves encoder"| node_label_encoder
node_operator -->|"starts training"| node_trainer
node_processed_data -->|"loads splits"| node_trainer
node_trainer -->|"builds classifier"| node_mopgru
node_trainer -->|"saves checkpoint"| node_model_store
node_operator -->|"starts evaluation"| node_evaluator
node_processed_data -->|"loads test split"| node_evaluator
node_model_store -->|"loads model"| node_evaluator
node_evaluator -->|"writes metrics"| node_results
node_operator -->|"starts inference"| node_live_runner
node_webcam -->|"provides frames"| node_live_runner
node_live_runner -->|"calls detection and extraction"| node_mp_utils
node_model_store -->|"loads model"| node_live_runner
node_label_encoder -->|"loads labels"| node_live_runner
node_live_runner -->|"renders predictions"| node_display

click node_collector "https://github.com/barathi-1993/indian-sign-language-recognition/blob/main/src/collect_keypoints.py"
click node_mp_utils "https://github.com/barathi-1993/indian-sign-language-recognition/blob/main/src/mediapipe_utils.py"
click node_raw_data "https://github.com/barathi-1993/indian-sign-language-recognition/tree/main/data"
click node_preprocessor "https://github.com/barathi-1993/indian-sign-language-recognition/blob/main/src/preprocess_keypoints.py"
click node_processed_data "https://github.com/barathi-1993/indian-sign-language-recognition/tree/main/data"
click node_label_encoder "https://github.com/barathi-1993/indian-sign-language-recognition/tree/main/models"
click node_trainer "https://github.com/barathi-1993/indian-sign-language-recognition/blob/main/src/train.py"
click node_mopgru "https://github.com/barathi-1993/indian-sign-language-recognition/blob/main/src/mopgru_cell.py"
click node_model_store "https://github.com/barathi-1993/indian-sign-language-recognition/tree/main/models"
click node_evaluator "https://github.com/barathi-1993/indian-sign-language-recognition/blob/main/src/evaluate.py"
click node_live_runner "https://github.com/barathi-1993/indian-sign-language-recognition/blob/main/src/realtime_inference.py"
click node_display "https://github.com/barathi-1993/indian-sign-language-recognition/blob/main/src/realtime_inference.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_collector,node_mp_utils toneBlue
class node_raw_data,node_preprocessor,node_processed_data,node_label_encoder toneAmber
class node_trainer,node_mopgru,node_model_store,node_evaluator,node_results toneMint
class node_live_runner,node_display toneRose
class node_operator,node_webcam toneIndigo
```

## Components

### Capture and Features

- [Keypoint Collection](https://github.com/barathi-1993/indian-sign-language-recognition/blob/main/src/collect_keypoints.py): `src/collect_keypoints.py`
- [Holistic Features](https://github.com/barathi-1993/indian-sign-language-recognition/blob/main/src/mediapipe_utils.py): `src/mediapipe_utils.py`

### Dataset Preparation

- [Collected Sequences](https://github.com/barathi-1993/indian-sign-language-recognition/tree/main/data): `data`
- [Sequence Preparation](https://github.com/barathi-1993/indian-sign-language-recognition/blob/main/src/preprocess_keypoints.py): `src/preprocess_keypoints.py`
- [Encoded Splits](https://github.com/barathi-1993/indian-sign-language-recognition/tree/main/data): `data`
- [Label Encoder](https://github.com/barathi-1993/indian-sign-language-recognition/tree/main/models): `models`

### Model and Evaluation

- [Training and Reports](https://github.com/barathi-1993/indian-sign-language-recognition/blob/main/src/train.py): `src/train.py`
- [MOPGRU Model](https://github.com/barathi-1993/indian-sign-language-recognition/blob/main/src/mopgru_cell.py): `src/mopgru_cell.py`
- [Saved Model](https://github.com/barathi-1993/indian-sign-language-recognition/tree/main/models): `models`
- [Model Evaluation](https://github.com/barathi-1993/indian-sign-language-recognition/blob/main/src/evaluate.py): `src/evaluate.py`
- **Evaluation Results**

### Real-Time Inference

- [Live Recognition](https://github.com/barathi-1993/indian-sign-language-recognition/blob/main/src/realtime_inference.py): `src/realtime_inference.py`
- [Prediction Display](https://github.com/barathi-1993/indian-sign-language-recognition/blob/main/src/realtime_inference.py): `src/realtime_inference.py`

### Other components

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

## Connections

- Operator → Keypoint Collection: starts capture (evidence: `README.md`)
- Webcam → Keypoint Collection: provides frames (evidence: `src/collect_keypoints.py`)
- Keypoint Collection → Holistic Features: calls detection and extraction (evidence: `src/collect_keypoints.py`)
- Keypoint Collection → Collected Sequences: writes sequences (evidence: `src/collect_keypoints.py`)
- Operator → Sequence Preparation: starts preparation (evidence: `README.md`)
- Collected Sequences → Sequence Preparation: reads sequences (evidence: `src/preprocess_keypoints.py`)
- Sequence Preparation → Encoded Splits: writes splits (evidence: `src/preprocess_keypoints.py`)
- Sequence Preparation → Label Encoder: saves encoder (evidence: `src/preprocess_keypoints.py`)
- Operator → Training and Reports: starts training (evidence: `README.md`)
- Encoded Splits → Training and Reports: loads splits (evidence: `src/train.py`)
- Training and Reports → MOPGRU Model: builds classifier (evidence: `src/train.py`)
- Training and Reports → Saved Model: saves checkpoint (evidence: `src/train.py`)
- Operator → Model Evaluation: starts evaluation (evidence: `README.md`)
- Encoded Splits → Model Evaluation: loads test split (evidence: `src/evaluate.py`)
- Saved Model → Model Evaluation: loads model (evidence: `src/evaluate.py`)
- Model Evaluation → Evaluation Results: writes metrics (evidence: `src/evaluate.py`)
- Operator → Live Recognition: starts inference (evidence: `README.md`)
- Webcam → Live Recognition: provides frames (evidence: `src/realtime_inference.py`)
- Live Recognition → Holistic Features: calls detection and extraction (evidence: `src/realtime_inference.py`)
- Saved Model → Live Recognition: loads model (evidence: `src/realtime_inference.py`)
- Label Encoder → Live Recognition: loads labels (evidence: `src/realtime_inference.py`)
- Live Recognition → Prediction Display: renders predictions (evidence: `src/realtime_inference.py`)
