π₯¦ Cauliflower Disease Detection β YOLOv8 Model
π Overview
This repository hosts a trained YOLOv8 object detection model for identifying cauliflower leaf diseases and stress conditions from images.
The model was trained on a curated, multi-class agricultural dataset and is suitable for:
- Automated crop disease detection
- Smart agriculture & decision support systems
- Mobile and edge inference
- Research in plant pathology & computer vision
The model detects five distinct disease categories from field images and outputs bounding boxes and class labels.
π§ Model Summary
| Attribute | Value |
|---|---|
| Task | Object Detection |
| Architecture | YOLOv8-Small |
| Framework | PyTorch (Ultralytics YOLOv8) |
| Input Size | 640 Γ 640 |
| Classes | 5 |
| Training Epochs | 200 |
| Precision | FP32 |
| Export Format | TorchScript |
π·οΈ Supported Classes
| Class ID | Disease / Condition |
|---|---|
| 0 | alternaria_leaf_spot |
| 1 | black_rot |
| 2 | downey_mildew |
| 3 | insect_infested |
| 4 | nutrient_deficiency |
βοΈ Training Configuration
The model was trained using Ultralytics YOLOv8. The exact training arguments used are listed below:
# Key Training Parameters
task: detect
model: yolov8s.pt
data: cauli_disease-3/data.yaml
# Training Setup
epochs: 200
batch: 32
imgsz: 640
optimizer: auto
pretrained: true
amp: true
seed: 0
deterministic: true
# Optimization
lr0: 0.01
momentum: 0.937
weight_decay: 0.0005
warmup_epochs: 3.0
# Validation & Inference
iou: 0.7
max_det: 300
split: val
# Augmentation
mosaic: 1.0
fliplr: 0.5
auto_augment: randaugment
# Tracking & Output
tracker: botsort.yaml
save_dir: runs/detect/train2
Training outputs and intermediate artifacts were saved under runs/detect/train2/.
π Dataset
- Dataset: Cauliflower Disease Detection Dataset
- Annotation Format: YOLO
- Classes: 5 (see Supported Classes)
- License: CC BY 4.0
The dataset contains real-field cauliflower leaf images annotated with bounding boxes for disease localization. The dataset used during training is referenced in data above (cauli_disease-3/data.yaml).
π Inference Usage
Using Ultralytics CLI
yolo detect predict \
model=weights/best.pt \
source=your_image.jpg \
imgsz=640
Python Inference Example
from ultralytics import YOLO
model = YOLO("weights/best.pt")
results = model("image.jpg", conf=0.25)
# Display or save results
results[0].show()
results[0].save(save_dir='inference_results')
Notes:
- Set
conf(confidence) threshold to trade off precision vs. recall. - For batch or directory inference, pass a folder path to
source.
π¦ Repository Contents (suggested)
.
βββ best.pt # Best trained weights (model for inference)
βββ last.pt # Final checkpoint from training
βββ args.yaml # Training configuration
βββ results.png # Training curves / metrics plot
βββ README.md # This documentation file
π Performance Notes
- Trained with data augmentation options enabled during training.
- Early stopping monitored with patience = 100.
- IoU threshold set to 0.7 during validation.
Exact evaluation metrics (mAP@0.5, precision, recall) should be calculated on a held-out test set and can be added to this README once available.
π Deployment Use Cases
- Smart farming dashboards
- Mobile crop monitoring applications
- Drone-based field inspection
- Agricultural advisory systems
- Edge AI inference pipelines (ONNX / TensorRT conversions possible)
π License
This model and its training outputs are released under the MIT license. Attribution is required for use in publications or products.
π Citation
If you use this model in academic or applied work, please cite the model and dataset:
@model{cauliflower_yolov8_detector,
title={YOLO based Cauliflower Disease Detection Model},
author={Indra Prasad Sapkota},
year={2025},
url={https://huggingface.co/Bishal17/plant_care}
}
π€ Acknowledgements
- Model trained using Ultralytics YOLOv8.
- Dataset annotation and preprocessing assisted by Roboflow or similar annotation tools.
- Model hosting by Hugging Face (recommended).
π¬ Contact & Contributions
Contributions are welcome (issues / PRs). Possible contributions:
- Performance benchmarks and evaluation reports
- Edge optimization (quantized, ONNX, TensorRT)
- Additional datasets and annotated examples
For contributions or questions, open an issue on the repository or contact the maintainer listed on the Hugging Face project page.