节点文献
基于深度学习的葡萄串识别与果轴采摘点定位方法研究
Research on Grape Bunch Identification and Fruit Shaft Picking Point Location Method Based on Deep Learning
【作者】 张涛;
【作者基本信息】 华南农业大学 , 机械硕士(专业学位), 2023, 硕士
【摘要】 随着农业结构的调整,葡萄产业凭借着自身的优势资源得到了快速的发展,但是作为特色林果优势产业,葡萄的采摘收获作业依然面临着劳动强度大、采摘效率低等难题,同时葡萄果轴短,叶片多且背景复杂,大部分果轴被遮挡,增加了葡萄采摘机器人的定位与采摘难度。因此,本文提出了一种YOLOv5-GAP的葡萄检测算法,快速准确的对葡萄串进行分类识别,融合图像处理算法与几何计算实现对葡萄果梗采摘点的定位,用六自由度机械臂验证采摘点定位精度,主要研究内容如下:1、针对果园环境下的阳光玫瑰葡萄串的识别任务,本文通过相机对葡萄生长过程中各个阶段的葡萄图片进行收集,建立葡萄数据集,使用YOLOv5-6.0网络模型并对其进行改进提出葡萄检测算法YOLOv5-GAP。对模型的改进点主要包括三个方面:(1)将YOLOv5算法Backbone第一层的Conv层改为Focus层,对前三个C3结构进行卷积注意力操作,改变C3结构层,并在最后一层C3结构的Bottleneck模块中使用Transformer;(2)在双向特征融合的基础上增加跳跃链路和使用可变权重对不同分辨率特征信息进行加强融合;(3)采用自适应激活函数学习并决定神经元是否需要被激活,实现网络非线性程度的动态控制。最终改进后的YOLOv5-GAP网络模型检测目标AP值为95.13%,与YOLOv4、YOLOv5和YOLOv7算法相比,平均精度分别提升了16.13%、4.34%和2.35%。2、采用数字图像处理算法与数学几何方法相结合,对检测算法识别到的葡萄串进行图像分割。在转换到HSV颜色空间后,选择葡萄特征明显的S通道图像进行阈值分割来获得葡萄果串的二值图像,然后使用中值滤波对孤立的噪声像素进行处理,填充葡萄果串中的空洞后分割出葡萄果串,找到不规则形状的葡萄果串质心,然后用几何算法估算果轴位置,计算带像素误差的果轴采摘点。通过采摘点定位实验测得用来确定采摘点的果梗下极值点平均像素定位误差为6.3像素。3、葡萄采摘点的三维空间定位与精度分析。在实验室的环境下,利用搭载在机械臂上的双目相机对葡萄进行图像的采集,首先利用基于深度学习的目标检测算法识别到葡萄区域,然后对图像进行立体匹配找到葡萄的质心坐标,通过三角测量获得葡萄质心在世界三维空间下的位置信息,最后将采摘点的坐标信息传递给机械臂,让机械臂的采摘末端运动到葡萄采摘点并对定位误差值进行测量。通过对葡萄采摘点定位精度误差数据的统计分析,葡萄采摘点在X、Y、Z方向上的定位误差绝对值主要是在0~15 mm以内的,X方向上的误差最大值为22.46 mm,最小误差1.82 mm,标准误差0.85 mm;Y方向上的误差最大值为24.62 mm,最小误差3.60 mm,标准误差0.94mm;Z方向上的误差最大值为9.42 mm,最小误差3.84 mm,标准误差0.33 mm。本文的研究成果可以为葡萄采摘机器人提供视觉技术支持。
【Abstract】 With the adjustment of agricultural structure,the grape industry has developed rapidly by virtue of its own superior resources.However,as a characteristic fruit industry,the grape picking and harvesting operation still faces the problems of high labor intensity and low picking efficiency.At the same time,the grape fruit axis is short,with many leaves and complex background,and most fruit axes are blocked,which increases the difficulty of positioning and picking the grape picking robot.Therefore,this paper puts forward a grape detection algorithm of YOLOv5-GAP,which can quickly and accurately classify grape clusters,fuse image processing algorithm and geometric calculation to locate the picking points of grape stems,and verify the positioning accuracy of picking points with a six-degree-of-freedom manipulator.The main research contents are as follows:1.Aiming at the recognition task of the sunshine rose grape cluster in the orchard environment,this paper collected grape pictures at various stages of the grape growth process through the camera,established grape data set,and selected the basic target detection network model based on deep learning suitable for grape detection.In this paper,the YOLOv5-6.0 network model was used and improved to propose the grape detection algorithm YOLOv5-GAP.The improvement points of the model mainly include three aspects:(1)Change the Conv layer of the first layer of YOLOv5 algorithm Backbone to Focus layer,carry out convolution attention operation on the first three C3 structures,change the C3 structure layer,and use Transformer in the Bottleneck module of the last layer of C3 structure.(2)On the basis of bidirectional feature fusion,jump links are added and variable weights are used to enhance the fusion of feature information with different resolutions;(3)Adaptive activation function is adopted to learn and determine whether neurons need to be activated,so as to realize dynamic control of the degree of network nonlinearity.Finally,the AP value of the detected target of the improved YOLOV5-GAP network model is 95.13%,and the average accuracy is increased by 16.13%,4.34%and2.35%,respectively,compared with the YOLOv4,YOLOv5 and YOLOv7 algorithms.2.The grape clusters identified by the detection algorithm are segmented by the combination of digital image processing algorithm and mathematical geometry method.After converting to HSV color space,the S-channel image with obvious grape features is selected for threshold segmentation to obtain the binary image of grape cluster.Then,the median filter is used to process the isolated noise pixels,fill the holes in the grape cluster,segment the grape cluster,find the center of mass of the grape cluster with irregular shape,and estimate the location of the fruit axis with geometric algorithm.The fruit axis picking point with pixel error was calculated.The average pixel positioning error of the extreme point under the fruit stalk used to determine the picking point was 6.3 pixels through the experiment of picking point positioning.3.Three-dimensional space location and accuracy analysis of grape picking point.In the laboratory environment,the binocular camera mounted on the robot arm is used to collect images of grapes.Firstly,the target detection algorithm based on deep learning is used to identify the grape region,and then the image is matched in stereo to find the coordinates of grape centroid.The position information of grape centroid in the world three-dimensional space is obtained through triangulation.Finally,the coordinate information of the picking point was transmitted to the robotic arm,and the picking end of the robotic arm was moved to the grape picking point and the positioning error was measured.According to the statistical analysis of the positioning accuracy error data of grape picking points,the absolute positioning error of grape picking points in X,Y and Z directions was mainly within 0~15 mm.The maximum error of X direction was 22.46 mm,the minimum error was 1.82 mm,and the standard error was 0.85 mm.The maximum error in Y direction is 24.62 mm,the minimum error is 3.60 mm,and the standard error is 0.94mm.The maximum error in the Z direction is 9.42 mm,the minimum error is 3.84 mm,and the standard error is 0.33 mm.The research results of this paper can provide visual technical support for grape picking robot.
【Key words】 Deep Learning; Machine Vision; Image Processing; Grape Detection; Picking Point Positionin;
- 【网络出版投稿人】 华南农业大学 【网络出版年期】2026年 05期
- 【分类号】S225;TP391.41;TP18