kd8811's picture
Update README.md
2b48e2c verified

A newer version of the Streamlit SDK is available: 1.57.0

Upgrade
metadata
title: Tea Disease Detector
emoji: πŸƒ
colorFrom: red
colorTo: blue
sdk: streamlit
sdk_version: 1.44.1
app_file: app.py
pinned: false
license: apache-2.0
short_description: AI-powered tea disease detector.

Tea Disease Detector πŸƒ

Python
TensorFlow
Streamlit
Hugging Face
License


This project provides a cloud-deployed deep learning application that can automatically detect and classify tea leaf diseases from uploaded or captured images. It is designed for researchers, tea growers, and agricultural practitioners who need quick insights into plant health.


🌱 Supported Classes

The model classifies four categories:

  • gl β†’ Green Leaf (Healthy)
  • rr β†’ Red Rust
  • rsm β†’ Red Spider Mite
  • bb β†’ Brown Blight

Each detection is accompanied by a disease description and the prediction confidence.


🧠 Model Details

  • Model format: TensorFlow Lite (.tflite)
  • Architecture: Custom CNN-based two-stage pipeline
  • Optimized for lightweight deployment and fast inference
  • Input size: 640 Γ— 640
  • Output: Probability distribution across four classes

The .tflite models are hosted directly in the Hugging Face dataset repository and fetched automatically at runtime.


πŸ“Š Dataset

The training dataset is available on Hugging Face:
πŸ”— TeaLeafNet Dataset


πŸš€ Deployment

This application has been deployed on two platforms:

  1. Streamlit Cloud
    πŸ”— Tea Disease Detector (Streamlit Cloud)

  2. Hugging Face Spaces
    πŸ”— Tea Disease Detector (Hugging Face)

Both deployments run the same Streamlit app.py, ensuring consistent results.


πŸ–₯️ Features

  • πŸ“€ Upload images (jpg, jpeg, png)
  • πŸ“· Capture leaf image using webcam
  • ⚑ Real-time disease detection with probability scores
  • πŸ“‘ Disease-specific descriptions
  • 🌐 Works on both Hugging Face Spaces and Streamlit Cloud

πŸ› οΈ Local Installation & Usage

To run the app locally:

1. Clone the repository

git clone https://github.com/your-username/tea-disease-detector.git
cd tea-disease-detector

### 2. Install dependencies
```bash
pip install -r requirements.txt

### 3. Run Streamlit app
```bash
streamlit run app.py

The app will be available at http://localhost:8501/

## πŸ“¦ Requirements

The app uses the following main libraries:

- streamlit

- tensorflow

- opencv-python-headless

- numpy

## πŸ“œ License

This project is licensed under the Apache 2.0 License.

## πŸ™Œ Acknowledgements

- Dataset: TeaLeafNet

- Deployment: Hugging Face Spaces
 & Streamlit Cloud

-- Developed by: Debashis Dey