CoolFace
Apppublic

Hs8h/PlntDesNeo

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
App README

๐ŸŒฟ Plant Disease Detection

This project provides a deep learning-based solution to detect and classify diseases in plant leaves. The core of the system is a pre-trained neural network model fine-tuned on a custom dataset of plant images. The project also includes a user-friendly web application built with Gradio, allowing anyone to upload an image and get an instant disease prediction. This version is specifically configured for deployment on Hugging Face Spaces.


๐Ÿš€ Getting Started

To get the project running on your local machine or to deploy it on Hugging Face Spaces, follow these steps.

Prerequisites

You'll need to have Python 3.8 or newer and pip installed.

Installation

  1. 1.Clone the repository from GitHub:
bash
    git clone [https://github.com/samalhitesh8-sudo/PLANTAE.git](https://github.com/samalhitesh8-sudo/PLANTAE.git)
  1. 1.Navigate into the project directory:
bash
    cd PLANTAE
  1. 1.Install all the required Python libraries using the requirements.txt file:
bash
    pip install -r requirements.txt

๐Ÿ’ก Usage

Running the Gradio Web Application

The easiest way to use the model is through the Gradio web application.

  1. 1.Start the Gradio app from the project's root directory:
bash
    python app.py
  1. 1.Your default web browser will automatically open and navigate to the application. If not, open your browser and go to the local URL provided in the terminal output (e.g., http://127.0.0.1:7860).
  2. 2.Upload an image of a plant leaf. The application will use the pre-trained model to predict the disease and display the result on the screen.

Retraining the Model

If you have a new dataset or want to improve the model, you can retrain it.

  1. 1.Place your new image dataset inside the data/dataset/ folder. Make sure the directory structure is suitable for the training script (e.g., organized into subfolders by class).
  2. 2.Run the training script:
bash
    python model/model_training.py

This script will train a new model and save it as saved_model.h5 in the model/ directory, overwriting the old one.


๐Ÿ“ Project Structure

  • โ€”app.py: The main Gradio application that serves the web interface.
  • โ€”model/: Contains the trained deep learning model (saved_model.h5) and the script used for training (model_training.py).
  • โ€”data/: Holds the dataset of plant images.
  • โ€”requirements.txt: Lists all Python dependencies required for the project.

๐Ÿค Contributing

We welcome contributions! If you'd like to help, please follow these steps:

  1. 1.Fork the repository.
  2. 2.Create your feature branch (git checkout -b feature/your-feature-name).
  3. 3.Commit your changes (git commit -m 'feat: Add a new feature').
  4. 4.Push to the branch (git push origin feature/your-feature-name).
  5. 5.Open a Pull Request.