高级检索

轻量化改进YOLOv7-tiny的茄子采摘机器人目标检测与定位方法

Target Detection and Positioning Method for Eggplant Picking Robot Based on Lightweight Improved YOLOv7-tiny

  • 摘要: 针对农业机器人在茄子采摘过程中存在的漏检、误检和实时性不足等问题,提出一种基于轻量化的深度学习改进方法,以满足自然环境下小型农机对茄子的实时采摘需求,实现目标茄子的检测和采摘区域的精准定位。鉴于小型农机计算资源的限制,该方法以参数量较少、计算复杂度较低的YOLOv7-tiny为基础模型,对其颈部网络进行两项并行改进:将原始空间金字塔池化跨阶段部分通道(SPPCSPC)模块替换为引入分组卷积策略的SPPCSPC模块,以减少特征图尺寸和通道数,从而降低计算量;将原有的高效层注意力网络(ELAN)结构替换为重参数化的RCS-OSA(基于通道混洗的重参数化卷积-一次性聚合)模块,以获取更丰富的特征信息并减少时间消耗。在此基础上,采用层自适应幅度剪枝(LAMP)策略进行模型剪枝,进一步压缩模型规模,提高模型在小型农机平台上的部署适应性。同时,利用深度相机采集包含不同种类、不同成熟度及不同拍摄条件下的茄子样本,构建实验数据集,并对所提出的模型进行测试。结果表明,改进模型的检测平均精度可达96.7%,相比原始YOLOv7-tiny提高1.9%,参数量降低68.3%,检测速度达到75帧/s,能够满足高精度实时检测要求。本文提出的改进模型在保持轻量化的同时显著提升了检测精度,可为采摘机器人中的茄子自动检测与定位提供有效的解决方案。

     

    Abstract: To address the issues of missed detection, false detection, and insufficient real-time performance in the eggplant picking process by agricultural robots, a lightweight deep learning-based improvement method was proposed to meet the real-time picking requirements of small agricultural machinery for eggplants in natural environments and to achieve accurate detection of target eggplants and precise localization of picking regions. Given the computational resource constraints of small agricultural machinery, the proposed method was based on YOLOv7-tiny, which has fewer parameters and lower computational complexity. Two parallel improvements were made to its neck network: the original spatial pyramid pooling cross stage partial channel (SPPCSPC) module was replaced with an SPPCSPC module incorporating a grouped convolution strategy to reduce feature map sizes and channel numbers, thereby decreasing computational load; and the original efficient layer attention network (ELAN) structure was replaced with a reparameterized RCS-OSA (reparameterized convolution shuffling-based one-shot aggregation) module to obtain richer feature information and reduce time consumption. On this basis, the layer-adaptive magnitude pruning (LAMP) strategy was employed for model pruning to further compress the model size and improve its deployability on small agricultural machinery platforms. Meanwhile, a dataset was constructed using depth camera-collected eggplant samples of different varieties, maturities, and under different shooting conditions, and the proposed model was tested on this dataset. The results show that the average detection accuracy of the improved model reaches 96.7%, which is 1.9% higher than that of the original YOLOv7-tiny, with a parameter reduction of 68.3% and a detection speed of 75 frames per second. Therefore, it is demonstrated that the proposed improved model significantly enhances detection accuracy while maintaining lightweight characteristics, and an effective solution is provided for automatic eggplant detection and localization in picking robots.

     

/

返回文章
返回