A Cow Face Recognition Method Based on Improved YOLO X-S
Yangqihang Liu,Shuqin Yang,Yongsheng Wang,Xianyong Lan,Jifeng Ning
DOI: https://doi.org/10.2139/ssrn.4234120
2022-01-01
SSRN Electronic Journal
Abstract:During precise breeding of dairy cows, the fast and accurate identification of individual dairy cows is important for the health management of individual matching, feeding and milk yield. In this work, a dairy cow face recognition model by integrating two attention mechanisms is proposed based on YOLO X-s object detection network. Firstly, we constructed a facial image dataset with 95 dairy cows, which were collected in multiple growth periods and further the data augmentation is made to enhance the generalization performance of the model. Secondly, in the feature fusion part of YOLO X-s model, the iterative attention feature fusion module is used to replace the original Concat operation, which fuses the context information to better extract cow facial features. Thirdly, in order to obtain more abundant multi-scale information, a pyramid segmentation attention module is added in the feature fusion part to further improve the recognition accuracy. The experimental results show that the mean average precision (mAP) of the improved YOLO X-s model is 95.74%, which is 6.88%, 3.18%, 2.86%, 1.41% and 0.87% higher than SSD model, Centernet model, Faster R-CNN model, YOLO v4 model and original YOLO X-s model respectively. At the same time, the average frame rate of the improved YOLO X-s model reaches 23 frame/s with fast speed. In addition, this study also compared the facial recognition results of dairy cows under different labeling methods, and the mAP of the improved YOLO X-s model reached 95.74% without ear labeling, which surpassed the recognition result of the method with ear labeling by 0.74%, providing a better reference for cow face labeling in cow face recognition. This research provides an effective method for cow face image recognition in precision breeding of dairy cows.