# 🌱 AgriGuard Autonomous ML Service
**An End-to-End Autonomous Foliage Pathology Classification & Retraining Pipeline**
Live Demo Url
---
## đź“– Project Overview
AgriGuard is an autonomous, production-grade computer vision service engineered to classify plant foliage diseases from non-tabular image data (PlantVillage dataset). The system transitions a static convolutional neural network into a resilient cloud architecture featuring:
* **Real-time Single Prediction API:** Sub-second diagnosis across *Healthy*, *Early Blight*, and *Late Blight* Tomato classes.
* **3-Biomarker Feature Storytelling Engine:** Automatically extracts and visualizes physical pathology ratios (HSV Chlorosis degradation, Canny edge structural fragmentation, and Otsu necrotic lesion surface area) to explain *why* the neural network made its decision.
* **Autonomous Background Retraining:** An interactive UI control where users stage bulk zip dataset uploads and trigger asynchronous fine-tuning cycles without causing server downtime or API blocking.
* **Horizontal Docker Scaling & Load Balancing:** Containerized with FastAPI, Uvicorn, and Nginx reverse-proxy load balancing to handle thousands of concurrent IoT field sensor requests.
---
## 🗂️ Repository Directory Structure
Strictly structured according to production ML engineering standards:
```text
plantdisease/
├── README.md # Comprehensive project documentation & results
├── docker-compose.yml # Multi-container scaling & Nginx load balancer
├── locustfile.py # High-concurrency IoT stress simulation script
├── backend/
│ ├── Dockerfile # Keras 3 / FastAPI container blueprint
│ ├── requirements.txt # Pinned Python ML dependencies
│ ├── main.py # Asynchronous API routes & background task handlers
│ ├── src/
│ │ ├── preprocessing.py # Byte decoding & 3-biomarker feature extraction
│ │ ├── model.py # Keras 3 auto-discovery & fine-tuning engine
│ │ └── pred …