rld-v4 / README.md
zynt31's picture
Upload 7 files
81aba7b verified
metadata
title: Rice Disease Detection API v3
emoji: ๐ŸŒพ
colorFrom: green
colorTo: yellow
sdk: docker
pinned: false
license: mit
app_port: 7860

๐ŸŒพ Rice Disease Detection API v3

EfficientNet-B0 based rice leaf disease detection API

Features

  • ๐Ÿ”ฌ Detects 14 rice diseases + healthy plants
  • ๐ŸŽฏ ~89-93% accuracy using EfficientNet-B0
  • โœ… Rice leaf validation before disease detection
  • ๐Ÿš€ Fast inference with FastAPI

API Endpoints

Endpoint Method Description
/ GET API info
/health GET Health check
/status GET Model status
/validate-leaf/ POST Check if image is rice leaf
/predict/ POST Predict disease from image

Usage

Predict Disease

curl -X POST "https://YOUR-SPACE.hf.space/predict/" \
  -H "accept: application/json" \
  -F "file=@rice_leaf_image.jpg"

Response Example

{
  "is_rice_leaf": true,
  "disease": "rice_blast",
  "confidence": "92.45%",
  "recommendation": "Use resistant varieties...",
  "category": "Fungal",
  "severity": "Very High"
}

Diseases Detected

  1. Bacterial Leaf Blight
  2. Bacterial Leaf Streak
  3. Bakanae
  4. Brown Spot
  5. Grassy Stunt Virus
  6. Healthy Rice Plant
  7. Narrow Brown Spot
  8. Ragged Stunt Virus
  9. Rice Blast
  10. Rice False Smut
  11. Sheath Blight
  12. Sheath Rot
  13. Stem Rot
  14. Tungro Virus

Model Details

  • Architecture: EfficientNet-B0 (transfer learning from ImageNet)
  • Training: Custom dataset with 17,789 images
  • Framework: PyTorch 2.x

Project

Part of the SUMVILTAD Agricultural Management System.

License

MIT License