# kumarvivek9088/signlanguagedetectionusingml architecture

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

- Interactive diagram: https://gitdiagram.com/kumarvivek9088/signlanguagedetectionusingml
- Repository: https://github.com/kumarvivek9088/signlanguagedetectionusingml

## Overview

This repository implements a webcam-based sign-language recognizer and the scripts to prepare and train its classifier. The user-facing workflow captures hand frames, extracts landmarks into 30-frame sequences, classifies live sequences, and displays the recognized sign. Separate scripts collect labeled images and convert them into landmark data. The README offers no further capability detail; the tree and sampled sources support this workflow, although the live app references a model-architecture file not present in the tree.

Main entry points: [`app.py`](https://github.com/kumarvivek9088/signlanguagedetectionusingml/blob/main/app.py) (Live recognition), [`data.py`](https://github.com/kumarvivek9088/signlanguagedetectionusingml/blob/main/data.py) (Landmark preparation), [`function.py`](https://github.com/kumarvivek9088/signlanguagedetectionusingml/blob/main/function.py) (Hand processing), [`collectdata.py`](https://github.com/kumarvivek9088/signlanguagedetectionusingml/blob/main/collectdata.py) (Image capture)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Capture and features"]
  node_image_capture["Image capture<br/>[collectdata.py]"]
  node_labeled_images[("Labeled images")]
  node_landmark_prep["Landmark preparation<br/>[data.py]"]
  node_hand_features["Hand processing<br/>[function.py]"]
  node_sequence_data[("Sequence data")]
end

subgraph group_training["Training"]
  node_trainer["Model training<br/>[trainmodel.py]"]
  node_trained_model["Trained weights<br/>[model.h5]"]
end

subgraph group_runtime["Live recognition"]
  node_live_app["Live recognition<br/>[app.py]"]
  node_prediction["Sign prediction<br/>[app.py]"]
  node_display["On-screen output<br/>[app.py]"]
end

node_user(("Operator"))
node_camera(("Webcam"))

node_user -->|"labels frames"| node_image_capture
node_camera -->|"supplies frames"| node_image_capture
node_image_capture -->|"writes images"| node_labeled_images
node_labeled_images -->|"provides images"| node_landmark_prep
node_landmark_prep -->|"calls"| node_hand_features
node_hand_features -->|"returns landmarks"| node_landmark_prep
node_landmark_prep -->|"writes sequences"| node_sequence_data
node_sequence_data -->|"loads sequences"| node_trainer
node_trainer -->|"saves weights"| node_trained_model
node_user -->|"starts recognition"| node_live_app
node_camera -->|"supplies frames"| node_live_app
node_live_app -->|"calls"| node_hand_features
node_hand_features -->|"returns landmarks"| node_live_app
node_trained_model -->|"loads weights"| node_live_app
node_live_app -->|"predicts sequence"| node_prediction
node_prediction -->|"renders sign"| node_display
node_display -->|"shows result"| node_user

click node_image_capture "https://github.com/kumarvivek9088/signlanguagedetectionusingml/blob/main/collectdata.py"
click node_landmark_prep "https://github.com/kumarvivek9088/signlanguagedetectionusingml/blob/main/data.py"
click node_hand_features "https://github.com/kumarvivek9088/signlanguagedetectionusingml/blob/main/function.py"
click node_sequence_data "https://github.com/kumarvivek9088/signlanguagedetectionusingml/tree/main/MP_Data"
click node_trainer "https://github.com/kumarvivek9088/signlanguagedetectionusingml/blob/main/trainmodel.py"
click node_trained_model "https://github.com/kumarvivek9088/signlanguagedetectionusingml/blob/main/model.h5"
click node_live_app "https://github.com/kumarvivek9088/signlanguagedetectionusingml/blob/main/app.py"
click node_prediction "https://github.com/kumarvivek9088/signlanguagedetectionusingml/blob/main/app.py"
click node_display "https://github.com/kumarvivek9088/signlanguagedetectionusingml/blob/main/app.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_image_capture,node_labeled_images,node_landmark_prep,node_hand_features,node_sequence_data toneBlue
class node_trainer,node_trained_model toneAmber
class node_live_app,node_prediction,node_display toneMint
class node_user,node_camera toneIndigo
```

## Components

### Capture and features

- [Image capture](https://github.com/kumarvivek9088/signlanguagedetectionusingml/blob/main/collectdata.py): `collectdata.py`
- **Labeled images**
- [Landmark preparation](https://github.com/kumarvivek9088/signlanguagedetectionusingml/blob/main/data.py): `data.py`
- [Hand processing](https://github.com/kumarvivek9088/signlanguagedetectionusingml/blob/main/function.py): `function.py`
- [Sequence data](https://github.com/kumarvivek9088/signlanguagedetectionusingml/tree/main/MP_Data): `MP_Data`

### Training

- [Model training](https://github.com/kumarvivek9088/signlanguagedetectionusingml/blob/main/trainmodel.py): `trainmodel.py`
- [Trained weights](https://github.com/kumarvivek9088/signlanguagedetectionusingml/blob/main/model.h5): `model.h5`

### Live recognition

- [Live recognition](https://github.com/kumarvivek9088/signlanguagedetectionusingml/blob/main/app.py): `app.py`
- [Sign prediction](https://github.com/kumarvivek9088/signlanguagedetectionusingml/blob/main/app.py): `app.py`
- [On-screen output](https://github.com/kumarvivek9088/signlanguagedetectionusingml/blob/main/app.py): `app.py`

### Other components

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

## Connections

- Operator → Image capture: labels frames
- Webcam → Image capture: supplies frames
- Image capture → Labeled images: writes images
- Labeled images → Landmark preparation: provides images
- Landmark preparation → Hand processing: calls
- Hand processing → Landmark preparation: returns landmarks
- Landmark preparation → Sequence data: writes sequences
- Sequence data → Model training: loads sequences
- Model training → Trained weights: saves weights
- Operator → Live recognition: starts recognition
- Webcam → Live recognition: supplies frames
- Live recognition → Hand processing: calls
- Hand processing → Live recognition: returns landmarks
- Trained weights → Live recognition: loads weights
- Live recognition → Sign prediction: predicts sequence
- Sign prediction → On-screen output: renders sign
- On-screen output → Operator: shows result
