# novato-intlgnt/signlanguagedetection architecture

> Architecture diagram of the GitHub repository novato-intlgnt/signlanguagedetection, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/novato-intlgnt/signlanguagedetection
- Repository: https://github.com/novato-intlgnt/signlanguagedetection

## Overview

##### Project type and purpose
- From the README and file tree, this is a standalone, desktop real-time sign-language detection and speech conversion application.
- It uses a video feed (OpenCV + Mediapipe) to extract hand keypoints, an LSTM model (TensorFlow) for gesture recognition, and a text-to-speech engine (gTTS/Pygame) to speak out recognized phrases.
- It follows an MVC-style structure: controllers for logic, views for UI, and utils for shared routines.

##### File structure
- Top-level files:
- main.py         – entry point, orchestrates initialization and the processing loop
- requirements.txt & .gitignore & LICENSE
- controllers/
- model_controller.py – loads the TensorFlow LSTM model, runs inference
- views/
- show_screen.py      – builds and updates the GUI (Tkinter/Pygame)
- utils/
- generic.py – shared helper functions (data preprocessing, mediapipe wrappers)
- No database; the “Tables” requirement likely refers to the data format library.

##### Insights from the README
- Core technologies:
- OpenCV + Mediapipe for real-time keypoint extraction
- TensorFlow LSTM for sequence classification
- gTTS + Pygame for audio output
- Tkinter + Pillow for GUI
- Key features: continuous video loop → sign detection → text conversion → speech output.

##### Elements
- Clear labels: e.g., “Keypoint Detector (Mediapipe)”, “Gesture Classifier (TensorFlow LSTM)”, etc.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Presenter Layer"
        UI["User Interface (Tkinter/Pygame)"]:::ui
    end

    subgraph "Business Logic Layer"
        Main["main.py (Orchestrator)"]:::orchestrator
        TTS["Text-to-Speech Engine (gTTS + Pygame)"]:::audio
    end

    subgraph "Data/ML Layer"
        KD["Keypoint Detector (Mediapipe)"]:::ml
        GR["Gesture Classifier (TensorFlow LSTM)"]:::ml
    end

    subgraph "Utilities Module"
        Utils["Utilities Module (data preprocessing, Mediapipe wrappers)"]:::utils
    end

    Assets["Static Assets (model weights, icons)"]:::assets
    Camera["Camera (Video Feed)"]:::data
    External["gTTS Cloud API"]:::external

    Camera -->|"frame stream"| Main
    Main -->|"capture frame"| Utils
    Utils -->|"extract keypoints"| KD
    KD -->|"keypoints"| GR
    GR -->|"predicted text"| Main
    Main -->|"display/update"| UI
    Main -->|"send text"| TTS
    TTS -->|"audio file/stream"| Main
    TTS -->|"synthesize"| External
    Assets --> KD
    Assets --> GR
    Assets --> UI

    click Main "https://github.com/novato-intlgnt/signlanguagedetection/blob/main/main.py"
    click KD "https://github.com/novato-intlgnt/signlanguagedetection/blob/main/utils/generic.py"
    click Utils "https://github.com/novato-intlgnt/signlanguagedetection/blob/main/utils/generic.py"
    click GR "https://github.com/novato-intlgnt/signlanguagedetection/blob/main/controllers/model_controller.py"
    click TTS "https://github.com/novato-intlgnt/signlanguagedetection/blob/main/main.py"
    click UI "https://github.com/novato-intlgnt/signlanguagedetection/blob/main/views/show_screen.py"
    click Assets "https://github.com/novato-intlgnt/signlanguagedetection/tree/main/assets/"

    classDef ui fill:#D0E8FF,stroke:#1E90FF;
    classDef orchestrator fill:#DFFFE0,stroke:#22A700;
    classDef ml fill:#FFF5BA,stroke:#E0A800;
    classDef utils fill:#F0F0F0,stroke:#A0A0A0;
    classDef assets fill:#FFE0E9,stroke:#D0005E;
    classDef data fill:#CFFFE8,stroke:#009F82;
    classDef audio fill:#FFEACA,stroke:#E08F00;
    classDef external fill:#E8E8E8,stroke:#808080;
```
