Identification of Individual Hanwoo Cattle by Muzzle Pattern Images through Deep Learning
<p>Resemblance of the appearance among <span class="html-italic">Hanwoo</span> cattle.</p> "> Figure 2
<p>Samples of image data with national livestock traceability numbers. The national livestock traceability number is a unique identifier assigned to cattle at birth by the nation in order to identify individuals within the cattle population.</p> "> Figure 3
<p>Example of cropping muzzle in the image with YOLO v8-based crop model.</p> "> Figure 4
<p>Efficientnet v2-s Architecture—(<b>a</b>) represents the schematic of the model from image input to logit output. The numbers indicated on the right side of the boxes represent the layer numbers, while the numbers displayed below the boxes indicate the corresponding stride and channels. (<b>b</b>–<b>e</b>) are the schematic of each specific algorithm in (<b>a</b>); Fused-MBConv1, Fused-MBConv4 (k3 × 3), MBConv4 (k3 × 3), and MBConv6 (k3 × 3), respectively. The abbreviations are expanded as follows: MBConv as mobile vision convolutional network, SE as squeeze and excitation, FC as full connect, DW as depth wise, BN as batch normalization, H as height, W as width and F as number of channels.</p> "> Figure 5
<p>Training loss (<b>a</b>) and training accuracy (<b>b</b>) visualized through transfer learning across all models.</p> "> Figure 5 Cont.
<p>Training loss (<b>a</b>) and training accuracy (<b>b</b>) visualized through transfer learning across all models.</p> "> Figure 6
<p>Validation loss (<b>a</b>) and validation accuracy (<b>b</b>) visualized through transfer learning across all models.</p> "> Figure 6 Cont.
<p>Validation loss (<b>a</b>) and validation accuracy (<b>b</b>) visualized through transfer learning across all models.</p> ">
Abstract
:Simple Summary
Abstract
1. Introduction
2. Materials and Methods
2.1. Training Dataset
2.2. Data Transformation
2.3. Data Loader
2.4. Transfer Learning
2.4.1. Model
2.4.2. Loss Function
2.4.3. Optimizer Algorithms
2.4.4. Learning Rate Schedular
2.4.5. Epochs
2.5. Computing Resources
- CPU: Intel(R) Xeon(R) w5-3433 1.99 GHz;
- RAM: 256 GB of DDR4 RAM;
- GPU: NVIDIA GeForce RTX 4090.
- Operating system: Microsoft Windows 10.0.19045.3324 version 22H2;
- CUDA: CUDA Version: 11.8;
- Python: 3.11.4;
- PyTorch: 2.0.0.
3. Results
3.1. Loss and Accuracy Metrics through Transfer Learning through Train and Validation Data
3.2. Prediction Result on Test Dataset
4. Discussion
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Koch, R.M.; Swiger, L.A.; Chambers, D.; Gregory, K.E. Efficiency of Feed Use in Beef Cattle. J. Anim. Sci. 1963, 22, 486–494. [Google Scholar] [CrossRef]
- Chung, K.Y.; Lee, S.H.; Cho, S.H.; Kwon, E.G.; Lee, J.H. Current Situation and Future Prospects for Beef Production in South Korea—A Review. Asian-Australas. J. Anim. Sci. 2018, 31, 951–960. [Google Scholar] [CrossRef] [PubMed]
- Fosgate, G.T.; Adesiyun, A.A.; Hird, D.W. Ear-Tag Retention and Identification Methods for Extensively Managed Water Buffalo (Bubalus Bubalis) in Trinidad. Prev. Vet. Med. 2006, 73, 287–296. [Google Scholar] [CrossRef] [PubMed]
- Jain, A.; Bolle, R.; Pankanti, S. Introduction to Biometrics. In Biometrics: Personal Identification in Networked Society; Jain, A.K., Bolle, R., Pankanti, S., Eds.; Springer: Boston, MA, USA, 1996; pp. 1–41. ISBN 978-0-306-47044-8. [Google Scholar]
- El Hadad, H.M.; Mahmoud, H.A.; Mousa, F.A. Bovines Muzzle Classification Based on Machine Learning Techniques. Procedia Comput. Sci. 2015, 65, 864–871. [Google Scholar] [CrossRef]
- Brownlee, J. Deep Learning for Computer Vision: Image Classification, Object Detection, and Face Recognition in Python; Machine Learning Mastery: Vermont, Australia, 2019. [Google Scholar]
- Deng, J.; Berg, A.C.; Li, K.; Li, F.-F. What Does Classifying More Than 10,000 Image Categories Tell Us? In Proceedings of the Computer Vision—ECCV 2010; Daniilidis, K., Maragos, P., Paragios, N., Eds.; Springer: Berlin/Heidelberg, Germany, 2010; pp. 71–84. [Google Scholar]
- Mitchell, T.M. Machine Learning. 1997. Available online: https://www.cin.ufpe.br/~cavmj/Machine%20-%20Learning%20-%20Tom%20Mitchell.pdf (accessed on 17 July 2023).
- Bello, R.W.; Olubummo, D.A.; Seiyaboh, Z.; Enuma, O.C.; Talib, A.Z.; Mohamed, A.S.A. Cattle Identification: The History of Nose Prints Approach in Brief. IOP Conf. Ser. Earth Environ. Sci. 2020, 594, 012026. [Google Scholar] [CrossRef]
- Kusakunniran, W.; Wiratsudakul, A.; Chuachan, U.; Imaromkul, T.; Kanchanapreechakorn, S.; Suksriupatham, N.; Thongkanchorn, K. Analysing muzzle pattern images as a biometric for cattle identification. Int. J. Biom. 2021, 13, 367–384. [Google Scholar] [CrossRef]
- Jocher, G.; Chaurasia, A.; Qiu, J. YOLO by Ultralytics 2023. Available online: https://github.com/ultralytics/ultralytics (accessed on 17 July 2023).
- Jiang, Y.; Cukic, B.; Menzies, T. Can Data Transformation Help in the Detection of Fault-Prone Modules? In Proceedings of the 2008 Workshop on Defects in Large Software Systems, Seattle, WA, USA, 20 July 2008; Association for Computing Machinery: New York, NY, USA, 2008; pp. 16–20. [Google Scholar]
- Finlayson, G.D.; Schiele, B.; Crowley, J.L. Comprehensive Colour Image Normalization. In Proceedings of the Computer Vision—ECCV’98, Freiburg, Germany, 2–6 June 1998; Burkhardt, H., Neumann, B., Eds.; Springer: Berlin/Heidelberg, Germany, 1998; pp. 475–490. [Google Scholar]
- Ma, X.; Huang, H.; Wang, Y.; Romano, S.; Erfani, S.; Bailey, J. Normalized Loss Functions for Deep Learning with Noisy Labels. In Proceedings of the 37th International Conference on Machine Learning, Virtual, 13–18 July 2020; pp. 6543–6553. [Google Scholar]
- Giese, A.; Seitzer, J. Using a Genetic Algorithm to Evolve a D* Search Heuristic. 2011, p. 72. Available online: https://ceur-ws.org/Vol-710/paper31.pdf (accessed on 17 July 2023).
- Tan, M.; Le, Q.V. EfficientNetV2: Smaller Models and Faster Training. In Proceedings of the 38th International Conference on Machine Learning, Virtual, 18–24 July 2021. [Google Scholar]
- Tan, M.; Chen, B.; Pang, R.; Vasudevan, V.; Sandler, M.; Howard, A.; Le, Q.V. MnasNet: Platform-Aware Neural Architecture Search for Mobile. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, CA, USA, 15–20 June 2019; pp. 2820–2828. [Google Scholar]
- Tan, M.; Le, Q. EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks. In Proceedings of the 36th International Conference on Machine Learning, Long Beach, CA, USA, 24 May 2019; pp. 6105–6114. [Google Scholar]
- Garland, J.; Gregg, D. Low Complexity Multiply-Accumulate Units for Convolutional Neural Networks with Weight-Sharing. ACM Trans. Archit. Code Optim. 2018, 15, 1–24. [Google Scholar] [CrossRef]
- Sukhbaatar, S.; Bruna, J.; Paluri, M.; Bourdev, L.; Fergus, R. Training Convolutional Networks with Noisy Labels. arXiv 2015, arXiv:1406.2080. [Google Scholar]
- Bottou, L. Large-Scale Machine Learning with Stochastic Gradient Descent. In Proceedings of the COMPSTAT’2010, Paris France, 22–27 August 2010; Lechevallier, Y., Saporta, G., Eds.; Physica-Verlag HD: Heidelberg, Germany, 2010; pp. 177–186. [Google Scholar]
- Kurbiel, T.; Khaleghian, S. Training of Deep Neural Networks Based on Distance Measures Using RMSProp. arXiv 2017, arXiv:1708.01911. [Google Scholar]
- Kingma, D.P.; Ba, J. Adam: A Method for Stochastic Optimization. arXiv 2017, arXiv:1412.6980. [Google Scholar]
- Chen, X.; Liang, C.; Huang, D.; Real, E.; Wang, K.; Liu, Y.; Pham, H.; Dong, X.; Luong, T.; Hsieh, C.-J.; et al. Symbolic Discovery of Optimization Algorithms. arXiv 2023, arXiv:2302.06675. [Google Scholar]
- Smith, L.N. A Disciplined Approach to Neural Network Hyper-Parameters: Part 1—Learning Rate, Batch Size, Momentum, and Weight Decay. arXiv 2018, arXiv:1803.09820. [Google Scholar]
- Smith, L.N. Cyclical Learning Rates for Training Neural Networks. In Proceedings of the 2017 IEEE Winter Conference on Applications of Computer Vision (WACV), Santa Rosa, CA, USA, 24–31 March 2017; pp. 464–472. [Google Scholar]
- Agarwal, S.; Mozafari, B.; Panda, A.; Milner, H.; Madden, S.; Stoica, I. BlinkDB: Queries with Bounded Errors and Bounded Response Times on Very Large Data. In Proceedings of the 8th ACM European Conference on Computer Systems, Prague, Czech Republic, 15–17 April 2013; Association for Computing Machinery: New York, NY, USA, 2013; pp. 29–42. [Google Scholar]
- Maind, S.B.; Wankar, P. Research Paper on Basic of Artificial Neural Network. Int. J. Recent Innov. Trends Comput. Commun. 2014, 2, 96–100. [Google Scholar]
- Komarinski, P.D. Automated Fingerprint Identification Systems. In Cold Case Homicides; CRC Press: Boca Raton, FL, USA, 2017; ISBN 978-1-315-22825-9. [Google Scholar]
- Reimers, C.; Runge, J.; Denzler, J. Determining the Relevance of Features for Deep Neural Networks. In Proceedings of the Computer Vision—ECCV 2020, Glasgow, UK, 23–28 August 2020; Vedaldi, A., Bischof, H., Brox, T., Frahm, J.-M., Eds.; Springer International Publishing: Cham, Switzerland, 2020; pp. 330–346. [Google Scholar]
Region | Location (Latitude, Longitude) | Number of Animals | Images |
---|---|---|---|
Jeongeup-si | 35.62934, 126.87748 | 235 | 6160 |
Wonju-si | 37.20481, 127.5141 | 101 | 3070 |
Sum | 336 |
Parameters | Train Data | Validation Data | Test Data |
---|---|---|---|
Resize | 224 × 224 pixels | 224 × 224 pixels | 224 × 224 pixels |
Horizontal flip | Random | Random | None |
Vertical flip | Random | Random | None |
Rotation | 0–20 degrees | 0–20 degrees | None |
RGB mean value RGB standard deviation | [0.485, 0.456, 0.406], [0.229, 0.224, 0.225] | [0.485, 0.456, 0.406], [0.229, 0.224, 0.225] | [0.485, 0.456, 0.406], [0.229, 0.224, 0.225] |
Predicted Negative | Predicted Positive | |
---|---|---|
Actual negative | True negative | False positive |
Actual positive | False negative | True positive |
Efficientnet v2 Tiny | Efficientnet v2 Small | Efficientnet v2 Medium | |
---|---|---|---|
Parameters (million) | 13.6 | 23.9 | 53.2 |
GMACs (giga) | 1.9 | 4.9 | 12.7 |
Activation (million) | 9.9 | 21.4 | 47.1 |
Model | Best Epoch | Epoch Time (s) | Train_loss | Train_acc | Val_loss | Val_acc |
---|---|---|---|---|---|---|
Tiny-SGD | 97 | 59 | 2.638 | 0.489 | 2.381 | 0.539 |
Tiny-RMSprop | 97 | 62 | 0.310 | 0.917 | 0.261 | 0.932 |
Tiny-Adam | 44 | 58.5 | 0.133 | 0.968 | 0.104 | 0.976 |
Tiny-Lion | 55 | 54.9 | 0.136 | 0.966 | 0.098 | 0.976 |
Small-SGD | 38 | 62.2 | 5.791 | 0.008 | 5.793 | 0.014 |
Small-RMSprop | 26 | 59.1 | 0.141 | 0.962 | 0.091 | 0.977 |
Small-Adam | 67 | 58.5 | 0.111 | 0.972 | 0.090 | 0.978 |
Small-Lion | 36 | 59 | 0.090 | 0.976 | 0.077 | 0.981 |
Medium-SGD | 89 | 60.5 | 5.803 | 0.007 | 5.804 | 0.011 |
Medium-RMSprop | 97 | 60.2 | 0.265 | 0.937 | 0.371 | 0.907 |
Medium-Adam | 51 | 65.3 | 0.138 | 0.968 | 0.231 | 0.944 |
Medium-Lion | 22 | 65.1 | 0.131 | 0.968 | 0.256 | 0.942 |
Model | Test Accuracy | Testing Time (s) | Error | Repeated Error |
---|---|---|---|---|
Tiny-Adam | 0.967 | 18.6 | 92 | 14 |
Tiny-Lion | 0.967 | 18.2 | 92 | 12 |
Small-RMSprop | 0.968 | 18.3 | 91 | 3 |
Small-Adam | 0.970 | 17.9 | 95 | 9 |
Small-Lion | 0.965 | 18.2 | 100 | 18 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 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
Lee, T.; Na, Y.; Kim, B.G.; Lee, S.; Choi, Y. Identification of Individual Hanwoo Cattle by Muzzle Pattern Images through Deep Learning. Animals 2023, 13, 2856. https://doi.org/10.3390/ani13182856
Lee T, Na Y, Kim BG, Lee S, Choi Y. Identification of Individual Hanwoo Cattle by Muzzle Pattern Images through Deep Learning. Animals. 2023; 13(18):2856. https://doi.org/10.3390/ani13182856
Chicago/Turabian StyleLee, Taejun, Youngjun Na, Beob Gyun Kim, Sangrak Lee, and Yongjun Choi. 2023. "Identification of Individual Hanwoo Cattle by Muzzle Pattern Images through Deep Learning" Animals 13, no. 18: 2856. https://doi.org/10.3390/ani13182856
APA StyleLee, T., Na, Y., Kim, B. G., Lee, S., & Choi, Y. (2023). Identification of Individual Hanwoo Cattle by Muzzle Pattern Images through Deep Learning. Animals, 13(18), 2856. https://doi.org/10.3390/ani13182856