CDIApp / README.md
sdutta28's picture
Updated README
3c7a58d
|
raw
history blame
2.51 kB
metadata
title: CDIApp
emoji: πŸ†
colorFrom: red
colorTo: blue
sdk: gradio
sdk_version: 5.4.0
app_file: app.py
pinned: false
license: apache-2.0

Plant Disease Classification and Remedy System

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.

A deep learning-based system that identifies plant diseases from images and provides remedies using AI.

Features

  • 🌿 Identifies 38 different plant diseases across various crops
  • πŸ” Uses advanced deep learning models for accurate disease detection
  • πŸ€– Integrates with Gemini AI for providing detailed remedies
  • 🎯 Includes Out-of-Distribution detection for reliable predictions
  • πŸ–₯️ User-friendly Gradio web interface

System Requirements

  • Python 3.8+
  • CUDA-compatible GPU (optional, for faster inference)
  • 4GB+ RAM

Installation

  1. Clone the repository:

  2. Install dependencies:

pip install -r requirements.txt
  1. Set up environment variables: Create a .env file in the root directory and add:
GEMINI_API_KEY=your_gemini_api_key_here

Project Structure

β”œβ”€β”€ acfg/               # Application configuration
β”œβ”€β”€ ml/                 # Machine learning modules
β”‚   β”œβ”€β”€ app/           # Core ML application code
β”‚   └── input/         # Dataset directory
β”œβ”€β”€ service/           # Backend service
└── static/           # Model checkpoints and static files

Usage

Running the Web Interface

python app.py

Access the interface at http://localhost:7860

Training Models

  1. Train the classification model:
python train_classifier.py
  1. Train the OOD detection model:
python train_ood.py

Model Architecture

  • Classification: MobileNetV3 Small with custom MLP head
  • OOD Detection: Custom Autoencoder architecture
  • LLM Integration: Gemini 1.5 Flash for remedy generation

Dataset

The system is trained on a comprehensive dataset of plant disease images, covering:

  • Multiple crop types (Apple, Corn, Tomato, etc.)
  • Various disease conditions
  • Healthy plant samples

Contributing

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