摘要
【目的】旨在为病死猪搬运机器人提供抓取目标,提出一种基于改进YOLOv5的病死猪猪头的识别及三维定位方法。【方法】将YOLOv5目标检测算法主干特征提取网络(backbone)替换成轻量化特征提取网络MobileNetV2,降低所得训练权重参数大小;在主干特征提取网络中引入CBAM注意力机制来提高对病死猪猪头的关注度;使用RealsenseD435深度相机获取目标图像,建立针对病死猪猪头的三维空间坐标的成像模型;并设计对比试验与定位试验对其进行验证。【结果】相较于YOLOv5特征提取网络,轻量化处理主干网络能使权重文件大小从13.7 MB下降到5.9 MB,降幅达到56%;CBAM注意力机制的引入使算法单张图片的检测速度从17.9 ms下降到11.6 ms,减少6.3 ms;RealsenseD435深度相机构造的三维定位模型在X,Y,Z轴方向上的平均误差分别为0.021,0.023,0.042 m,均小于0.05 m。【结论】改进的YOLOv5目标检测模型能有效降低权值文件大小,提高检测速率。RealsenseD435深度相机构建的三维定位模型能够准确定位到病死猪头部,并计算出其三维空间坐标。所以基于改进YOLOv5的病死猪猪头的识别及三维定位方法,满足病死猪搬运机器人的识别定位要求。
[Objective]In order to provide the grasping target for the sick and dead pig handling robot,[Method]A new method for the identification and 3D location of dead pig head based on improved YOLOv5 is proposed.In this method,the backbone of YOLOv5 object detection algorithm is replaced with a lightweight feature extraction network mobilenetv2,and the size of the obtained training weight parameters is reduced.CBAM attention mechanism was introduced into the backbone feature extraction network to improve the attention of dead pig head.realsenseD435 depth camera was used to acquire the target image,and the 3D spatial coordinate imaging model was established for the pig head of the dead pig.The comparison experiment and localization experiment are designed to verify it.[Result]Compared with the YOLOv5 feature extraction network,the lightweight processing backbone network can reduce the weight file size from 13.7 MB to 5.9 MB,a reduction of 56%.The introduction of CBAM reduces the detection speed of a single image from 17.9 ms to 11.6 ms,a decrease of 6.3 ms.The average error of the 3D positioning model constructed by the realsenseD435 depth camera in the X,Y and Z axes is 0.021 m,0.023 m and 0.042 m,respectively,which are all less than 0.05 m.[Conclusion]The improved YOLOv5 object detection model can effectively reduce the weight file size and improve the detection rate.The 3D positioning model constructed by the realsenseD435 depth camera can accurately locate the head of a dead pig and calculate its 3D spatial coordinates.Therefore,based on the improved YOLOv5 pig head recognition and three-dimensional positioning method,it meets the identification and positioning requirements of the pig handling robot.
作者
彭兴鹏
何秀文
孙云涛
刘仁鑫
梁亚茹
钟玉媚
庞佳
熊康文
PENG Xingpeng;HE Xiuwen;SUN Yuntao;LIU Renxin;LIANG Yaru;ZHONG Yumei;PANG Jia;XIONG Kangwen(Jiangxi Animal Husbandry Facility Research Center,Jiangxi Agricultural University,Nanchang 330045,China)
出处
《江西农业大学学报》
CAS
CSCD
北大核心
2024年第3期763-773,共11页
Acta Agriculturae Universitatis Jiangxiensis
基金
国家自然科学基金项目(62041106)。
关键词
YOLOv5
病死猪
猪头识别
三维定位
注意力机制
无人化
YOLOv5
diseased pigs
pig head recognition
three-dimensional positioning
attention mecha⁃nism
unmanned