Abstract
Accurate and rapid identification of the effective number of panicles per unit area is crucial for the assessment of rice yield. As part of agricultural development, manual observation of effective panicles in the paddy field is being replaced by unmanned aerial vehicle (UAV) imaging combined with target detection modeling. However, UAV images of panicles of curved hybrid Indica rice in complex field environments are characterized by overlapping, blocking, and dense distribution, imposing challenges on rice panicle detection models. This paper proposes a universal curved panicle detection method by combining UAV images of different types of hybrid Indica rice panicles (leaf-above-spike, spike-above-leaf, and middle type) from four ecological sites using an improved You Only Look Once version 4 (YOLOv4) model. MobileNetv2 is used as the backbone feature extraction network based on a lightweight model in addition to a focal loss and convolutional block attention module for improved detection of curved rice panicles of different varieties. Moreover, soft non-maximum suppression is used to address rice panicle occlusion in the dataset. This model yields a single image detection rate of 44.46 FPS, and mean average precision, recall, and F1 values of 90.32%, 82.36%, and 0.89%, respectively. This represents an increase of 6.2%, 0.12%, and 16.24% from those of the original YOLOv4 model, respectively. The model exhibits superior performance in identifying different strain types in mixed and independent datasets, indicating its feasibility as a general model for detection of different types of rice panicles in the heading stage.
The Challenge of Rice Panicle Detection
Accurately counting rice panicles—the grain-bearing clusters of the plant—is essential for predicting crop yield and informing breeding programs. While Unmanned Aerial Vehicles (UAVs) offer a high-throughput alternative to labor-intensive manual counting, the "curved" morphology of hybrid Indica rice presents a significant computer vision challenge.
In a typical paddy field, panicles are often:
- Occluded: Hidden beneath "sword leaves" (leaf-above-spike type).
- Overlapping: Densely packed, making it hard for standard algorithms to distinguish individual clusters.
- Variable: Morphologies differ across varieties, including spike-above-leaf and middle types.
Existing models like standard YOLOv4 or Faster-RCNN often struggle with these dense and blocked scenarios, either missing panicles entirely or misidentifying overlapping ones as a single unit.
Methodology: An Optimized YOLOv4 Architecture
To address these challenges, researchers developed an improved, lightweight YOLOv4 model specifically designed for complex field environments. The architecture incorporates four key modifications:
- Lightweight Backbone: The heavy CSPDarknet53 was replaced with MobileNetv2. This reduces the parameter count, making the model suitable for deployment on mobile devices or edge computing hardware on drones.
- Attention Mechanism (CBAM): The integration of the Convolutional Block Attention Module helps the model focus on relevant features (the panicles) while ignoring "noise" such as water reflections or complex leaf patterns.
- Focal Loss: To address the class imbalance between easy-to-see panicles and those partially hidden by leaves, Focal Loss forces the network to prioritize learning from hard-to-classify, occluded samples.
- Soft-NMS: Traditional Non-Maximum Suppression (NMS) often deletes overlapping bounding boxes if they are too close. Soft-NMS instead decays the confidence score of overlapping boxes, allowing the model to correctly identify multiple panicles in dense clusters.
Data Collection and Morphological Diversity
The study utilized a robust, multi-site dataset to ensure the model's "universality." UAV images were captured using a DJI Phantom 4 RTK flown at an altitude of 3 meters across four distinct ecological sites in Sichuan, China: Dayi, Shehong, Nanbu, and Chongzhou.
The dataset included multiple hybrid Indica rice varieties representing three distinct morphologies: leaf-above-spike, spike-above-leaf, and middle type. After data augmentation (including noise, sharpening, and emboss filters), the final dataset comprised 10,285 images. An independent dataset (Jingyou781) was used to verify the model's ability to generalize to unseen varieties.
Key Results and Performance
The improved model showed substantial gains over baseline architectures across several metrics:
- Mean Average Precision (mAP): Achieved 90.32%, a 6.2% increase over the original YOLOv4 and a 45.68% increase over Faster-RCNN.
- Recall: Reached 82.36%, representing a 16.24% improvement, indicating the model is significantly better at finding "hidden" panicles.
- Speed: Processed images at 44.46 FPS, well above the threshold for real-time processing.
- Counting Accuracy: In manual validation of 100 images, the model achieved R² values between 0.84 and 0.92 across different panicle types, significantly reducing the Root Mean Square Error (RMSE) compared to standard models.
Discussion and Future Directions
The study highlighted that morphology significantly impacts detection; the "leaf-above-spike" type remains the most challenging because panicles are naturally hidden. Researchers found that the optimal window for image acquisition is approximately 7 days after the full heading stage, before leaves turn yellow and blend in with the grain.
One primary limitation is the "yellowing" problem: accuracy drops to approximately 79.66% mAP during the maturity stage as leaves become visually indistinguishable from panicles. Additionally, in varieties with scattered spikelets, the model occasionally produces repeated detections for a single panicle. Future work will focus on optimizing the model for scattered spike types and exploring dynamic changes in panicle appearance throughout the entire heading-to-maturity window to create a more time-resilient detection tool.
Summary updated