Keypoint Detection and Diameter Estimation of Cabbage (brassica Oleracea L.) Heads under Varying Occlusion Degrees Via Yolov8n-Ck Network
Jinming Zheng,Xiaochan Wang,Yinyan Shi,Xiaolei Zhang,Yao Wu,Dezhi Wang,Xuekai Huang,Yanxin Wang,Jihao Wang,Jianfei Zhang
DOI: https://doi.org/10.1016/j.compag.2024.109428
IF: 8.3
2024-01-01
Computers and Electronics in Agriculture
Abstract:Accurate and rapid estimation of cabbage head diameters is critical for precise decision-making in cabbage-harvesting equipment, thereby ensuring the quality of cabbage head harvesting. However, mature cabbage heads are enveloped by layers of outer leaves, resulting in varying degrees of occlusion, which poses significant challenges for direct detection and diameter measurement of cabbage heads. To address this problem, this study proposes a method based on the keypoint of cabbage head for estimating cabbage head diameters with different degrees of occlusion in the field. An improved deep learning model, YOLOv8n-Cabbage Keypoints (YOLOv8nCK), is introduced to accurately and rapidly detect the keypoints of cabbage heads. Specifically, to enhance the attention of the network to occluded cabbage head features in complex images, the convolutional block attention module (CBAM) is introduced in the backbone, thereby improving the accuracy of the model in detecting the keypoints of occluded cabbage heads. Moreover, to balance the accuracy and speed of the keypoint detection network, all the Conv modules of the C2f-Bottleneck structure are replaced by Ghost modules, which effectively reduces the number of parameters in the model while maintaining its accuracy and reducing the computational complexity. Based on the results of keypoints detection, the physical diameter of cabbage heads is computed by integrating the depth information of the effective keypoints using a histogram filtering algorithm. The experimental results show that for varying degrees of occlusion, YOLOv8n-CK achieves an average precision (AP50-95) of 99.2 % in detecting cabbage head keypoints, with 12.68 % and 13.04 % reductions in the params and floating point operations per second, respectively, compared to the original model. The mean absolute percentage error of the cabbage head diameter estimation model is 4.28 +/- 0.13 %, and it exhibits favorable performance even under heavy occlusion (occlusion rate >65 %). Validation on an edge computing device shows that the model achieves 142.6 frames per second, which satisfies the real-time diameter estimation requirements for cabbage heads. These findings confirm the effective in-situ measurement of cabbage head diameters in the field, offering innovative insights for the development of efficient and low-damage harvesting equipment for cabbage.