# karanpateldev/model-to-classify-waste-into-different-categories architecture

> Architecture diagram of the GitHub repository karanpateldev/model-to-classify-waste-into-different-categories, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/karanpateldev/model-to-classify-waste-into-different-categories
- Repository: https://github.com/karanpateldev/model-to-classify-waste-into-different-categories

## Overview

##### Actors
- End User – the primary actor who interacts with the application via the web interface.
- (Optional) Administrator/Developer – could be represented if later extending to maintenance tasks like updating the model or monitoring performance.

##### Main Use Cases
- View Homepage – where users see the project overview, key features, and model performance stats.
- Explore Data (EDA) – use case where the user navigates to the Exploratory Data Analysis section; here they see dataset distributions, sample images, and visual statistics.
- Upload/Image Input – representing the functionality where the user submits a waste image to the system.
- Image Prediction – encapsulates the CNN model’s execution (via the prediction.py script) to classify the uploaded image into one of the 9 waste categories.
- View Prediction Results – the result display use case, where the user sees the classified waste type along with confidence scores.

##### Out the Relationships
- Link the End User directly to “View Homepage.”
- End User to “Explore Data (EDA)” indicating that they can trigger this analysis.

## Diagram (Mermaid)

```mermaid
flowchart TD
    actorEnd["End User"]:::actor

    subgraph "Waste Classification System"
        vhp["View Homepage"]:::useCase
        eda["Explore Data (EDA)"]:::useCase
        up["Upload/Image Input"]:::useCase
        pred["Image Prediction"]:::useCase
        res["View Prediction Results"]:::useCase
        model["CNN Model Integration"]:::internal
    end

    actorEnd -->|"initiates"| vhp
    actorEnd -->|"initiates"| eda
    actorEnd -->|"initiates"| up
    up -->|"triggers"| pred
    pred -->|"displays"| res
    pred -.->|"uses"| model

    click vhp "https://github.com/karanpateldev/model-to-classify-waste-into-different-categories/blob/main/app.py"
    click eda "https://github.com/karanpateldev/model-to-classify-waste-into-different-categories/blob/main/eda.py"
    click pred "https://github.com/karanpateldev/model-to-classify-waste-into-different-categories/blob/main/prediction.py"
    click model "https://github.com/karanpateldev/model-to-classify-waste-into-different-categories/blob/main/transfer_learning_model.h5"

    classDef actor fill:#FFD700,stroke:#DAA520,stroke-width:2px;
    classDef useCase fill:#ADD8E6,stroke:#00008B,stroke-width:2px,stroke-dasharray: 5 5;
    classDef internal fill:#FFC0CB,stroke:#FF69B4,stroke-width:2px,stroke-dasharray: 2 2;
```
