Multi-Directional Shifted Patch Encoding With Transformers for Non-Invasive Cattle Identification
Conventional identification techniques for cattle, such as branding, ear tagging, and notching, though widely implemented, are intrusive and pose scalability limitations in managing large livestock cattle population. While electronic tagging facilitates improved monitoring, it depends on specific devices and is vulnerable to security and maintenance issues. As a non-invasive alternative, biometric identification using unique dermatoglyphic characteristics like muzzle patterns offers a promising direction. Although convolutional neural networks have been applied to extract these biometric features, the use of Vision Transformers remains underexplored due to their dependency on large-scale data, which restricts their effectiveness in real-world agricultural settings with limited datasets. This research presents a transformer-based model incorporating a multi-directional patch tokenization encoding approach involving multiple spatial shifts, coupled with diagonal attention filtering and a global information fusion strategy. This enables the transformer to perform robustly even with constrained training data. The proposed method outperforms traditional Vision Transformer variants, including Swin Transformer and GCViT, and surpasses CNN architectures such as ResNet50 in both accuracy and training efficiency. The final model configuration achieves a peak training accuracy of 98.42% and a validation accuracy of 97.80%. These results demonstrate the viability of transformer-based frameworks, when appropriately adapted, for practical and scalable biometric cattle identification, especially in data-constrained environments.
Institutions
- Indian Institute of Technology BHU (IN)
- Banaras Hindu University (IN)
Publication Details
- Journal
- IEEE Transactions on Biometrics Behavior and Identity Science
- Published
- 2025-08-15
- DOI
- https://doi.org/10.1109/tbiom.2025.3599374
- Primary Topic
- Data Analysis with R
- Type
- article
- Field-Weighted Citation Impact
- 0.00