Spaces:
Sleeping
Sleeping
File size: 1,601 Bytes
2086b03 5ee3b23 2086b03 5ee3b23 2086b03 5ee3b23 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
---
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.
--- |