Animal (Aug 2023)

A high-precision facial recognition method for small-tailed Han sheep based on an optimised Vision Transformer

  • Xiwen Zhang,
  • Chuanzhong Xuan,
  • Yanhua Ma,
  • He Su

Journal volume & issue
Vol. 17, no. 8
p. 100886

Abstract

Read online

Accurate identification of individual animals plays a pivotal role in enhancing animal welfare and optimising farm production. Although Radio Frequency Identification technology has been widely applied in animal identification, this method still exhibits several limitations that make it difficult to meet current practical application requirements. In this study, we proposed ViT-Sheep, a sheep face recognition model based on the Vision Transformer (ViT) architecture, to facilitate precise animal management and enhance livestock welfare. Compared to Convolutional Neural Network (CNN), ViT is renowned for its competitive performance. The experimental procedure of this study consisted of three main steps. Firstly, we collected face images of 160 experimental sheep to construct the sheep face image dataset. Secondly, we developed two sets of sheep face recognition models based on CNN and ViT, respectively. To enhance the ability to learn sheep face biological features, we proposed targeted improvement strategies for the sheep face recognition model. Specifically, we introduced the LayerScale module into the encoder of the ViT-Base-16 model and employed transfer learning to improve recognition accuracy. Finally, we compared the training results of different recognition models and the ViT-Sheep model. The results demonstrated that our proposed method achieved the highest performance on the sheep face image dataset, with a recognition accuracy of 97.9%. This study demonstrates that ViT can successfully achieve sheep face recognition tasks with good robustness. Furthermore, the findings of this research will promote the practical application of artificial intelligence animal recognition technology in sheep production.

Keywords