Abstract:Aiming at the problems such as occlusion and large deformation of cow images in the cowshed under a wide field of view, which cause difficulties in individual identification, a method for individual identification of cows in the cowshed under a wide field of view based on the DAM-ResNet model was proposed. The Mask R-CNN model was used to segment four types of dairy cow parts: the back, the left side of the trunk, the right side of the trunk and the buttocks. Based on the ResNet34 residual network, the second-generation deformable convolution was introduced to enhance the extraction of deformed image features of cow patterns in the segmentation results. Integrating the AFF attention feature fusion module into the residual structure to achieve accurate recognition of images of small target cows at a distance. The fine-grained classification loss function, interchannel loss (MC-Loss), was adopted to improve the recognition accuracy of the model for cows with similar patterns. The multi-part dataset of dairy cows was constructed by using the segmented images of dairy cows, and the DAM-ResNet model was trained. Individual cow recognition tests were conducted on a dataset of 12864 images of 57 dairy cows. The results showed that the recognition accuracy rates of the back, left trunk, right trunk and buttocks of dairy cows were 96.13%, 96.56%, 96.94% and 93.14%, respectively, which were 2.76, 2.88, 2.92 and 4.25 percentage points higher than those of the original ResNet model. The recognition accuracy rates of the method proposed within the ranges of 10~20m, 20~30m and 30~40m were 97.54%, 90.72% and 82.17%, respectively. The research results can provide technical support for intelligent dairy cow breeding.