SheepNet: Rapid Sheep Face Recognition Based on Attention and Knowledge Distillation
摘要
Sheep identification is essential for establishing a modern, intelligent sheep farm. It is crucial to build a fast network that uses as little data as possible. In this study, we propose SheepNet, a novel rapid sheep face recognition method based on attention and knowledge distillation. Firstly, we obtain the attention weights of low-level features based on two-branch convolution structures. Then, we construct a skip connection structure to enhance the model’s feature extraction capability. Finally, we adopt knowledge distillation to address the high-precision training problem with limited data. One crucial advantage of SheepNet is that it does not suffer from degradation as other models do when knowledge distillation is performed with limited training set. We have constructed a publicly available sheep face dataset where facial images are captured at various distances and angles. Coupled with the knowledge distillation, the proposed model efficiently extracts sheep facial features, achieving high accuracy with limited training set. It achieves a remarkable accuracy of 97.61% (99.52%) when trained with merely 12 (72) photographs per sheep, with merely 0.72M parameters and an inference time of 7.14 ms per image.