1. Introduction
In large-scale livestock farms, livestock identification plays a crucial role in intelligent animal husbandry and modernized management, which helps improve farming efficiency and ensures food safety and traceability [
1,
2]. Sheep are timid and sensitive, and the traditional identification method of ear tagging suffers from problems such as pain, stress, and tag loss [
3,
4]. Utilizing non-contact methods such as DNA recognition, facial recognition for sheep, or iris scanning can effectively prevent excessive contact with the sheep, thereby avoiding potential stress or agitation [
5,
6,
7]. However, the acquisition of iris biometrics and genetic material necessitates specialized instrumentation with substantial cost barriers, coupled with computationally intensive processing workflows that extend operational timelines. In contrast, facial recognition offers clear advantages—convenience, non-invasiveness, and user acceptance—over DNA-based fingerprinting and iris scanning for sheep identification [
8,
9]. Considering the growth cycle of sheep, which commonly reaches the standard for marketing within a year, there is a pronounced transformation in their facial features from birth to adulthood. These rapid physiological changes pose a significant challenge to sheep face recognition technology, as conventional models may struggle to accommodate such dynamic fluctuations. The study of lifelong biometric learning for sheep face recognition is crucial for enhancing the adaptability and accuracy of recognition techniques. Developing sophisticated models capable of accurately identifying sheep’s facial features throughout their lifespan can significantly improve the efficiency of sheep management.
In recent years, scholars have proposed some methods for sheep face identification. In facial recognition research, Yang et al. [
10] put forward a triple interpolation feature technique for aligning human and sheep faces, which led to enhanced outcomes when applied to sheep face datasets. Salama et al. [
11] designed a sheep face recognition system by merging deep learning with Bayesian optimization. Their approach leveraged the Bayesian algorithm to optimize the CNN automatically, attaining a recognition success rate of up to 98%. Wei et al. [
12] developed a goat face detection and recognition technique grounded in deep learning, utilizing conventional feature extraction approaches as its foundation. Billah et al. [
13] applied the YOLOv4 network to discern key goat facial attributes, such as the face, eyes, ears, and nose, achieving accuracy rates of 93%, 83%, 92%, and 85%, respectively. Zhang et al. [
14] constructed a sheep face recognition model utilizing the Vision Transformer (ViT) architecture, with the goal of refining animal management practices and enhancing welfare. In a subsequent study, Zhang et al. [
15] employed convolutional neural networks (CNNs) to create a lightweight model for sheep face recognition, addressing challenges in sheep identification and achieving high accuracy while being suitable for deployment on edge devices. Li et al. [
16] introduced MobileViTFace, a balanced model for sheep face recognition that harnesses the power of Transformers to better capture fine-grained features while diminishing background noise, thereby improving the model’s ability to distinguish between different sheep faces. Later, Li et al. [
17] proposed the Eblock, an efficient and swift foundational component used to develop the lightweight SheepFaceNet model, which successfully balanced speed and accuracy. These methodologies aimed to boost recognition efficiency by minimizing background interference, in turn uplifting recognition precision. Ning et al. [
18] proposed a goat face recognition method based on improved YOLO v5s, which introduces the CARAFE up-sampling module to recover the facial details better and improve the model’s recognition accuracy of the individual faces of dairy goats, especially in the contactless individual recognition of dairy goats.
In summary, scholars have made significant progress in the field of sheep face recognition based on deep learning in recent years, and the research focuses on the lightness and robustness of the model, and has achieved certain results [
19]. However, existing research has not yet addressed the problem of lifelong biometric learning for sheep face recognition. Sheep’s facial features change continuously with the growth process, and the initially deployed models are difficult to adapt to such dynamic changes, resulting in the degradation of recognition performance. Therefore, it is important to develop sheep face recognition models that can cope with this challenge. Inspired by the cross-growth face recognition network model [
20,
21,
22], the study of lifelong biometric learning for sheep face recognition models can provide continuous authentication for sheep throughout their lifecycle, maintain stable model recognition, and effectively reduce the cost of secondary research investment. In addition, feature decoupling techniques show great potential in addressing the challenges of dynamically changing features for recognition tasks. For example, a recent study proposes a human activity recognition (HAR) model based on WiFi signals, which significantly improves the recognition performance by decoupling and restructuring gestures and identity features to generate virtual gesture samples for a new user domain [
23]. This indicates that the feature decoupling technique can effectively separate dynamically changing features, thereby improving the adaptability and accuracy of the recognition system. Inspired by this, this study proposes a sheep face recognition network based on lifelong biometric learning. By decoupling sheep face features into growth features and identity features, this network can effectively address the limitations of traditional models in dealing with dynamic changes in sheep faces. Specifically, we introduce a feature decoupling module to reduce the interference of growth features on identity recognition through correlation analysis, thus improving the accuracy and robustness of sheep face recognition.
Sheep face recognition systems face significant challenges when dealing with lifelong biometric learning. Most existing datasets used for model training are based on images captured at a single time point, which fails to account for the dynamic changes in sheep facial features over their lifespan. In contrast, datasets that capture these changes require data collection over multiple time points, adding complexity to the acquisition process. Moreover, existing residual networks, such as ResNet, have shown limitations in extracting relevant features from sheep faces. Specifically, they struggle to distinguish between growth-related characteristics and identity-specific traits, diminishing the importance of growth factors in identity recognition. To address these challenges, this paper makes several contributions based on the latest advances in the field of sheep facial recognition:
- (1)
A facial dataset of sheep has been collected and built through long-term cooperation with a sheep farm, designed to comprehensively capture the dynamic changes in facial features over their lifespan for lifelong biometric learning, thereby providing a more robust basis for model training.
- (2)
An attention mechanism has been introduced into the ResNet residual structure to enhance the model’s ability to extract valid features from sheep faces throughout their lifespan, supporting effective lifelong biometric learning.
- (3)
A feature decoupling module has been proposed to effectively separate growth features from identity features. Through correlation analysis, the influence of age-related factors on identity features is reduced, thereby improving the accuracy and effectiveness of identity features in the recognition process.
4. Discussion
Although substantial facial changes occur with age, prior work and the present results demonstrate that identity-discriminative features can still be extracted effectively across different growth stages. This study addresses the critical challenge of maintaining recognition accuracy across varying growth stages, a task at which traditional models falter. Our proposed model stands out through its innovative feature decoupling strategy and adversarial learning approach, which effectively mitigates the impact of age-related changes on identity recognition.
LBL-SheepNet’s primary innovation lies in its ability to separate age-related features from identity-specific ones, allowing for more accurate and stable recognition over time. This is achieved through a multi-module architectural framework that includes a Squeeze-and-Excitation (SE) module, a nonlinear feature decoupling module, and a correlation analysis module with adversarial learning. These components work synergistically to enhance feature representation and reduce age-biased interference. The model’s performance is further validated through a comprehensive evaluation using key metrics such as accuracy, precision, recall, and mAP@0.5, demonstrating its superior performance compared to other state-of-the-art methods like ViT and MobileFaceNet. Due to the fact that facial recognition accuracy hinges on the accurate association of high-confidence detection outcomes with the gallery set, rather than on detection performance per se, this leads to the observed phenomenon where the accuracy surpasses mAP@0.5, reflecting the high confidence in both detection and subsequent identification processes within our controlled test environment.
Despite its strengths, LBL-SheepNet has limitations that warrant further investigation. The model’s performance under conditions of occlusion and varying lighting, common in real-world scenarios, requires more rigorous testing. Additionally, while LBL-SheepNet excels in recognizing known identities, its ability to generalize to completely new sheep needs further validation. Future work should focus on enhancing the model’s robustness against these challenges and improving its generalization capabilities. This includes exploring advanced data augmentation techniques, integrating behavioral or posture data, and developing more resilient model architectures. Although this research primarily focuses on the development and validation of LBL-SheepNet for ovine face recognition across various growth stages, there are several promising directions for future research that could further enhance the model’s performance and expand its application scope. One particularly promising avenue is the exploration of Generative Adversarial Networks (GANs) for age transformation in data synthesis. By adapting GANs to the task of age progression in sheep, we anticipate the potential to synthesize a diverse set of images representing different growth stages. This would enable the model to be trained on a more extensive and varied dataset, thereby improving its robustness and generalization capabilities.
We also acknowledge the limitations of our approach. Although the augmentation strategy is effective, it may not fully capture the diversity of the real world. Future research should explore additional data augmentation techniques or alternative regularization methods to further improve model generalization capabilities. This reassessment highlights the importance of rigorous testing under varied conditions to ensure consistent model performance across different datasets. While the current work focuses on known-herd recognition, the extracted age-invariant features naturally enable open-set extension via cosine similarity thresholds. Future versions will implement full metric learning for unknown sheep-detection.
In practical deployment scenarios, LBL-SheepNet demonstrates competitive accuracy and computational efficiency, making it suitable for edge devices in agricultural settings. Its resilience to environmental variations is commendable, although there is room for improvement in handling occlusion and lighting changes effectively. By comparing LBL-SheepNet with ViT and MobileFaceNet, we highlight its strengths and areas for future enhancement, ensuring that our discussion is aligned with the expectations of the field.
In conclusion, LBL-SheepNet offers a promising approach to lifelong biometric learning for sheep face recognition, addressing key challenges in a practical and innovative manner. The discussions and comparisons provided in this section underscore the model’s strengths and areas for future enhancement, positioning it as a robust solution for smart agricultural platforms.
5. Conclusions
This study is dedicated to developing innovative sheep facial recognition technology, focusing on recognition across growth stages, which is of great significance for the intelligent management of large-scale breeding farms. By utilizing non-invasive deep learning techniques, we successfully avoided the potential harm that traditional identification methods might cause to individual sheep. This paper collected facial images of 55 sheep at different growth stages, creating a comprehensive dataset for sheep face recognition across growth stages. We designed and implemented the LBL-SheepNet framework to enhance recognition accuracy, which integrates feature extraction, nonlinear feature decoupling, and correlation analysis modules through a multi-task training strategy. This advanced framework improved the model’s ability to recognize sheep facial features across various age stages. It achieved a recognition accuracy of 95.5% and a mAP@0.5 of 95.3% on the across-growth stages dataset, significantly out-performing traditional methods.
The findings of this research advance the theoretical development of sheep face recognition technology and demonstrate significant practical value in applications. The LBL-SheepNet framework provides an efficient solution for individual sheep identification in large-scale farms, improving automation and intelligent management levels, thereby enhancing production efficiency and economic benefits. We have introduced a new research perspective and practical tools to agricultural technology through this deep learning-driven approach.