Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Dutta-SD/CropDiseasePredictionApp

Repository files navigation

title emoji colorFrom colorTo sdk sdk_version app_file pinned license
CDIApp
🏆
red
black
gradio
5.4.0
app.py
false
apache-2.0

Plant Disease Classification

Generated by Claude. editiing!!

This is a deep learning project for classifying plant diseases from images. It uses a convolutional neural network trained on a dataset of plant disease images.

Features

  • Train a disease classification model on your own dataset
  • Evaluate model performance on a test set
  • Run inference on new images through a web interface

Installation

  1. Clone the repository:
git clone https://github.com/username/plant-disease-classifier.git
  1. Install dependencies:
cd plant-disease-classifier
pip install -r requirements.txt

Usage

Data Preparation

Organize your image data into folders for each disease class, for example:

data/
  healthy/
    image1.jpg
    image2.jpg
    ...
  disease_a/
    image1.jpg
    image2.jpg
    ...
  disease_b/
    ...

Training

To train the model, run:

python train_classifier.py --data_dir data/

This will save the trained model to the models/ directory.

Evaluation

Evaluate the model on a test set:

python evaluate.py --data_dir data/test/ --model models/classifier.pth

This will print the classification metrics.

Inference

To launch the web interface for running inference on new images:

python app.py

Then open http://localhost:5000 in your web browser. You can upload images and see the predicted disease class.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

This project is licensed under the MIT License.