# shp50c/sign_language_using_object_detection_yolo_v5 architecture

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

- Interactive diagram: https://gitdiagram.com/shp50c/sign_language_using_object_detection_yolo_v5
- Repository: https://github.com/shp50c/sign_language_using_object_detection_yolo_v5

## Overview

##### Project type and purpose
- This is a modular Python‐based computer vision application with two main functions:
a) A machine‐learning training pipeline that collects, validates, trains (using YOLOv5), and pushes models.
b) A Flask‐based web interface for inference (live video or image prediction).
- It bundles the official YOLOv5 code (in the `yolov5/` folder), custom pipeline modules (`src/`), data collection (`data_collector.py`), and a minimal front end (`templates/index.html`).

##### File structure
- Top‐level artifacts:
- `data_collector.py` – script to gather images.
- `app.py` – Flask application for serving inference.
- `Dockerfile` / `.dockerignore` – containerization.
- `template.py` / `setup.py` / `requirements.txt` – project setup and scaffolding.
- `src/` – core pipeline modules segmented by functionality:
- `components/` – data ingestion, validation, model training, model pushing.
- `configuration/` – S3 interactions.
- `constant/` – application and pipeline constants.
- `entity/` – data structures for configs and artifacts.
- `pipeline/` – orchestrates the end‐to‐end training pipeline.
- `logger.py` / `exception.py` / `utils.py` – cross‐cutting concerns.
- `templates/` – HTML UI.
- `yolov5/` – third‐party detection/segmentation code, model definitions, trainers, predictors, utilities, Docker support for serving.

##### README for additional insights
- Confirms:
- Seven‐class sign language dataset augmented to 8,400 images.
- Modular pipeline mirrors a Jupyter notebook workflow.
- Logs under `logs/` for tracing pipeline steps and inference events.

##### Elements
- **Labels**: name each module (“DataIngestion”, “ModelTrainer”, “FlaskAPI”, etc.).
- Gray docker boundary to show container limits

## Diagram (Mermaid)

```mermaid
graph TD
    subgraph "Docker Container"
        direction TB

        DS["Data Source"]:::external
        DC["Data Collector\n(data_collector.py)"]:::pipeline
        DI["DataIngestion\n(src/components/data_ingestion.py)"]:::pipeline
        DV["DataValidation\n(src/components/data_validation.py)"]:::pipeline
        MT["ModelTrainer\n(src/components/model_trainer.py)"]:::pipeline
        MP["ModelPusher\n(src/components/model_pusher.py)"]:::pipeline

        S3["Amazon S3\n(storage)"]:::storage
        SP["S3 Ops\n(src/configuration/s3_operations.py)"]:::config
        APP["Flask Web App\n(app.py)"]:::web
        TEMPLATE["Front-End Template\n(templates/index.html)"]:::web

        CONST1["App Constants\n(src/constant/application.py)"]:::config
        CONST2["Pipeline Constants\n(src/constant/training_pipeline/)"]:::config
        ENT1["Artifacts Entity\n(src/entity/artifacts_entity.py)"]:::config
        ENT2["Config Entity\n(src/entity/config_entity.py)"]:::config

        LOG["Logging\n(src/logger.py)"]:::crosscut
        EXC["Exceptions\n(src/exception.py)"]:::crosscut
        UTIL["Utils\n(src/utils.py)"]:::crosscut

        LOGR["Runtime Logs\n(logs/)"]:::storage

        %% Training Flow
        DS --> DC --> DI --> DV --> MT --> MP --> S3
        MP --> SP --> S3

        %% Inference Flow
        APP --> SP --> S3
        APP --> YOLO["YOLOv5 Module"]:::external
        YOLO --> MP
        APP --> TEMPLATE

        %% Configuration & Entities usage
        DI --> CONST1
        DV --> CONST2
        MT --> ENT1
        MP --> ENT2

        %% Cross-cutting Concerns
        DS -.-> LOG
        DC -.-> LOG
        DI -.-> LOG
        DV -.-> LOG
        MT -.-> LOG
        MP -.-> LOG
        APP -.-> LOG

        DS -.-> EXC
        DC -.-> EXC
        DI -.-> EXC
        DV -.-> EXC
        MT -.-> EXC
        MP -.-> EXC
        APP -.-> EXC

        DS -.-> UTIL
        DC -.-> UTIL
        DI -.-> UTIL
        DV -.-> UTIL
        MT -.-> UTIL
        MP -.-> UTIL
        APP -.-> UTIL

        S3 --> LOGR
        APP --> LOGR

    end

    %% Click Events
    click DS "https://github.com/shp50c/sign_language_using_object_detection_yolo_v5/tree/main/data/"
    click DC "https://github.com/shp50c/sign_language_using_object_detection_yolo_v5/blob/main/data_collector.py"
    click DI "https://github.com/shp50c/sign_language_using_object_detection_yolo_v5/blob/main/src/components/data_ingestion.py"
    click DV "https://github.com/shp50c/sign_language_using_object_detection_yolo_v5/blob/main/src/components/data_validation.py"
    click MT "https://github.com/shp50c/sign_language_using_object_detection_yolo_v5/blob/main/src/components/model_trainer.py"
    click MP "https://github.com/shp50c/sign_language_using_object_detection_yolo_v5/blob/main/src/components/model_pusher.py"
    click SP "https://github.com/shp50c/sign_language_using_object_detection_yolo_v5/blob/main/src/configuration/s3_operations.py"
    click CONST1 "https://github.com/shp50c/sign_language_using_object_detection_yolo_v5/blob/main/src/constant/application.py"
    click CONST2 "https://github.com/shp50c/sign_language_using_object_detection_yolo_v5/tree/main/src/constant/training_pipeline/"
    click ENT1 "https://github.com/shp50c/sign_language_using_object_detection_yolo_v5/blob/main/src/entity/artifacts_entity.py"
    click ENT2 "https://github.com/shp50c/sign_language_using_object_detection_yolo_v5/blob/main/src/entity/config_entity.py"
    click LOG "https://github.com/shp50c/sign_language_using_object_detection_yolo_v5/blob/main/src/logger.py"
    click EXC "https://github.com/shp50c/sign_language_using_object_detection_yolo_v5/blob/main/src/exception.py"
    click UTIL "https://github.com/shp50c/sign_language_using_object_detection_yolo_v5/blob/main/src/utils.py"
    click APP "https://github.com/shp50c/sign_language_using_object_detection_yolo_v5/blob/main/app.py"
    click TEMPLATE "https://github.com/shp50c/sign_language_using_object_detection_yolo_v5/blob/main/templates/index.html"
    click YOLO "https://github.com/shp50c/sign_language_using_object_detection_yolo_v5/tree/main/yolov5/"
    click LOGR "https://github.com/shp50c/sign_language_using_object_detection_yolo_v5/tree/main/logs/"

    %% Styles
    classDef pipeline fill:#bbdefb,stroke:#90caf9,color:#0d47a1
    classDef storage fill:#c8e6c9,stroke:#66bb6a,color:#1b5e20
    classDef external fill:#ffe0b2,stroke:#ffb74d,color:#e65100
    classDef web fill:#e1bee7,stroke:#ba68c8,color:#4a148c
    classDef config fill:#b2dfdb,stroke:#4db6ac,color:#004d40
    classDef crosscut fill:#f5f5f5,stroke:#bdbdbd,color:#424242
```
