How Many Images Are Required to Recognize a Cow?
Source abstract
Abstract
Accurate re-identification of individual cows is crucial for effective herd management in precision cattle farming. However, this task is challenging in real-world scenarios due to variability in cow appearances and environmental conditions as well as the limited number of reference images available for re-identification. This paper addresses the problem of cow re-identification under open-set and few-shot conditions, where the system must recognize previously unseen individuals with limited annotated data. Metric learning was used to train a neural network for re-identification and its performance was evaluated using K-nearest neighbors (KNN). The neural network is applied to two datasets: OpenSetCows2020 and MultiCamCows2024 captured on different farms. Four testing variants are proposed that resemble different real-life situations: initial deployment, barn change, addition of new cows and cross-farm generalization. The results show that the applied model achieves >90% accuracy with 10 reference images on the same-farm dataset, while cross-farm performance either requires 60 or more reference images to reach similar levels or remains below 63% across metrics. The proposed framework directly addresses the challenges in real-world cattle farming, and allows for a more in-depth analysis of the characteristics and applicability of re-identification methods from a practical perspective than existing evaluation metrics.
Source: crossref · Quality: baseline
Research context
OpenAlex topics: Identification and Quantification in Food · Food Supply Chain Traceability · Advanced Image and Video Retrieval Techniques
SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.
Affiliations
Faculty of Electrical Engineering, Computer Science and Information Technology Osijek, Josip Juraj Strossmayer University of Osijek, Kneza Trpimira 2B, 31000 Osijek, Croatia
Funding
European Uninon—NextGenerationEU
References (30)
Show source-provided references
1. Holstein–Friesian Re-Identification using Multiple Cameras and Self-Supervision on a Working Farm10.1016/j.compag.2025.110568 ↗
2. Wang, B., Li, X., An, X., Duan, W., Wang, Y., Wang, D., and Qi, J. (2024). Open-Set Recognition of Individual Cows Based on Spatial Feature Transformation and Metric Learning. Animals, 14.10.3390/ani14081175 ↗
3. Visual identification of individual Holstein–Friesian cattle via deep metric learning10.1016/j.compag.2021.106133 ↗
4. Lennox, M., McLaughlin, N., and Martinez-del Rincon, J. (2022, January 21). Visual re-identification within large herds of holstein friesian cattle. Proceedings of the Visual Observation and Analysis of Vertebrate and Insect Behavior, Montreal, QC, Canada.
5. Andrew, W., Hannuna, S., Campbell, N., and Burghardt, T. (2016, January 25–28). Automatic individual holstein friesian cattle identification via selective local coat pattern matching in RGB-D imagery. Proceedings of the 2016 IEEE International Conference on Image Processing (ICIP), Phoenix, AZ, USA.10.1109/ICIP.2016.7532404 ↗
6. Individual identification of Holstein dairy cows based on detecting and matching feature points in body images10.1016/j.biosystemseng.2019.03.004 ↗
7. Individual identification of dairy cows based on convolutional neural networks10.1007/s11042-019-7344-7 ↗
8. Shojaeipour, A., Falzon, G., Kwan, P., Hadavi, N., Cowley, F.C., and Paul, D. (2021). Automated muzzle detection and biometric identification via few-shot deep transfer learning of mixed breed cattle. Agronomy, 11.10.3390/agronomy11112365 ↗
9. Li, S., Fu, L., Sun, Y., Mu, Y., Chen, L., Li, J., and Gong, H. (2021). Individual dairy cow identification based on lightweight convolutional neural network. PLoS ONE, 16.10.1371/journal.pone.0260510 ↗
10. Deng, J., Guo, J., Xue, N., and Zafeiriou, S. (2019, January 15–20). Arcface: Additive angular margin loss for deep face recognition. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA.10.1109/CVPR.2019.00482 ↗
11. Supervised contrastive learning
12. Masullo, A., Burghardt, T., Damen, D., Perrett, T., and Mirmehdi, M. (November, January 27). Who goes there? exploiting silhouettes and wearable signals for subject identification in multi-person environments. Proceedings of the IEEE/CVF International Conference on Computer Vision Workshops, Seoul, Republic of Korea.
13. Yang, L., Zhang, R.Y., Li, L., and Xie, X. (2021, January 18–24). Simam: A simple, parameter-free attention module for convolutional neural networks. Proceedings of the International Conference on Machine Learning, PMLR, Virtual.
14. ShuffleNet-Triplet: A lightweight RE-identification network for dairy cows in natural scenes10.1016/j.compag.2023.107632 ↗
15. Chen, T., Kornblith, S., Norouzi, M., and Hinton, G. (2020, January 13–18). A Simple Framework for Contrastive Learning of Visual Representations. Proceedings of the International Conference on Machine Learning, Virtual.
16. Improved deep metric learning with multi-class n-pair loss objective
17. Cumulative unsupervised multi-domain adaptation for Holstein cattle re-identification
18. Gao, J., Burghardt, T., Andrew, W., Dowsey, A.W., and Campbell, N.W. (2021). Towards Self-Supervision for Video Identification of Individual Holstein–Friesian Cattle: The Cows2021 Dataset. arXiv.
19. Universal bovine identification via depth data and deep metric learning10.1016/j.compag.2024.109657 ↗
20. Andrew, W., Greatwood, C., and Burghardt, T. (2017, January 22–29). Visual Localisation and Individual Identification of Holstein Friesian Cattle via Deep Learning. Proceedings of the IEEE International Conference on Computer Vision Workshops, Venice, Italy.10.1109/ICCVW.2017.336 ↗
21. Andrew, W., Greatwood, C., and Burghardt, T. (2019, January 4–8). Aerial Animal Biometrics: Individual Friesian Cattle Recovery and Visual Identification via an Autonomous UAV with Onboard Deep Inference. Proceedings of the 2019 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), Venetian Macao, Macau.10.1109/IROS40897.2019.8968555 ↗
22. Lin, T.Y., Goyal, P., Girshick, R., He, K., and Dollár, P. (2017, January 22–29). Focal Loss for Dense Object Detection. Proceedings of the 2017 IEEE International Conference on Computer Vision (ICCV), Venice, Italy.10.1109/ICCV.2017.324 ↗
23. Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks10.1109/TPAMI.2016.2577031 ↗
24. Redmon, J., and Farhadi, A. (2018). YOLOv3: An Incremental Improvement. arXiv.
25. He, K., Zhang, X., Ren, S., and Sun, J. (2016, January 26–30). Deep Residual Learning for Image Recognition. Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA.10.1109/CVPR.2016.90 ↗
26. Lagunes-Fortiz, M., Damen, D., and Mayol-Cuevas, W. (2019, January 20–24). Learning Discriminative Embeddings for Object Recognition on-the-fly. Proceedings of the 2019 International Conference on Robotics and Automation (ICRA), Montreal, QC, Canada.10.1109/ICRA.2019.8793715 ↗
27. Vedaldi, A., Bischof, H., Brox, T., and Frahm, J.M. (2020, January 23–28). Hard Negative Examples are Hard, but Useful. Proceedings of the Computer Vision—ECCV 2020, Glasgow, UK.10.1007/978-3-030-58583-9 ↗
28. Hermans, A., Beyer, L., and Leibe, B. (2017). In Defense of the Triplet Loss for Person Re-Identification. arXiv.
29. Buslaev, A., Iglovikov, V.I., Khvedchenya, E., Parinov, A., Druzhinin, M., and Kalinin, A.A. (2020). Albumentations: Fast and Flexible Image Augmentations. Information, 11.10.3390/info11020125 ↗
30. Deng, J., Dong, W., Socher, R., Li, L.J., Li, K., and Fei-Fei, L. (2009, January 20–25). ImageNet: A large-scale hierarchical image database. Proceedings of the 2009 IEEE Conference on Computer Vision and Pattern Recognition, Miami, FL, USA.10.1109/CVPR.2009.5206848 ↗