Automated Muzzle Detection and Biometric Identification via Few-Shot Deep Transfer Learning of Mixed Breed Cattle
Abstract
:1. Introduction
2. Materials and Methods
2.1. Data
2.1.1. Data Collection
2.1.2. Dataset
2.2. Muzzle Detection and Extraction
2.2.1. YOLOv3 Muzzle Detector
2.2.2. YOLOv3 Muzzle Detector Training
2.2.3. Muzzle Detector Model Hyper-Parameter Configuration
2.3. Cattle Identification Model
2.3.1. Data Pre-Processing
2.3.2. Biometric Identification Using ResNet-50 CNN
2.3.3. Biometric Model Training
3. Results
3.1. Muzzle Detection
3.2. Biometric Recognition
Testing the Model
4. Discussion
5. Conclusions
Supplementary Materials
Author Contributions
Funding
Institutional Review Board Statement
Acknowledgments
Conflicts of Interest
References
- Petrovska-Delacrétaz, D.; Edwards, A.; Chiasson, J.; Chollet, G.; Pilliod, D.S. A reference system for animal biometrics: Application to the northern leopard frog. In Proceedings of the 2014 1st International Conference on Advanced Technologies for Signal and Image Processing (ATSIP), Sousse, Tunisia, 17–19 March 2014. [Google Scholar]
- Johnston, A.M.; Edwards, D.S. Welfare implications of identification of cattle by ear tags. Veter. Rec. 1996, 138, 612–614. [Google Scholar] [CrossRef]
- Chen, J.; Wen, Q.; Qu, W. Panda facial region detection based on topology modelling. In Proceedings of the 2012 5th International Congress on Image and Signal Processing, Chongqing, China, 16–18 October 2012. [Google Scholar]
- Jones, S.M. Tattooing of Cattle and Goats; FSA (University of Arkansas (System). Cooperative Extension Service): Little Rock, AR, USA, 2014; p. 4015. [Google Scholar]
- Lay, D., Jr.; Friend, T.; Randel, R.; Bowers, C.; Grissom, K.; Jenkins, O. Behavioral and physiological effects of freeze or hot-iron branding on crossbred cattle. J. Anim. Sci. 1992, 70, 330–336. [Google Scholar] [CrossRef]
- Schwartzkopf-Genswein, K.S.; Stookey, J.M.; Welford, R. Behavior of cattle during hot-iron and freeze branding and the effects on subsequent handling ease. J. Anim. Sci. 1997, 75, 2064–2072. [Google Scholar] [CrossRef]
- Collins, G.H.; Petersen, S.L.; Carr, C.A.; Pielstick, L. Testing VHF/GPS collar design and safety in the study of free-roaming horses. PLoS ONE 2014, 9, e103189. [Google Scholar] [CrossRef] [PubMed]
- Dairy-Australia. Precision Dairy Technology Electronic Cow Identification; Dairy Australia Limited: Southbank, Australia, 2016. [Google Scholar]
- Løken, T.; Vatn, G.; Kummen, E. Subcutaneous electronic identification in cattle: A field study. Veter. Rec. 2011, 169, 250. [Google Scholar] [CrossRef] [PubMed]
- Klindtworth, M.; Wendl, G.; Klindtworth, K.; Pirkelmann, H. Electronic identification of cattle with injectable transponders. Comput. Electron. Agric. 1999, 24, 65–79. [Google Scholar] [CrossRef]
- Jovani, R.; Pérez-Rodríguez, L.; Mougeot, F. Fractal geometry for animal biometrics: A response to Kühl and Burghardt. Trends Ecol. Evol. 2013, 28, 499–500. [Google Scholar] [CrossRef] [Green Version]
- Town, C.; Marshall, A.; Sethasathien, N. M anta M atcher: Automated photographic identification of manta rays using keypoint features. Ecol. Evol. 2013, 3, 1902–1914. [Google Scholar] [CrossRef]
- Sherley, R.B.; Burghardt, T.; Barham, P.J.; Campbell, N.; Cuthill, I.C. Spotting the difference: Towards fully-automated population monitoring of African penguins Spheniscus demersus. Endanger. Species Res. 2010, 11, 101–111. [Google Scholar] [CrossRef]
- Arzoumanian, Z.; Holmberg, J.; Norman, B. An astronomical pattern-matching algorithm for computer-aided identification of whale sharks Rhincodon typus. J. Appl. Ecol. 2005, 42, 999–1011. [Google Scholar] [CrossRef]
- Bonnell, T.R.; Henzi, S.P.; Barrett, L. Sparse movement data can reveal social influences on individual travel decisions. arXiv 2015, arXiv:1511.01536. [Google Scholar]
- Hiby, L.; Lovell, P.; Patil, N.; Kumar, N.S.; Gopalaswamy, A.M.; Karanth, K.U. A tiger cannot change its stripes: Using a three-dimensional model to match images of living tigers and tiger skins. Biol. Lett. 2009, 5, 383–386. [Google Scholar] [CrossRef]
- Loos, A.; Ernst, A. An automated chimpanzee identification system using face detection and recognition. EURASIP J. Image Video Process. 2013, 2013, 49. [Google Scholar] [CrossRef]
- Crouse, D.; Jacobs, R.L.; Richardson, Z.; Klum, S.; Jain, A.; Baden, A.L.; Tecot, S.R. LemurFaceID: A face recognition system to facilitate individual identification of lemurs. BMC Zool. 2017, 2, 562. [Google Scholar] [CrossRef] [Green Version]
- Barry, B.; Gonzales-Barron, U.A.; McDonnell, K.; Butler, F.; Ward, S. Using Muzzle Pattern Recognition as a Biometric Approach for Cattle Identification. Trans. ASABE 2007, 50, 1073–1080. [Google Scholar] [CrossRef]
- Awad, A.I.; Zawbaa, H.M.; Mahmoud, H.A.; Nabi, E.H.H.A.; Fayed, R.H.; Hassanien, A.E. A robust cattle identification scheme using muzzle print images. In Proceedings of the 2013 Federated Conference on Computer Science and Information Systems (FedCSIS), Krakow, Poland, 8–11 September 2013. [Google Scholar]
- Zhao, K.; Jin, X.; Ji, J.; Wang, J.; Ma, H.; Zhu, Z. Individual identification of Holstein dairy cows based on detecting and matching feature points in body images. Biosyst. Eng. 2019, 181, 128–139. [Google Scholar] [CrossRef]
- Corkery, G.; Gonzales-Barron, U.A.; Butler, F.; McDonnell, K.; Ward, S. A Preliminary Investigation on Face Recognition as a Biometric Identifier of Sheep. Trans. ASABE 2007, 50, 313–320. [Google Scholar] [CrossRef]
- Barron, U.G.; Corkery, G.; Barry, B.; Butler, F.; McDonnell, K.; Ward, S. Assessment of retinal recognition technology as a biometric method for sheep identification. Comput. Electron. Agric. 2008, 60, 156–166. [Google Scholar] [CrossRef]
- Jarraya, I.; Ouarda, W.; Alimi, A.M. A preliminary investigation on horses recognition using facial texture features. In Proceedings of the 2015 IEEE International Conference on Systems, Man, and Cybernetics (SMC), Hong Kong, China, 9–12 October 2015. [Google Scholar]
- Jarraya, I.; Ouarda, W.; Alimi, A.M. Deep neural network features for horses identity recognition using multiview horses’ face pattern. In Proceedings of the Ninth International Conference on Machine Vision (ICMV 2016), Nice, France, 18–20 November 2016; International Society for Optics and Photonics: Bellingham, WA, USA, 2017. [Google Scholar]
- Hansen, M.F.; Smith, M.L.; Smith, L.N.; Salter, M.G.; Baxter, E.M.; Farish, M.; Grieve, B. Towards on-farm pig face recognition using convolutional neural networks. Comput. Ind. 2018, 98, 145–152. [Google Scholar] [CrossRef]
- Wang, J.; Liu, A.; Xiao, J. Video-Based Pig Recognition with Feature-Integrated Transfer Learning. In Proceedings of the Chinese Conference on Biometric Recognition, Urumchi, China, 11–12 August 2018; Springer: Berlin/Heidelberg, Germany, 2018. [Google Scholar]
- Kim, H.T.; Choi, H.L.; Lee, D.W.; Yoon, Y.C. Recognition of Individual Holstein Cattle by Imaging Body Patterns. Asian-Australas. J. Anim. Sci. 2005, 18, 1194–1198. [Google Scholar] [CrossRef]
- Andrew, W.; Hannuna, S.; Campbell, N.; Burghardt, T. Automatic individual holstein friesian cattle identification via selective local coat pattern matching in RGB-D imagery. In Proceedings of the 2016 IEEE International Conference on Image Processing (ICIP), Phoenix, AZ, USA, 25–28 September 2016. [Google Scholar]
- Cai, C.; Li, J. Cattle face recognition using local binary pattern descriptor. In Proceedings of the Signal and Information Processing Association Annual Summit and Conference (APSIPA), 2013 Asia-Pacific, Kaohsiung, Taiwan, 29 October–1 November 2013. [Google Scholar]
- 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]
- Qiao, Y.; Su, D.; Kong, H.; Sukkarieh, S.; Lomax, S.; Clark, C. Individual Cattle Identification Using a Deep Learning Based Framework. IFAC-PapersOnLine 2019, 52, 318–323. [Google Scholar] [CrossRef]
- Tharwat, A.; Gaber, T.; Hassanien, A.E. Two biometric approaches for cattle identification based on features and classifiers fusion. Int. J. Image Min. 2015, 1, 342–365. [Google Scholar] [CrossRef]
- Kumar, S.; Singh, S.K.; Singh, A.K. Muzzle point pattern based techniques for individual cattle identification. IET Image Process. 2017, 11, 805–814. [Google Scholar] [CrossRef]
- Kumar, S.; Pandey, A.; Sai, K.; Kumar, S.; Singh, S.K.; Singh, A.K.; Mohan, A. Deep learning framework for recognition of cattle using muzzle point image pattern. Measurement 2018, 116, 1–17. [Google Scholar] [CrossRef]
- Xu, B.; Wang, W.; Guo, L.; Chen, G.; Wang, Y.; Zhang, W.; Li, Y. Evaluation of Deep Learning for Automatic Multi-View Face Detection in Cattle. Agriculture 2021, 11, 1062. [Google Scholar] [CrossRef]
- Baranov, A.S.; Graml, R.; Pirchner, F.; Schmid, D.O. Breed differences and intra-breed genetic variability of dermatoglyphic pattern of cattle. J. Anim. Breed. Genet. 1993, 110, 385–392. [Google Scholar] [CrossRef]
- Kumar, S.; Singh, S.K.; Singh, R.S.; Singh, A.K.; Tiwari, S. Real-time recognition of cattle using animal biometrics. J. Real-Time Image Process. 2016, 13, 505–526. [Google Scholar] [CrossRef]
- Mahmoud, H.A.; Hadad, H.M.R.E. Automatic cattle muzzle print classification system using multiclass support vector machine. Int. J. Image Min. 2015, 1, 126–140. [Google Scholar] [CrossRef]
- Tharwat, A.; Gaber, T.; Hassanien, A.E. Cattle Identification Based on Muzzle Images Using Gabor Features and SVM Classifier; Springer International Publishing: Cham, Switzerland, 2014. [Google Scholar]
- Kumar, S.; Singh, S.K.; Abidi, A.I.; Datta, D.; Sangaiah, A.K. Group Sparse Representation Approach for Recognition of Cattle on Muzzle Point Images. Int. J. Parallel Program. 2017, 46, 812–837. [Google Scholar] [CrossRef]
- Kumar, S.; Singh, S.K. Automatic identification of cattle using muzzle point pattern: A hybrid feature extraction and classification paradigm. Multimedia Tools Appl. 2017, 76, 26551–26580. [Google Scholar] [CrossRef]
- El-Henawy, I.; El Bakry, H.M.; El Hadad, H.M. A new muzzle classification model using decision tree classifier. Int. J. Electron. Inf. Eng. 2017, 6, 12–24. [Google Scholar]
- Gaber, T.; Tharwat, A.; Hassanien, A.E.; Vaclav, S. Biometric cattle identification approach based on Weber’s Local Descriptor and AdaBoost classifier. Comput. Electron. Agric. 2016, 122, 55–66. [Google Scholar] [CrossRef] [Green Version]
- Noviyanto, A.; Arymurthy, A.M. Beef cattle identification based on muzzle pattern using a matching refinement technique in the SIFT method. Comput. Electron. Agric. 2013, 99, 77–84. [Google Scholar] [CrossRef]
- Awad, A.I.; Hassaballah, M. Bag-of-Visual-Words for Cattle Identification from Muzzle Print Images. Appl. Sci. 2019, 9, 4914. [Google Scholar] [CrossRef] [Green Version]
- Tokyo. Canon Lense. Japan-Lense. Available online: https://www.canon.com.au/camera-lenses/ef-s-18-55mm-f-4-5-6-is-stm (accessed on 1 February 2019).
- Redmon, J.; Divvala, S.; Girshick, R.; Farhadi, A. You only look once: Unified, real-time object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016. [Google Scholar]
- Redmon, J.; Farhadi, A. Yolov3: An incremental improvement. arXiv 2018, arXiv:1804.02767. [Google Scholar]
- Du, J. Understanding of Object Detection Based on CNN Family and YOLO. J. Phys. Conf. Ser. 2018, 1004, 012029. [Google Scholar] [CrossRef]
- Deng, J.; Dong, W.; Socher, R.; Li, L.; 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, CVPR 2009, Miami, FL, USA, 20–25 June 2009. [Google Scholar]
- Clark, A. Pillow (PIL Fork) Documentation; 2015. Available online: https://buildmedia.readthedocs.org/media/pdf/pillow/latest/pillow.pdf (accessed on 12 June 2019).
- VoTT. 2019. Available online: https://github.com/microsoft/VoTT (accessed on 10 May 2019).
- Tharwat, A.; Gaber, T.; Hassanien, A.E.; Hassanien, H.A.; Tolba, M.F. Cattle Identification Using Muzzle Print Images Based on Texture Features Approach; Springer International Publishing: Cham, Switzerland, 2014. [Google Scholar]
- Ahmed, S.; Gaber, T.; Tharwat, A.; Hassanien, A.E.; Snael, V. Muzzle-based cattle identification using speed up robust feature approach. In Proceedings of the 2015 International Conference on Intelligent Networking and Collaborative Systems (INCOS), Taipei, Taiwan, 2–4 September 2015. [Google Scholar]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016. [Google Scholar]
- Theckedath, D.; Sedamkar, R.R. Detecting Affect States Using VGG16, ResNet50 and SE-ResNet50 Networks. SN Comput. Sci. 2020, 1, 79. [Google Scholar] [CrossRef] [Green Version]
- Al-Haija, Q.A.; Adebanjo, A. Breast Cancer Diagnosis in Histopathological Images Using ResNet-50 Convolutional Neural Network. In Proceedings of the 2020 IEEE International IOT, Electronics and Mechatronics Conference (IEMTRONICS), Vancouver, BC, Canada, 9–12 September 2020. [Google Scholar]
- Islam, M.; Tasnim, N.; Baek, J.-H. Human Gender Classification Using Transfer Learning via Pareto Frontier CNN Networks. Inventions 2020, 5, 16. [Google Scholar] [CrossRef] [Green Version]
- Niu, W.; Ma, X.; Wang, Y.; Ren, B. 26ms inference time for resnet-50: Towards real-time execution of all dnns on smartphone. arXiv 2019, arXiv:1905.00571. [Google Scholar]
- Shahinfar, S.; Meek, P.; Falzon, G. “How many images do I need?” Understanding how sample size per class affects deep learning model performance metrics for balanced designs in autonomous wildlife monitoring. Ecol. Inform. 2020, 57, 101085. [Google Scholar] [CrossRef]
- Chollet, F. Keras: The Python Deep Learning Library; Astrophysics Source Code Library: New York, NY, USA, 2018. [Google Scholar]
- Abadi, M.; Barham, P.; Chen, J.; Chen, Z.; Davis, A.; Dean, J.; Devin, M.; Ghemawat, S.; Irving, G.; Isard, M. Tensorflow: A system for large-scale machine learning. In Proceedings of the 12th {USENIX} Symposium on Operating Systems Design and Implementation ({OSDI} 16), Savannah, GA, USA, 2–4 November 2016. [Google Scholar]
- Kingma, D.P.; Ba, J. Adam: A method for stochastic optimization. arXiv 2014, arXiv:1412.6980. [Google Scholar]
- Tang, Y. Deep learning using linear support vector machines. arXiv 2013, arXiv:1306.0239. [Google Scholar]
- Cunningham, P.; Delany, S.J. k-Nearest neighbour classifiers: (with Python examples). arXiv 2020, arXiv:2004.04523. [Google Scholar]
- Desai, M.; Shah, M. An anatomization on breast cancer detection and diagnosis employing multi-layer perceptron neural network (MLP) and Convolutional neural network (CNN). Clin. eHealth 2020, 4, 1–11. [Google Scholar] [CrossRef]
- Andrew, W.; Greatwood, C.; Burghardt, T. Visual localisation and individual identification of Holstein Friesian cattle via deep learning. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), Venice, Italy, 22–29 October 2017. [Google Scholar]
- Andrew, W.; Gao, J.; Mullan, S.; Campbell, N.; Dowsey, A.W.; Burghardt, T. Visual identification of individual Holstein-Friesian cattle via deep metric learning. Comput. Electron. Agric. 2021, 185, 106133. [Google Scholar] [CrossRef]
- El-Henawy, I.; El-Bakry, H.; El-Hadad, H. Muzzle Classification Using Neural Networks. Int. Arab. J. Inf. Technol. (IAJIT) 2017, 14, 464–472. [Google Scholar]
Hardware | Type |
---|---|
CPU | Intel Core i9-9940X (14 Cores, 3.30 GHz) |
Memory | 128 GB |
GPU | 4× NVLinked RTX 6000 |
Hard Disk | 2 TB |
608 × 832 Resolution | 832 × 1024 Resolution | 1024 × 1024 Resolution | |
---|---|---|---|
True Positive Rate | 92.56 | 98.23 | 99.11 |
False Positive Rate | 0 | 0 | 0 |
True Negative Rate | 100 | 100 | 100 |
False Negative Rate | 7.44 | 1.77 | 0.89 |
Accuracy | 92.75% | 98.27% | 99.13% |
Process | Number of Trainable Conv-Layers of ResNet | Number of Trainable Parameters | Average Validation Accuracy |
---|---|---|---|
From Scratch | 50 | 23,534,592 | 55.97 |
Transfer learning | 0 | 614,700 | 90.52 |
Fine-tuning last Conv- layer | 1 | 1,054,720 | 93.32 |
Fine-tuning last 3 Conv-layers | 3 | 4,465,664 | 96.80 |
Classifier | Accuracy | Inference Time (s) |
---|---|---|
SoftMax | 99.11% | 0.0259 |
KNN | 98.57% | 0.0295 |
SVM | 98.22% | 0.0298 |
MLP | 97.33% | 0.0259 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 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
Shojaeipour, A.; Falzon, G.; Kwan, P.; Hadavi, N.; Cowley, F.C.; Paul, D. Automated Muzzle Detection and Biometric Identification via Few-Shot Deep Transfer Learning of Mixed Breed Cattle. Agronomy 2021, 11, 2365. https://doi.org/10.3390/agronomy11112365
Shojaeipour A, Falzon G, Kwan P, Hadavi N, Cowley FC, Paul D. Automated Muzzle Detection and Biometric Identification via Few-Shot Deep Transfer Learning of Mixed Breed Cattle. Agronomy. 2021; 11(11):2365. https://doi.org/10.3390/agronomy11112365
Chicago/Turabian StyleShojaeipour, Ali, Greg Falzon, Paul Kwan, Nooshin Hadavi, Frances C. Cowley, and David Paul. 2021. "Automated Muzzle Detection and Biometric Identification via Few-Shot Deep Transfer Learning of Mixed Breed Cattle" Agronomy 11, no. 11: 2365. https://doi.org/10.3390/agronomy11112365
APA StyleShojaeipour, A., Falzon, G., Kwan, P., Hadavi, N., Cowley, F. C., & Paul, D. (2021). Automated Muzzle Detection and Biometric Identification via Few-Shot Deep Transfer Learning of Mixed Breed Cattle. Agronomy, 11(11), 2365. https://doi.org/10.3390/agronomy11112365