Identification and 3D localization of dead pig head based on improved 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.
YOLOv5diseased pigspig head recognitionthree-dimensional positioningattention mecha-nismunmanned