Livestock Identification Using Deep Learning for Traceability
Abstract
:1. Introduction
2. Materials and Methods
2.1. Data Collection from Dairy Cows
2.2. Application Pipeline
2.3. Training and Testing Data
2.4. Face Detector
2.5. Landmark Predictor
2.6. Feature Encoder
2.7. Database
2.8. Evaluation Metrics
- False-positive: an error when a search is done for a non-mate cow, but the returned ID belonged to a mate cow.
- Miss: an error when a search is done for a mate cow, but the returned ID for that cow is out of the top R, or its score is below threshold T.
3. Results and Discussion
3.1. Model Performance
3.2. Cows Identification on Still Images
3.3. Cows Identification on Video Sequences
3.4. Deployment
3.5. Discussion
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Kumar, S.; Singh, S.K. Cattle recognition: A new frontier in visual animal biometrics research. Proc. Natl. Acad. Sci. India Sect. A Phys. Sci. 2020, 90, 689–708. [Google Scholar] [CrossRef]
- Kumar, S.; Tiwari, S.; Singh, S.K. Face Recognition of Cattle: Can it be Done? Proc. Natl. Acad. Sci. India Sect. A Phys. Sci. 2016, 86, 137–148. [Google Scholar] [CrossRef]
- Zin, T.T.; Phyo, C.N.; Tin, P.; Hama, H.; Kobayashi, I. Image technology based cow identification system using deep learning. In Proceedings of the International MultiConference of Engineers and Computer Scientists, Hong Kong, China, 14–16 March 2018; pp. 236–247. [Google Scholar]
- Kumar, S.; Singh, S.K.; Singh, R.; Singh, A.K. Muzzle point pattern based techniques for individual cattle identification. IET Image Process. 2017, 11, 805–815. [Google Scholar] [CrossRef]
- Awad, A.I. From classical methods to animal biometrics: A review on cattle identification and tracking. Comput. Electron. Agric. 2016, 123, 423–435. [Google Scholar] [CrossRef]
- Stärk, K.D.C.; Morris, R.S.; Pfeiffer, D.U. Comparison of electronic and visual identification systems in pigs. Livest. Prod. Sci. 1998, 53, 143–152. [Google Scholar] [CrossRef]
- Bergqvist, A.-S.; Forsberg, F.; Eliasson, C.; Wallenbeck, A. Individual identification of pigs during rearing and at slaughter using microchips. Livest. Sci. 2015, 180, 233–236. [Google Scholar] [CrossRef]
- Nason, J. Tag Retention: NLIS Tag Losses Still Frustrating Producers. 2020. Available online: https://www.beefcentral.com/news/tag-retention-nlis-tag-losses-still-frustrating-producers/#:~:text=CATTLE%20producers%20are%20reporting%20high,of%20sale%20for%20traceability%20purposes. (accessed on 4 March 2022).
- Clapham, M.; Miller, E.; Nguyen, M.; Darimont, C.T. Automated facial recognition for wildlife that lack unique markings: A deep learning approach for brown bears. Ecol. Evol. 2020, 10, 12635–13571. [Google Scholar] [CrossRef] [PubMed]
- Mazzeo, P.L.; Xue, H.; Qin, J.; Quan, C.; Ren, W.; Gao, T.; Zhao, J. Open Set Sheep Face Recognition Based on Euclidean Space Metric. Math. Probl. Eng. 2021, 2021, 3375394. [Google Scholar]
- Matkowski, W.M.; Kong, A.W.K.; Su, H.; Chen, P.; Hou, R.; Zhang, Z. Giant Panda Face Recognition Using Small Dataset. In Proceedings of the 2019 IEEE International Conference on Image Processing (ICIP), Taipei, Taiwan, 22–25 September 2019. [Google Scholar]
- Cai, C.; Li, J. Cattle face recognition using local binary pattern descriptor. In Proceedings of the 2013 Asia-Pacific Signal and Information Processing Assiciation Annual Summit and Conference, Kaohsiung, Taiwan, 29 October–1 November 2013; pp. 1–4. [Google Scholar]
- Lu, Y.; He, X.; Wen, Y.; Wang, P.S.P. A new cow identification system based on iris analysis and recognition. Int. J. Biom. 2014, 6, 18–32. [Google Scholar] [CrossRef]
- Phillips, P.; Beveridge, J.; Givens, G.; Draper, B.; Lui, Y.; Bolme, D. Introduction to Face Recognition and Evaluation of Algorithm Performance. Comput. Stat. Data Anal. 2013, 67, 236–247. [Google Scholar]
- Intel Corporation. Toolkit, O. cvat; GitHub: San Francisco, CA, USA, 2018. [Google Scholar]
- Grother, P.; Ngan, M.; Hanaoka, K. Face Recognition Vendor Test (FRVT) Part 2: Identification; NIST Interagency/Internal Report (NISTIR); National Institute of Standards and Technology: Gaithersburg, MD, USA, 2019. [Google Scholar]
- Deng, J.; Dong, W.; Socher, R.; Li, L.-J.; Li, K.; Fei-Fei, L. Imagenet: A large-scale hierarchical image database. In Proceedings of the 2009 IEEE Conference on Computer Vision and Pattern Recognition, Miami, FL, USA, 20–25 June 2009; pp. 248–253. [Google Scholar]
- Lin, T.-Y.; Maire, M.; Belongie, S.; Bourdev, L.; Girshick, R.; Hays, J.; Perona, P.; Ramanan, D.; Zitnick, C.L.; Dollár, P. Microsoft COCO: Common Objects in Context. In European Conference on Computer Vision; Springer: Berlin/Heidelberg, Germany, 2014. [Google Scholar]
- Sandler, M.; Howard, A.; Zhu, M.; Zhmoginov, A.; Chen, L.-C. MobileNetV2: Inverted Residuals and Linear Bottlenecks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Salt Lake City, UT, USA, 18–23 June 2018; pp. 4510–4520. [Google Scholar]
- Jocher, G. Ultralytics YOLOv5, GitHub: 2021. Available online: https://github.com/ultralytics/yolov5 (accessed on 10 September 2022).
- Bochkovskiy, A.; Wang, C.-Y.; Liao, H.-Y.M. YOLOv4: Optimal Speed and Accuracy of Object Detection. arXiv 2020, arXiv:2004.10934. [Google Scholar]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition. arXiv 2015, arXiv:1512.03385. [Google Scholar]
- Sammut, C.; Webb, G.I. Mean Squared Error. In Encyclopedia of Machine Learning; Springer: Boston, MA, USA, 2010; p. 653. [Google Scholar]
- Kingma, D.P.; Ba, J. Adam: A Method for Stochastic Optimization. axRiv 2014, arXiv:1412.6980. [Google Scholar]
- Kalim, A.R. Face Landmarks Detection with PyTorch; Towards Data Science Inc.: Toronto, ON, Canada, 2020. [Google Scholar]
- Deng, J.; Guo, J.; Xue, N.; Zafeiriou, S. ArcFace: Additive Angular Margin Loss for Deep Face Recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA, 15–20 June 2019. [Google Scholar]
- Lin, T.-Y.; Goyal, P.; Girshick, R.; He, K.; Dollár, P. Focal Loss for Dense Object Detection. arXiv 2018, arXiv:1708.02002. [Google Scholar]
- Loshchilov, I.; Hutter, F. SGDR: Stochastic Gradient Descent with Warm Restarts. arXiv 2017, arXiv:1608.03983. [Google Scholar]
- Redmon, J.; Divvala, S.; Girshick, R.; Farhadi, A. You Only Look Once: Unified, Real-Time Object Detection. arXiv 2015, arXiv:1506.02640. [Google Scholar]
- Fisher, R.A. LDA (Linear Discriminant Analysis). In Encyclopedia of Biometrics; Li, S.Z., Jain, A., Eds.; Springer: Boston, MA, USA, 2009; p. 899. [Google Scholar]
- Grother, P.; Quinn, G.; Ngan, M. NIST Interagency Report 8173: Face in Video Evaluation (FIVE) Face Recognition of Non-Cooperative Subjects; NIST: Gaithersburg, MD, USA, 2017. [Google Scholar]
- Fuentes, S.; Viejo, C.G.; Tongson, E.; Lipovetzky, N.; Dunshea, F.R. Biometric Physiological Responses from Dairy Cows Measured by Visible Remote Sensing Are Good Predictors of Milk Productivity and Quality through Artificial Intelligence. Sensors 2021, 21, 6844. [Google Scholar] [CrossRef] [PubMed]
- Dairy Australia. Cow & Farms Data. Available online: https://www.dairyaustralia.com.au/industry-statistics/cow-and-farms-data#.Y1skeHZBw2w (accessed on 10 March 2022).
- Jorquera-Chavez, M.; Fuentes, S.; Dunshea, F.R.; Warner, R.D.; Poblete, T.; Morrison, R.S.; Jongman, E.C. Remotely Sensed Imagery for Early Detection of Respiratory Disease in Pigs: A Pilot Study. Animals 2020, 10, 451. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Fuentes, S.; Viejo, C.G.; Chauhan, S.S.; Joy, A.; Tongson, E.; Dunshea, F.R. Non-Invasive Sheep Biometrics Obtained by Computer Vision Algorithms and Machine Learning Modeling Using Integrated Visible/Infrared Thermal Cameras. Sensors 2020, 20, 6334. [Google Scholar] [CrossRef] [PubMed]
- Jorquera-Chavez, M.; Fuentes, S.; Dunshea, F.R.; Warner, R.D.; Poblete, T.; Jongman, E.C. Modelling and validation of computer vision techniques to assess heart rate, eye temperature, ear-base temperature and respiration rate in cattle. Animals 2019, 9, 1089. [Google Scholar] [CrossRef] [PubMed] [Green Version]
nim | Top R | ||
---|---|---|---|
1 | 5 | 10 | |
1 | 84.15 | - | - |
5 | 84.21 | 84.27 | - |
10 | 84.35 | 84.25 | 84.35 |
15 | 84.35 | 84.27 | 84.30 |
20 | 84.34 | 84.31 | 84.35 |
25 | 84.42 | 84.33 | 84.31 |
Step | Inference Speed |
---|---|
Face detection | 23.4 ms |
Face cropping | 7.3 ms |
Face encoding | 24.9 ms |
Face lookup | 42.9 ms |
Total | ~98.5 ms |
Number of Images per Identity nim = 25 | Top R | Pipeline | Buffer Size | ||||
---|---|---|---|---|---|---|---|
10 | 20 | 30 | 40 | 50 | |||
CMC (%) | 1 | 84 | 88 | 89 | 90 | 90 | 90 |
5 | 84 | 88 | 89 | 90 | 90 | 91 | |
10 | 84 | 88 | 89 | 90 | 90 | 91 | |
#Mate ID true positive | 1 | 87 | 86 | 86 | 85 | 86 | 85 |
5 | 87 | 86 | 86 | 85 | 85 | 85 | |
10 | 87 | 87 | 85 | 84 | 84 | 84 | |
#Nonmate ID false positive | 1 | 52 | 42 | 34 | 32 | 25 | 19 |
5 | 52 | 42 | 34 | 31 | 25 | 23 | |
10 | 52 | 42 | 35 | 35 | 25 | 21 |
Step | Inference Speed |
---|---|
Face detector | 177.1 ms |
Face cropper | 47.9 ms |
Face encoder | 177.7 ms |
Face lookup | 236.8 ms |
Total | ~639.5 ms |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Dac, H.H.; Gonzalez Viejo, C.; Lipovetzky, N.; Tongson, E.; Dunshea, F.R.; Fuentes, S. Livestock Identification Using Deep Learning for Traceability. Sensors 2022, 22, 8256. https://doi.org/10.3390/s22218256
Dac HH, Gonzalez Viejo C, Lipovetzky N, Tongson E, Dunshea FR, Fuentes S. Livestock Identification Using Deep Learning for Traceability. Sensors. 2022; 22(21):8256. https://doi.org/10.3390/s22218256
Chicago/Turabian StyleDac, Hai Ho, Claudia Gonzalez Viejo, Nir Lipovetzky, Eden Tongson, Frank R. Dunshea, and Sigfredo Fuentes. 2022. "Livestock Identification Using Deep Learning for Traceability" Sensors 22, no. 21: 8256. https://doi.org/10.3390/s22218256
APA StyleDac, H. H., Gonzalez Viejo, C., Lipovetzky, N., Tongson, E., Dunshea, F. R., & Fuentes, S. (2022). Livestock Identification Using Deep Learning for Traceability. Sensors, 22(21), 8256. https://doi.org/10.3390/s22218256