作者
Xinyi Ma,Zepu Hao,Shuangyin Liu,Jingbin Li
摘要
Aiming at the challenges in practical production lines, including the difficulty in accurately capturing external defects on continuously rolling walnuts, distinguishing subtle defects, and differentiating narrow fissures from natural walnut textures, this paper proposes an improved walnut external defect detection model named YOLO11-GME, based on YOLO11n. Firstly, the original backbone network is replaced with the lightweight GhostNetV1 network, enhancing model precision while meeting real-time detection speed requirements. Secondly, a Mixed Local Channel Attention (MLCA) mechanism is incorporated into the neck to strengthen the network’s ability to capture features of subtle defects, thereby improving defect recognition accuracy. Finally, the EIoU loss function is adopted to enhance the model’s localization capability for irregularly shaped defects and reduce false detection rates by improving the scale sensitivity of bounding box regression. Experimental results demonstrate that the improved YOLO11-GME model achieves a mean Average Precision (mAP) of 96.2%, representing improvements of 8.6%, 7%, and 5.8% compared to YOLOv5n, YOLOv8n, and YOLOv10n, respectively, and a 5.9% improvement over the original YOLOv11. Precision rates for the normal, fissure, and inferior categories increased by 8.7%, 5.3%, and 3.7%, respectively. The frame rate remains at 43.92 FPS, approaching the original model’s 51.02 FPS. These results validate that the YOLO11-GME model enhances walnut external defect detection accuracy while maintaining real-time detection speed, providing robust technical support for defect detection and classification in industrial walnut production.