Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Cassava Disease Detection System 🌿

Lightweight deep learning pipeline that detects cassava leaves, classifies the five major cassava diseases (CBB, CBSD, CGM, CMD, Healthy), estimates severity and yield loss, and generates treatment recommendations — including optional LLM-powered farmer advisory via Ollama (llama3.1:8b).

Features

  • YOLOv8n leaf detection + attention-enhanced CNN classification
  • Severity estimation with estimated yield loss per diagnosis
  • Streamlit app: image upload / live camera, GPS extraction from EXIF, multi-language recommendations, diagnosis history (SQLite) with map & analytics
  • LLM advisory mode (Ollama) — falls back to rule-based advice when unavailable

Project structure

├── src/
│   ├── app.py                 # Streamlit demo app
│   ├── detection/             # YOLO detector training + ROI extraction
│   ├── classification/        # Classifier model + training
│   ├── pipeline/              # End-to-end detect → classify pipeline
│   ├── recommendations.py     # Rule-based + LLM recommendation engine
│   ├── database.py            # Diagnosis history (SQLite) + GPS/EXIF
│   └── severity.py            # Severity / yield-loss estimation
├── models/                    # Trained weights (detector + classifier)
├── configs/                   # Training configs
├── doc/                       # Thesis documentation
├── Dockerfile                 # Container deployment
└── requirements.txt

Run locally

python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
streamlit run src/app.py

Optional LLM recommendations (Ollama):

ollama pull llama3.1:8b && ollama serve

Docker

docker build -t cassava-detection .
docker run -p 8501:8501 cassava-detection

Deploy on Streamlit Community Cloud

  1. Push this repo to GitHub.
  2. Go to share.streamlit.io → New app → select Innovativcode/cassava-detection, branch main, main file src/app.py.
  3. Deploy — dependencies install from requirements.txt automatically.

Note: the Ollama LLM feature is unavailable in the cloud sandbox; the app automatically falls back to the built-in rule-based recommendations.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages