刘慧,郑鑫澎,沈跃,等. 基于改进YOLOv5s的苗圃内树苗及障碍物目标检测方法[J]. 农业工程学报,2024,40(22):1-9. DOI: 10.11975/j.issn.1002-6819.202406161
    引用本文: 刘慧,郑鑫澎,沈跃,等. 基于改进YOLOv5s的苗圃内树苗及障碍物目标检测方法[J]. 农业工程学报,2024,40(22):1-9. DOI: 10.11975/j.issn.1002-6819.202406161
    LIU Hui, ZHENG Xinpeng, SHEN Yue, et al. Target detection method for seedlings and obstacles in nurseries based on improved YOLOv5s[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2024, 40(22): 1-9. DOI: 10.11975/j.issn.1002-6819.202406161
    Citation: LIU Hui, ZHENG Xinpeng, SHEN Yue, et al. Target detection method for seedlings and obstacles in nurseries based on improved YOLOv5s[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2024, 40(22): 1-9. DOI: 10.11975/j.issn.1002-6819.202406161

    基于改进YOLOv5s的苗圃内树苗及障碍物目标检测方法

    Target detection method for seedlings and obstacles in nurseries based on improved YOLOv5s

    • 摘要: 为解决喷雾机器人在苗圃作业时对树苗、行人和栽培盆识别准确率低等问题,该研究提出一种基于改进YOLOv5s(you only look once version 5 small)的多目标检测方法。首先对骨干网络进行改进,将部分卷积(partial convolution,PConv)引入综合卷积模块(comprehensive convolution block,C3)中以减少网络模型计算量;在骨干网络最高维特征后添加坐标注意力机制(coordinate attention,CA)以提升位置感知精度;优化网络模型颈部结构并使用双线性插值进行上采样操作,增强模型特征提取能力;最后对原耦合检测头进行更换并优化检测部分的结构,使用改进的轻量化解耦头LD检测头(light decouple detection head)以进一步提升检测精度。试验结果表明,改进后模型的平均精度均值mAP0.5、mAP0.5:0.95、精确率、召回率分别达到88.2%、54.7%、86.0%和82.4%。与YOLOv5s模型相比,mAP0.5、mAP0.5:0.95、精确率、召回率分别提高4.6、5.9、1.8、3.4个百分点。改进模型在移动端部署后,识别需要避障的行人、盆以及需要作业的树苗的准确率较原模型分别提升了7.0、4.8和15.4个百分点。研究结果可为喷雾机器人在苗圃中的作业提供技术支撑。

       

      Abstract: With the increasing demand for fruit and ornamental trees, the area for nursery planting has expanded. Larger areas increase labor costs and pesticide demand; simple tools are insufficient for efficient work. The emergence of agricultural spray robot has reduced the amount of work of the relevant staff in time. To address the low recognition accuracy and target misidentification of spray robots in nurseries ,this study proposes a nursery target detection method based on an improved YOLOv5s(you only look once version 5 small). Firstly, the backbone network is improved, partial convolution (PConv) is introduced into the comprehensive convolution block (C3)to reduce the computational complexity and adding a coordinate attention mechanism at the highest dimensional feature to enhance location awareness. Secondly, the neck structure of the network model is optimized to enhance the feature extraction ability of the model. At the same time, the up-sampling process during training is optimized and bilinear interpolation is used for up-sampling operation. Finally, the original coupling detection head is replaced, and the improved light decouple detection head is used to further improve the detection accuracy. This study uses a self-constructed nursery data set, a total of 2000 pictures, including three representative objects: trees, pedestrians, cultivation pots. The image of the research objects are collected at varying distances (far, medium, and near) with pedestrians exhibiting various postures. The dataset includes a total of 5769 trees, 1688 pedestrians and 6178 pots in the data set. During the labeling process, only the trees and pots in the first row of operations are marked according to the operation requirements. Considering the safety of pedestrians, once pedestrians are detected, they must be identified, therefore, all pedestrians are labeled regardless of distance. The experimental results show that the detection ability of the model is improved differently by improving C3 module and adding coordinate attention mechanism, optimizing neck network structure and up-sampling mode, and using lightweight decoupling head. Finally, the average accuracy of mAP0.5 and mAP0.5:0.95, accuracy and recall reached 88.2%, 54.7%, 86.0% and 82.4%, respectively. The size of the improved network model is 14.1MB, the average detection speed of a single image is 19.5ms, and the average frame rate is 51.3 frames. Compared with the original YOLOv5s model algorithm, mAP0.5, mAP0.5:0.95, accuracy and recall are increased by 4.6, 5.9, 1.8 and 3.4 percentage points. Compared with the current mainstream single-stage target detection algorithms YOLOv3-tiny, YOLOv7-tiny and the latest YOLOv8s detection model, the improved network still has the highest accuracy, mAP0.5 and mAP0.5:0.95. The experimental results show that the improved model can accurately and quickly identify pedestrians, pots and trees that need to work in a complex environment. After deploying the improved model on mobile devices, the accuracy of recognizing pedestrians, obstacles such as pots, and saplings requiring work has respectively increased by 7.0, 4.8, and 15.4 percentage points compared to the original model.The research findings can provide technical support for the operational activities of spraying robots in nurseries.

       

    /

    返回文章
    返回