Logo Lanfrica

michaelnkema1/crop-disease-detection

Domain:

agriculture

Record type:

modelsoftware
Creator:
mic
Host:
My internship project with the Council for Scientific and Industrial Research in Accra --- title: CropScan AI emoji: 🌿 colorFrom: green colorTo: emerald sdk: docker app_port: 7860 short_description: Detect 29 crop diseases from leaf photos using EfficientNet-B0 (99.56% accuracy) tags: - agriculture - computer-vision - image-classification - pytorch - efficientnet pinned: false --- # Crop Disease Detection 🌿 A CNN-based image classifier that detects **29 crop diseases** across 9 plant types using transfer learning with **EfficientNet-B0**. > **Test Accuracy: 99.56%** Β· Macro F1: 0.995 Β· 29 classes Β· 67,000+ images ## Results | Metric | Score | |--------|-------| | Test Accuracy | **99.56%** | | Macro Avg Precision | 99.6% | | Macro Avg Recall | 99.5% | | Macro Avg F1 | 99.5% | | Model size | ~19 MB | 25 out of 29 classes achieved a **perfect F1 score of 1.000**. The only misclassifications (6 total out of 1,354 test images) were between visually similar Corn leaf diseases. ## Supported Crops & Diseases | Crop | Conditions | |------|-----------| | Apple | Apple Scab, Black Rot, Cedar Apple Rust, Healthy | | Bell Pepper | Bacterial Spot, Healthy | | Cherry | Powdery Mildew, Healthy | | Corn (Maize) | Cercospora Leaf Spot, Common Rust, Northern Leaf Blight, Healthy | | Grape | Black Rot, Esca (Black Measles), Leaf Blight, Healthy | | Peach | Bacterial Spot, Healthy | | Potato | Early Blight, Late Blight, Healthy | | Strawberry | Leaf Scorch, Healthy | | Tomato | Bacterial Spot, Early Blight, Late Blight, Septoria Leaf Spot, Yellow Leaf Curl Virus, Healthy | ## Project Structure ``` crop-disease-detection/ β”œβ”€β”€ dataset/ ← Your dataset (Train/Val/Test splits) β”œβ”€β”€ src/ β”‚ β”œβ”€β”€ config.py ← Hyperparameters & paths β”‚ β”œβ”€β”€ dataset.py ← Dataset class & DataLoaders β”‚ β”œβ”€β”€ model.py ← EfficientNet-B0 transfer learning model β”‚ β”œβ”€β”€ train.py ← Two-phase training loop β”‚ β”œβ”€β”€ evaluate.py ← Test set evaluation & confusion matrix β”‚ └── predict.py ← Single-image inference CLI β”œβ”€β”€ outputs/ β”‚ …

Languages