--- title: 'CropGuard: Leaf Disease Detector' colorFrom: green colorTo: indigo sdk: gradio sdk_version: 5.27.1 app_file: app.py pinned: false --- # CropGuard: Leaf Disease Detector **CropGuard** is a lightweight, deployable machine learning app that detects **leaf diseases** in **Potato**, **Tomato**, and **Grape** plants from user-uploaded or captured images. Built using **PyTorch**, **Gradio**, **Docker**, and **Hugging Face Spaces**, it provides the following capabilities: - Upload or capture a leaf image - Predict plant health status - Identify likely disease (if any) - Visualize model attention using **GradCAM++** heatmaps - Provide quick disease information and treatment suggestions --- ## Project Structure ``` CropGuard/ ├── app.py # Gradio app ├── Dockerfile # Docker container definition ├── requirements.txt # Python dependencies ├── src/ # Source code (organized into modules) │ ├── app/ │ ├── data/ │ ├── model/ │ └── utils/ ├── sample_images/ # Few test images (optional for demo) ├── disease_info.json # Disease descriptions └── README.md # (this file) ``` ## License MIT License. --- ## Acknowledgments - **Dataset:** [PlantVillage Dataset](https://www.kaggle.com/datasets/mohitsingh1804/plantvillage) - **Base Model:** [MobileNetV2 (pretrained on ImageNet)](https://arxiv.org/abs/1801.04381) - **Visualization:** GradCAM++ --- ## Author Made by **[Arka Mitra](https://github.com/mitraarka27)** © 2025. ---