Objective To address the challenges of small targets, severe occlusion, low distinction degree of maturity characteristics and limited computational resources on edge devices in pomegranate maturity detection under complex orchard environments, a lightweight real-time detection method that balanced detection accuracy and computational efficiency was developed.
Method Based on the YOLOv11n framework, a lightweight pomegranate maturity detection model named YOLOv11n-GSSE, was developed. Firstly, Ghost_HGNetV2 was introduced as the backbone network to reduce redundant features while improving feature extraction efficiency. Then, the parameter-free SimAM attention mechanism was integrated to enhance the representation of fine-grained features such as peel fissures and color variations. Finally, in the feature fusion stage, the SlimNeck structure was adopted to strengthen multi-scale feature interaction, and an Efficient_Detect head was designed to further reduce computational complexity. Meanwhile, 50% channel pruning was performed by using the LAMP algorithm, and a three-stage knowledge distillation strategy (teacher-teacher assistant-student) was applied to recover and optimize the performance of the compressed model. The verification experiments were conducted on a dataset containing 14 623 real orchard images.
Result Compared with SSD, Faster R-CNN, RT-DETR, YOLOv8n, and other models, YOLOv11n-GSSE achieved superior detection accuracy and computational efficiency, with an mAP0.5 of 93.6%. After pruning and knowledge distillation, the compressed model still maintained an mAP0.5 of 92.8%, while the number of parameters and computational cost were reduced to 3.5 M and 1.9 G, respectively. On the Jetson Xavier NX platform, the average end-to-end inference time was approximately 0.009 s (about 111 FPS). Visualization analysis showed that the improved model focused more accurately on target regions and exhibited stronger background suppression capability. In cross-dataset experiments on a rice disease dataset, the precision, recall, and mAP0.5 were improved by approximately 3.6, 3.8, and 2.4 percentage points, respectively, demonstrating good generalization ability.
Conclusion YOLOv11n-GSSE obviously reduces model complexity while maintaining high detection accuracy. The model demonstrates strong capabilities in recognizing pomegranate targets at different maturity stages under complex orchard conditions and can meet the requirements of real-time monitoring on edge devices, providing a feasible technical solution for intelligent management and precision harvesting of orchard.