Object Detection for Plant Diseases
While classification only tells us what disease might be in the image, object detection identifies both what the disease is and where it is located. Instead of returning one overall label, an object detector draws bounding boxes around individual leaves or diseased spots [1].
Why Localization Matters
A real outdoor photo often includes several leaves, soil, and weeds. Object detection finds and isolates each leaf so it can be analyzed individually, even in crowded foliage.
How YOLO Detection Works
YOLO (You Only Look Once) is a popular object detector because it processes images quickly in a single forward pass, making it well-suited for mobile and real-time use [1]:
- The image is divided into a grid. If an object's center falls within a grid cell, that cell predicts bounding box coordinates.
- For each object, YOLO predicts coordinates $(x, y, w, h)$, an objectness confidence score, and class probabilities: $$\mathbf{b} = (t_x, t_y, t_w, t_h, p_o)$$
- Modern YOLO versions (like YOLOv8) combine features from multiple scales to detect both large leaves and small individual lesions.
Detection Outputs
- Bounding box: Shows where the leaf or spot is in pixel coordinates $(x_{\min}, y_{\min}, x_{\max}, y_{\max})$.
- Class label: The disease category (e.g., Early Blight or Healthy Leaf).
- Confidence score: A number between 0 and 1 indicating how confident the model is in its prediction.
Classification vs. Object Detection
| Feature | Image Classification | Object Detection (YOLO) |
|---|---|---|
| Output | One global label for the whole image | Bounding boxes, labels, and confidence scores |
| Location | No spatial coordinates | Rectangular bounding box coordinates |
| Multiple Leaves | Cannot distinguish multiple leaves | Locates and labels multiple leaves separately |
| Speed | Very fast | Fast (capable of real-time 30+ FPS) |
Limitation of Bounding Boxes
While bounding boxes are great for finding leaves, they are still just rectangles. They include some healthy leaf tissue and background along with the disease spot. To measure the exact percentage of damaged leaf area, we need pixel-level segmentation.
Module Narration
A 1–2 minute audio overview of YOLO object detection principles, bounding-box localization, and edge performance.