Skip to content

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.

License

Notifications You must be signed in to change notification settings

RohitXJ/CropCure-Plant-Disease-Classifier-using-MobileNetV2

Repository files navigation

🌿 CropCure: Plant Disease Classifier using MobileNetV2

📉 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.


📌 Project Highlights

  • 🔍 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

📁 Dataset

This dataset includes thousands of labeled leaf images of various crops with healthy and diseased states.


🧠 Model Details

  • 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

🚀 Running the App

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.


🖼️ Using the App

Once launched, just upload a leaf image and the app will:

  1. Preprocess it (resize, normalize)
  2. Predict the disease using MobileNetV2
  3. Show the class name and prediction confidence

📂 Project Structure

🔹 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

🔧 Requirements

See requirements.txt for all dependencies.


📜 License

MIT License.
You are free to use, modify, and distribute the code with or without attribution, with minimal restrictions.


🤝 Acknowledgements


🔗 Author

Made with ❤️ by Rohit Gomes

About

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.

Resources

License

Stars

Watchers

Forks