# letho1608/vsl_detect architecture

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

- Interactive diagram: https://gitdiagram.com/letho1608/vsl_detect
- Repository: https://github.com/letho1608/vsl_detect

## Overview

##### Main Components
- Data Collection Component:
- Video Downloader & Text Extraction: Represent this block by combining the functionality of the video downloader (handled by Combine.py) and text extraction (which produces Label.csv) from sign language videos.
- Data Processor:
- This component involves the conversion of raw video data into training datasets. Use nodes for CreateData.py (for landmark extraction via MediaPipe) and CheckData.py (for ensuring data integrity).
- Model Training:
- Model trainer (Training.py) which applies an LSTM-based deep learning architecture. Include checkpoints (Models/checkpoints) and the final trained model (Models/final_model.keras).
- Main Application (Real-time Recognition):
- This part, implemented in Main.py, handles real-time sign language recognition using the trained model, PyQt5 for GUI, and additional functionalities like Vietnamese text-to-speech.

##### Relationships and Data Flow
- The output from the Data Processor serves as input for the “Model Training” component. Indicate that checkpoint models are stored during training.
- Once training is complete, the final model is loaded by the “Main Application” for real-time recognition.
- Data flow from raw video/text to the processed dataset
- Hand-off from data processing to training
- Deployment of the trained model in the recognition module

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Data Collection Layer
    subgraph "Data Collection"
        D1["Video Downloader & Text Extraction (Combine.py & Label.csv)"]:::dataCollection
    end

    %% Data Processing Layer
    subgraph "Data Processing"
        P1["Landmark Extraction (CreateData.py)"]:::dataProcessing
        P2["Data Integrity Check (CheckData.py)"]:::dataProcessing
    end

    %% Model Training Layer
    subgraph "Model Training"
        T1["LSTM-based Training (Training.py)"]:::modelTraining
        T2["Checkpoint Storage (Models/checkpoints)"]:::modelTraining
        T3["Final Trained Model (Models/final_model.keras)"]:::modelTraining
    end

    %% Real-time Recognition Layer
    subgraph "Real-time Recognition"
        R1["Recognition & UI (Main.py)"]:::realTime
    end

    %% External Dependencies and Hardware
    subgraph "External Requirements"
        ED1["Hardware: Webcam, CUDA-capable GPU"]:::external
        ED2["Libraries: TensorFlow, MediaPipe, OpenCV, PyQt5"]:::external
    end

    %% Pipeline Flow
    D1 -->|"raw data"| P1
    P1 -->|"processed landmarks"| P2
    P2 -->|"validated dataset"| T1
    T1 -->|"checkpoints generated"| T2
    T1 -->|"trained model"| T3
    T3 -->|"model loaded"| R1

    %% External Dependencies connections (dashed lines)
    ED1 --- R1
    ED1 --- T1
    ED2 --- D1
    ED2 --- P1
    ED2 --- T1
    ED2 --- R1

    %% Click Events
    click D1 "https://github.com/letho1608/vsl_detect/blob/main/Combine.py"
    click P1 "https://github.com/letho1608/vsl_detect/blob/main/CreateData.py"
    click P2 "https://github.com/letho1608/vsl_detect/blob/main/CheckData.py"
    click T1 "https://github.com/letho1608/vsl_detect/blob/main/Training.py"
    click T2 "https://github.com/letho1608/vsl_detect/tree/main/Models/checkpoints"
    click T3 "https://github.com/letho1608/vsl_detect/blob/main/Models/final_model.keras"
    click R1 "https://github.com/letho1608/vsl_detect/blob/main/Main.py"

    %% Styles
    classDef dataCollection fill:#AED6F1,stroke:#1F618D,stroke-width:2px;
    classDef dataProcessing fill:#A9DFBF,stroke:#229954,stroke-width:2px;
    classDef modelTraining fill:#F5B7B1,stroke:#C0392B,stroke-width:2px;
    classDef realTime fill:#FCF3CF,stroke:#B7950B,stroke-width:2px;
    classDef external fill:#D2B4DE,stroke:#8E44AD,stroke-width:2px;
```
