# harshalakkaraju/leaf-disease-detection-using-svm architecture

> Architecture diagram of the GitHub repository harshalakkaraju/leaf-disease-detection-using-svm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/harshalakkaraju/leaf-disease-detection-using-svm
- Repository: https://github.com/harshalakkaraju/leaf-disease-detection-using-svm

## Overview

##### Project type and purpose
- This is a standalone Python desktop application (“Leaf-Disease-Detection-Using-SVM”) that provides a GUI for detecting plant‐leaf diseases using a Support Vector Machine classifier.
- The README points to two CSV datasets (infected vs. healthy) and an unlabelled log of leaf features.

##### File structure
- Top-level scripts:
- main.py – application entry point
- GUIdriver.py – ties the UI to the logic
- design.ui + design.py – Qt Designer form and its generated Python wrapper
- classifier.py – SVM model training and prediction logic
- leafdetectionALLmix.py – feature extraction, preprocessing routines
- Datasetinfectedhealthy.csv / Datasetunlabelledlog.csv – data storage (flat files)
- README.md – minimal project overview

- Pattern: an MVC‐style separation
- View: design.ui + design.py + GUIdriver.py
- Model/Controller: classifier.py + leafdetectionALLmix.py
- Data Layer: CSV files

##### README
- Confirms the core functionality (SVM on leaf data) and points to the CSV datasets.

##### Final advice
- Both batch‐training flows and interactive inference flows to show full system coverage.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "UI Layer"
        designUI["design.ui"]:::frontend
        designPY["design.py"]:::frontend
        guiDriver["GUIdriver.py"]:::frontend
    end

    subgraph "Controller"
        mainPY["main.py"]:::frontend
    end

    subgraph "Processing Layer"
        preprocessor["leafdetectionALLmix.py"]:::logic
        classifier["classifier.py"]:::logic
    end

    subgraph "Data Layer"
        data1[(Datasetinfectedhealthy.csv)]:::data
        data2[(Datasetunlabelledlog.csv)]:::data
    end

    User(("User")):::frontend

    User -->|"Interacts with"| designUI
    designUI -->|"UI events"| guiDriver
    guiDriver -->|"Delegates to"| mainPY
    mainPY -->|"Calls"| preprocessor
    preprocessor -->|"Extracts FeatureVector"| classifier
    classifier -->|"Reads labels"| data1
    classifier -->|"Writes log"| data2
    classifier -->|"Returns Prediction"| mainPY
    mainPY -->|"Updates GUI"| guiDriver

    click designUI "https://github.com/harshalakkaraju/leaf-disease-detection-using-svm/blob/main/design.ui"
    click designPY "https://github.com/harshalakkaraju/leaf-disease-detection-using-svm/blob/main/design.py"
    click guiDriver "https://github.com/harshalakkaraju/leaf-disease-detection-using-svm/blob/main/GUIdriver.py"
    click mainPY "https://github.com/harshalakkaraju/leaf-disease-detection-using-svm/blob/main/main.py"
    click preprocessor "https://github.com/harshalakkaraju/leaf-disease-detection-using-svm/blob/main/leafdetectionALLmix.py"
    click classifier "https://github.com/harshalakkaraju/leaf-disease-detection-using-svm/blob/main/classifier.py"
    click data1 "https://github.com/harshalakkaraju/leaf-disease-detection-using-svm/blob/main/Datasetinfectedhealthy.csv"
    click data2 "https://github.com/harshalakkaraju/leaf-disease-detection-using-svm/blob/main/Datasetunlabelledlog.csv"

    classDef frontend fill:#bbdefb,stroke:#333,stroke-width:1px
    classDef logic fill:#c8e6c9,stroke:#333,stroke-width:1px
    classDef data fill:#ffe0b2,stroke:#333,stroke-width:1px
```
