HCRP-YOLO: A lightweight algorithm for potato defect detection - Haojie Liao; Guanping Wang; Siyu Jin; Yan Liu; Wei Sun; Sen Yang; Lu Wang (Smart Agricultural Technology)
The external quality of potato significantly impacts its commercial value, particularly deformities and other visible defects. However, this aspect is currently largely reliant on manual visual inspection, which is labor-intensive and costly. Therefore, it is an urgent need for precise and efficient automated detection technologies. In recent years, deep-learning based object detection algorithms have gained significant attention in agriculture. The industry continuously pursues simpler model architectures, higher detection accuracy, lightweight operation and faster decision-making. In response, this study proposes HCRP-YOLO system, which is based on the YOLOv8n architecture and aims to further enhance lightweight, precision, and efficiency. The method first introduces the lightweight HGNetv2 backbone network and incorporates a channel scaling feature to reduce model complexity, while dynamically adjusting the number of feature channels, thereby improving detection performance. Secondly, the CCFM design paradigm is applied to the neck network, which is lightweight and can better handle cross-scale feature information to improve the detection ability of small objects. More importantly, a novel detection head module, RHead is designed, a reparameterization mechanism is introduced to realize the dynamic decoupling of the network architecture between the training phase and the inference phase. Finally, the Group Slimming-based model pruning technique is applied for the second round of lightweight design for the improved model. The test data show that, compared with the YOLOv8n, the R and mAP of HCRP-YOLO are increased by 4.2 % and 1.1 % respectively; the number of parameters, calculation amount and model size are reduced to 0.31 M, 1.2 G and 0.86 MB, respectively, with compression ratio 9.7, 6.8 and 6.9 times, separately. Most importantly, the FPS skyrocketed to 182.7 %.Therefore, the HCRP-YOLO algorithm achieves a better balance between detection accuracy, speed, and lightweight design, providing stronger support for high-precision and real-time detection on edge devices.