📉 CropCure is a lightweight deep learning-based web app that can classify plant diseases from leaf images using the MobileNetV2 model. Designed to assist farmers, agriculturists, and researchers in identifying plant diseases early.
- 🔍 Model: Pretrained MobileNetV2 (transfer learning)
- 🏷️ Classes: 71 different plant disease categories
- 📊 Accuracy: Achieved 88.89% on the test dataset
- 💻 Interface: Built using Gradio
- 🧠 Framework: PyTorch
- Sourced from Kaggle:
👉 Plant Disease Classification (Merged Dataset)
This dataset includes thousands of labeled leaf images of various crops with healthy and diseased states.
- Architecture: MobileNetV2
- Strategy: Transfer Learning with final classification layer updated to 71 classes
- Optimized using Adam optimizer with CrossEntropyLoss
- Trained with image resizing and normalization
You can try it locally by cloning the repository and running:
git clone https://github.com/yourusername/cropcure.git](https://github.com/RohitXJ/CropCure-Plant-Disease-Classifier-using-MobileNetV2.git
cd cropcure
pip install -r requirements.txt
python app.py
Make sure you have mobilenetv2_pretrained.pth
and class_names.txt
in the same directory as app.py
.
Once launched, just upload a leaf image and the app will:
- Preprocess it (resize, normalize)
- Predict the disease using MobileNetV2
- Show the class name and prediction confidence
🔹 app.py # Gradio web app
🔹 mobilenetv2_pretrained.pth # Trained weights
🔹 class_names.txt # List of class names
🔹 requirements.txt
🔹 README.md
🔹 notebook/
└️ Workshop_MobileNetV2_Pre-Trained.ipynb
See requirements.txt
for all dependencies.
MIT License.
You are free to use, modify, and distribute the code with or without attribution, with minimal restrictions.
- Kaggle Dataset
- PyTorch
- Gradio
- Hugging Face Spaces for deployment
Made with ❤️ by Rohit Gomes