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

    Lightweight detection method for '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%,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: High accuracy of intelligent detection can often be required under different cultivation modes. In this study, a lightweight improved YOLOv8n (YOLO-iBPD) was proposed for the fruit positioning, in order to reduce the missed and false detection. The experimental material was taken as the 'Yuluxiang' pear. Firstly, the C2f module in the backbone network was replaced with the more efficient C2fi module, in order to enhance the feature extraction and expression of the improved model. Secondly, the Bi-directional Feature Pyramid Network (BiFPN) was optimized and then introduced into the neck network to improve the detection of targets at different scales. Then, the bounding box loss function was selected as the PIoUv2 to enhance the focus on fruit information. Finally, the knowledge distillation was also employed to further improve the generalization and precision of the improved model. A total of 4234 images were collected as the 'Yuluxiang' pear dataset. Then the dataset 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 increased by 0.13 and 0.25 percentage points, respectively, whereas, the model size was reduced by 0.69 MB. The ablation test was carried out to verify the effectiveness of different strategies during detection. The Yolov8n-iBP model reached 88.60% and 92.89% on the F1 and AP, respectively. The Localization error (Loc), Background Error (Bkg), and Missed ground truth error (Miss) rates decreased by 0.1, 0.36, and 0.17, respectively, compared with the YOLOv8n. Specifically, the size of the YOLO-iBPD model after knowledge distillation was 3.34 MB, the inference time was 1.4 ms, and the AP was 93.32%. The values of Loc, Bkg, and Miss were 1.22, 2.78, and 1.04, respectively. Compared with YOLOv8n,the model size of YOLO-iBPD was only 56.04%, the AP increased by 1.07 percentage points, whereas, the Loc, Bkg, and Miss were reduced by 0.32, 0.52, and 0.17, respectively. Furthermore, the AP values of YOLO-iBPD were 2.57, 1.06, 0.13 and 0.13 percentage points higher than those of YOLOv8n, respectively, in the scenarios of High stem open-center pear tree-Daytime (HPD), Double-armed parallel pear tree-Daytime (DPD), High stem open-center pear tree-Nighttime (HPN) and Double-armed parallel pear tree-Nighttime (DPN). The AP values of YOLO-iBPD during the daytime and nighttime were 1.87 and 0.1 percentage points higher than those of YOLOv8n, respectively. The AP values of YOLO-iBPD in the High-stem open-center pear tree (HP) and Double-armed parallel pear tree (DP) cultivation modes increased by 1.53 and 0.6 percentage points, respectively. The AP values of the YOLO-iBPD were improved by 3.08, 0.57, 1.14, 1.69, 0.06, 1.28 and 1.49 percentage points, respectively, compared with the mainstream lightweight models, such as the YOLOv3-Tiny, YOLOv4-Tiny, YOLOv5n, YOLOv7-Tiny, YOLOv9s, YOLOv10s and YOLOv11n. The lightweight improved model shared high stability and robustness under different cultivation modes and lighting conditions. The real-time, intelligent, and high accuracy was realized in the detection of 'Yuluxiang' pear fruits. This finding can provide a theoretical basis for the accurate positioning and efficient picking of harvesting robots, particularly for intelligent and refined management in orchards.

       

    /

    返回文章
    返回