基于改进YOLOv8n的不同栽培模式下玉露香梨轻量化检测

    Lightweight detection method of 'Yuluxiang' pear under different cultivation modes based on improved YOLOv8n

    • 摘要: 为了提高不同栽培模式下玉露香梨果实智能检测准确率,针对果实定位精度差、漏检和误检等问题,该研究基于YOLOv8n提出了一种轻量化检测方法YOLO-iBPD。首先,将主干网络中的C2f模块替换为高效的C2fi模块,以增强模型的特征提取能力和表达能力。其次,在颈部网络中引入优化后的双向特征金字塔网络(Bi-directional Feature Pyramid Network,BiFPN),以提高对不同尺度目标的检测能力。然后,更改边界框损失函数为PIoUv2,以增强对果实信息的聚焦能力。最后,通过知识蒸馏进一步提高模型的泛化能力和精度。试验结果表明,YOLO-iBPD模型尺寸为3.34 MB,推理时间达1.4 ms,平均精度(Average Precision,AP)为93.32%,定位误差(Localization error,Loc)、背景误差(Background Error,Bkg)和漏检(Missed ground truth error,Miss)的值分别为1.22、2.78和1.04,改进后的模型尺寸缩小为YOLOv8n的56.04%,推理时间快了0.3 ms,AP提升了1.07个百分点,Loc、Bkg和Miss分别降低了0.32、0.52和0.17。相较于YOLOv3-Tiny、YOLOv4-Tiny、YOLOv5n、YOLOv7-Tiny、YOLOv9s、YOLOv10s和YOLOv11n主流轻量化模型,YOLO-iBPD性能最优。该模型在轻量化的基础上提高了玉露香梨果实的检测精度,在不同栽培模式和光照条件下均展现出良好的稳定性和鲁棒性,为采摘机器人实现精准定位和高效采摘提供理论依据。

       

      Abstract: To improve the intelligent detection accuracy of 'Yuluxiang' pear fruit under different cultivation modes, a lightweight detection method, YOLO-iBPD, based on YOLOv8n, was proposed in this study to address problems such as poor fruit positioning accuracy, missed detection and false detection. Firstly, the C2f module in the backbone network is replaced with a more efficient C2fi module to enhance the model's feature extraction and expression capabilities. Secondly, the optimized Bi-directional Feature Pyramid Network (BiFPN) is introduced into the neck network to improve the detection ability of targets at different scales. Then, change the bounding box loss function to PIoUv2 to enhance focus on fruit information. Finally, knowledge distillation is employed to further improve the model's generalization ability and precision. In this study, a total of 4234 images were collected as the 'Yuluxiang' pear dataset, which was divided into 2965 training sets, 846 validation sets, and 423 test sets according to a ratio of 7:2:1. The test results show that the F1 score and average precision (AP) of the C2fi module YOLOv8n-ib in the backbone network were increased by 0.13 and 0.25 percentage points, respectively, and the model size was reduced by 0.69 MB. The ablation test verified the effectiveness of different strategies in the detection of 'Yuluxiang' pear. Yolov8n-ibp reached 88.60% and 92.89% on F1 and AP, respectively. Compared with YOLOv8n, the Localization error (Loc), Background Error (Bkg) and Missed ground truth error (Miss) rates decreased by 0.1, 0.36 and 0.17, respectively. The size of the YOLO-iBPD model obtained by knowledge distillation was 3.34 MB, the inference time was 1.4 ms, the AP was 93.32%. The values of Loc, Bkg, and Miss were 1.22, 2.78, and 1.04, respectively. The size of the improved model was reduced to 56.04 percentage point of YOLOv8n. Inference time was 0.3 ms faster, AP was increased by 1.07 percentage point, Loc, Bkg and Miss were reduced by 0.32, 0.52 and 0.17 respectively. In High stem open-centre pear tree-Daytime (HPD), Double-armed parallel pear tree-Daytime (DPD), High stem open-centre pear tree-Nighttime (HPN) and Double-armed parallel pear tree-Nighttime (DPN) scenarios, the AP of YOLO-iBPD was 2.57, 1.06, 0.13 and 0.13 percentage points higher than that of YOLOv8n, respectively. The AP of YOLO-iBPD during the daytime and nighttime was 1.87 and 0.1 percentage points higher than that of YOLOv8n, respectively. Comparing the detection effect of different cultivation modes, the AP of YOLO-iBPD in High stem open-centre pear tree (HP) and Double-armed parallel pear tree (DP) modes were increased by 1.53 and 0.6 percentage points respectively. Compared with the mainstream lightweight models, YOLOv3-Tiny, YOLOv4-Tiny, YOLOv5n, YOLOv7-Tiny, YOLOv9s, YOLOv10s and YOLOv11n, The AP of YOLO-iBPD was improved by 3.08, 0.57, 1.14, 1.69, 0.06, 1.28 and 1.49 percentage points, respectively. On the basis of lightweight model, this study improved the detection accuracy of 'Yuluxiang' pear fruit, and showed good stability and robustness under different cultivation modes and lighting conditions, and realized the real-time intelligent detection of 'Yuluxiang' pear fruit. This provides a theoretical basis for the accurate positioning and efficient picking of the picking robot, and promotes the intelligent and refined development of orchard management.

       

    /

    返回文章
    返回