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:
yaml
1# Key Training Parameters2task: detect
3model: yolov8s.pt
4data: cauli_disease-3/data.yaml
56# Training Setup7epochs:2008batch:329imgsz:64010optimizer: auto
11pretrained:true12amp:true13seed:014deterministic:true1516# Optimization17lr0:0.0118momentum:0.93719weight_decay:0.000520warmup_epochs:3.02122# Validation & Inference23iou:0.724max_det:30025split: val
2627# Augmentation28mosaic:1.029fliplr:0.530auto_augment: randaugment
3132# Tracking & Output33tracker: botsort.yaml
34save_dir: runs/detect/train2
35
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).
1from ultralytics import YOLO
23model = YOLO("weights/best.pt")4results = model("image.jpg", conf=0.25)56# Display or save results7results[0].show()8results[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: