| Animal husbandry has become an inevitable trend from traditional breeding to intelligent and refined modern breeding relying on technology and equipment.In the process of modern cattle breeding,breeding management,health detection and meat product quality supervision are inseparable from the identification of cattle individual identity.In recent years,deep convolution neural network has shown strong ability.It has become a reliable and convenient way to determine the individual identity of cattle through cattle face recognition.Therefore,based on the deep convolution neural network,this paper proposes a cattle individual face recognition algorithm,which divides the cattle face recognition into two tasks: one is to detect the region of the cattle face in the image,and the other is to recognize the detected region.In the cattle face detection task,taking advantage of fast speed and good performance of YOLOv5,MA-YOLOv5 m algorithm is constructed suitable for cattle face detection.In order to increase the detection speed,the network is lightweight,and the backbone CSP_Darknet in the original network is replaced by Mobilenetv2 network,and the detection speed is increased by 34.38%.In order to improve the detection accuracy,the data processing method Mosaic enhancement is slightly changed,the number of image stitching is increased,and the adaptively spatial feature fusion is introduced on the basis of lightweight YOLOv5 m to make full use of the underlying features.In this paper,a mixed cattle face detection data set of beef cattle and dairy cattle is proposed.On this data set,experiments and comparative analysis are carried out on YOLOv5 m network and improved network MA-YOLOv5 m.The results show that the improved network detection speed is greatly improved,becoming 1.34 times of the original.The detection effect is also good,the AP value and recall value are 1.14 percentage points and 0.86 percentage points higher than YOLOv5 m.In the task of cattle face recognition,CBAM-ResNeXt50 network was built suitable for cattle individual face recognition.CBAM module is introduced into ResNeXt module,and then CBAM-ResNeXt module is used to build CBAM-ResNeXt50 network.Channel attention and spatial attention are used to enhance the ability of extracting cattle facial features and enhance the effect of cattle figure face recognition.Based on the cattle face detection data set,this paper proposes a cattle face recognition data set.On this data set,experimental analysis and comparison are carried out using VGG16,ResNet50,ResNeXt50 network and CBAM-ResNeXt50 network.The experimental results show that,the recognition effect of CBAM-ResNeXt50 network is better than other comparative networks in the experiment,and the recognition accuracy of CBAM-ResNeXt50 network is99.62%,the precision is 99.62%,the recall is 99.61%,F1 score is 99.61%,Kappa value is 0.9961. |