Automated Classification System Based on YOLO Architecture for Body Condition Score in Dairy Cows
Abstract
:Simple Summary
Abstract
1. Introduction
- This study produced an original large-scale dataset of images collected from 20 different farms for different breeds of cows, including Simmental and Holstein;
- The BCS scale in cows was divided into five different classes of Emaciated, Poor, Good, Fat, and Obese;
- Hyperparameter optimization in the single-stage structure of the YOLOv8x deep learning architecture for BCS classification in dairy cows is proposed for the first time to the best of our knowledge;
- The performance of the proposed work is compared with that of other previously proposed state-of-the-art methods and it is verified that it contributes in terms of accuracy.
2. Materials and Methods
2.1. Dataset
2.2. YOLOv8x
2.3. Infrastructure of Hardware and Software
3. Results
4. Discussion
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Appendix A
Appendix B
References
- Støier, S.; Larsen, H.; Aaslyng, M.; Lykke, L. Improved animal welfare, the right technology and increased business. Meat Sci. 2016, 120, 71–77. [Google Scholar] [CrossRef] [PubMed]
- Tufarelli, V.; Puvača, N.; Glamočić, D.; Pugliese, G.; Colonna, M.A. The Most Important Metabolic Diseases in Dairy Cattle during the Transition Period. Animals 2024, 14, 816. [Google Scholar] [CrossRef] [PubMed]
- Sundrum, A. Metabolic disorders in the transition period indicate that the dairy cows’ ability to adapt is overstressed. Animals 2015, 5, 978–1020. [Google Scholar] [CrossRef] [PubMed]
- Pires, J.; Delavaud, C.; Faulconnier, Y.; Pomies, D.; Chilliard, Y. Effects of body condition score at calving on indicators of fat and protein mobilization of periparturient Holstein-Friesian cows. J. Dairy Sci. 2013, 96, 6423–6439. [Google Scholar] [CrossRef]
- Bewley, J.; Peacock, A.; Lewis, O.; Boyce, R.; Roberts, D.; Coffey, M.; Kenyon, S.; Schutz, M. Potential for estimation of body condition scores in dairy cattle from digital images. J. Dairy Sci. 2008, 91, 3439–3453. [Google Scholar] [CrossRef]
- Schröder, U.; Staufenbiel, R. Invited review: Methods to determine body fat reserves in the dairy cow with special regard to ultrasonographic measurement of backfat thickness. J. Dairy Sci. 2006, 89, 1–14. [Google Scholar] [CrossRef]
- Eulmi, H.; Deghnouche, K.; Gherissi, D. Dairy cattle breeding practices, production and constraints in arid and semi-arid Algerian bioclimatic environments. Int. J. Environ. Stud. 2023, 81, 1238–1255. [Google Scholar] [CrossRef]
- Sabapara, G.; Desai, P.; Kharadi, V.; Saiyed, L.; Ranjeet Singh, R. Housing and feeding management practices of dairy animals in the tribal area of South Gujarat. Indian J. Anim. Sci. 2010, 80, 1022. [Google Scholar]
- Roche, J.R.; Friggens, N.C.; Kay, J.K.; Fisher, M.W.; Stafford, K.J.; Berry, D.P. Invited review: Body condition score and its association with dairy cow productivity, health, and welfare. J. Dairy Sci. 2009, 92, 5769–5801. [Google Scholar] [CrossRef]
- Galiç, A. Determination of the body condition score and its relationship with milk yield in Turkish holstein cows. J. Agric. Sci. 2017, 23, 464–471. [Google Scholar]
- Huang, X.; Hu, Z.; Wang, X.; Yang, X.; Zhang, J.; Shi, D. An improved single shot multibox detector method applied in body condition score for dairy cows. Animals 2019, 9, 470. [Google Scholar] [CrossRef] [PubMed]
- Çevik, K.K.; Boğa, M. Body condition score (BCS) segmentation and classification in dairy cows using R-CNN deep learning architecture. Avrupa Bilim Ve Teknol. Derg. 2019, 17, 1248–1255. [Google Scholar]
- Liu, D.; He, D.; Norton, T. Automatic estimation of dairy cattle body condition score from depth image using ensemble model. Biosyst. Eng. 2020, 194, 16–27. [Google Scholar] [CrossRef]
- Ferguson, J.; Azzaro, G.; Licitra, G. Body condition assessment using digital images. J. Dairy Sci. 2006, 89, 3833–3841. [Google Scholar] [CrossRef]
- Wildman, E.; Jones, G.; Wagner, P.; Boman, R.; Troutt Jr, H.; Lesch, T. A dairy cow body condition scoring system and its relationship to selected production characteristics. J. Dairy Sci. 1982, 65, 495–501. [Google Scholar] [CrossRef]
- Earle, D.F. A guide to scoring dairy cow condition. J. Agric. Vic. 1976, 74, 228–231. [Google Scholar]
- Staufenbiel, R. Konditionsbeurteilung von Milchkühen mit Hilfe der sonographischen Rückenfettdickenmessung. Prakt. Tierarzt Coll. Vet 1997, 27, 87–92. [Google Scholar]
- Macdonald, K.A.; Roche, J.R. Condition Scoring Made Easy, Condition Scoring Dairy Herds, 1st ed.; Dexcel Ltd.: Whakatane, New Zealand, 2004. [Google Scholar]
- Edmonson, A.; Lean, I.; Weaver, L.; Farver, T.; Webster, G. A body condition scoring chart for Holstein dairy cows. J. Dairy Sci. 1989, 72, 68–78. [Google Scholar] [CrossRef]
- Bercovich, A.; Edan, Y.; Alchanatis, V.; Moallem, U.; Parmet, Y.; Honig, H.; Maltz, E.; Antler, A.; Halachmi, I. Development of an automatic cow body condition scoring using body shape signature and Fourier descriptors. J. Dairy Sci. 2013, 96, 8047–8059. [Google Scholar] [CrossRef]
- Markusfeld, O.; Galon, N.; Ezra, E. Body condition score, health, yield and fertility in dairy cows. Vet. Rec. 1997, 141, 67–72. [Google Scholar] [CrossRef]
- Atalay, H. The effect of body condition score on nutritional diseases and milk yield in dairy cattle. Turk. J. Vet. Anim. Sci. 2019, 43, 692–697. [Google Scholar] [CrossRef]
- Grandin, T. On-farm conditions that compromise animal welfare that can be monitored at the slaughter plant. Meat Sci. 2017, 132, 52–58. [Google Scholar] [CrossRef] [PubMed]
- Werkheiser, I. Technology and responsibility: A discussion of underexamined risks and concerns in precision livestock farming. Anim. Front. 2020, 10, 51–57. [Google Scholar] [CrossRef] [PubMed]
- Silva, S.R.; Araujo, J.P.; Guedes, C.; Silva, F.; Almeida, M.; Cerqueira, J.L. Precision technologies to address dairy cattle welfare: Focus on lameness, mastitis and body condition. Animals 2021, 11, 2253. [Google Scholar] [CrossRef]
- Azzaro, G.; Caccamo, M.; Ferguson, J.D.; Battiato, S.; Farinella, G.M.; Guarnera, G.C.; Puglisi, G.; Petriglieri, R.; Licitra, G. Objective estimation of body condition score by modeling cow body shape from digital images. J. Dairy Sci. 2011, 94, 2126–2137. [Google Scholar] [CrossRef]
- Garnsworthy, P.C. Body condition score in dairy cows: Targets for production and fertility. Recent Adv. Anim. Nutr. 2006, 40, 61. [Google Scholar] [CrossRef]
- Shi, W.; Dai, B.; Shen, W.; Sun, Y.; Zhao, K.; Zhang, Y. Automatic estimation of dairy cow body condition score based on attention-guided 3D point cloud feature extraction. Comput. Electron. Agric. 2023, 206, 107666. [Google Scholar] [CrossRef]
- Zhao, K.; Zhang, M.; Shen, W.; Liu, X.; Ji, J.; Dai, B.; Zhang, R. Automatic body condition scoring for dairy cows based on efficient net and convex hull features of point clouds. Comput. Electron. Agric. 2023, 205, 107588. [Google Scholar] [CrossRef]
- Poczynek, M.; Nogueira, L.d.S.; Carrari, I.F.; Carneiro, J.H.; Almeida, R.d. Associations of body condition score at calving, parity, and calving season on the performance of dairy cows and their offspring. Animals 2023, 13, 596. [Google Scholar] [CrossRef]
- Campeneere, S.d.; Fiems, L.; Boucqué, C. In vivo estimation of body composition in cattle. Proc. Nutr. Abstr. Reviews. Ser. B Livest. Feed. Feed. 2000, 70, 495–508. [Google Scholar]
- Halachmi, I.; Klopčič, M.; Polak, P.; Roberts, D.; Bewley, J. Automatic assessment of dairy cattle body condition score using thermal imaging. Comput. Electron. Agric. 2013, 99, 35–40. [Google Scholar] [CrossRef]
- Spoliansky, R.; Edan, Y.; Parmet, Y.; Halachmi, I. Development of automatic body condition scoring using a low-cost 3-dimensional Kinect camera. J. Dairy Sci. 2016, 99, 7714–7725. [Google Scholar] [CrossRef] [PubMed]
- Song, X.; Bokkers, E.; Van Mourik, S.; Koerkamp, P.G.; Van Der Tol, P. Automated body condition scoring of dairy cows using 3-dimensional feature extraction from multiple body regions. J. Dairy Sci. 2019, 102, 4294–4308. [Google Scholar] [CrossRef] [PubMed]
- Martins, B.; Mendes, A.; Silva, L.; Moreira, T.; Costa, J.; Rotta, P.; Chizzotti, M.; Marcondes, M. Estimating body weight, body condition score, and type traits in dairy cows using three dimensional cameras and manual body measurements. Livest. Sci. 2020, 236, 104054. [Google Scholar] [CrossRef]
- Alvarez, J.R.; Arroqui, M.; Mangudo, P.; Toloza, J.; Jatip, D.; Rodríguez, J.M.; Teyseyre, A.; Sanz, C.; Zunino, A.; Machado, C. Body condition estimation on cows from depth images using Convolutional Neural Networks. Comput. Electron. Agric. 2018, 155, 12–22. [Google Scholar] [CrossRef]
- Rodriguez Alvarez, J.; Arroqui, M.; Mangudo, P.; Toloza, J.; Jatip, D.; Rodriguez, J.M.; Teyseyre, A.; Sanz, C.; Zunino, A.; Machado, C. Estimating body condition score in dairy cows from depth images using convolutional neural networks, transfer learning and model ensembling techniques. Agronomy 2019, 9, 90. [Google Scholar] [CrossRef]
- Li, X.; Hu, Z.; Huang, X.; Feng, T.; Yang, X.; Li, M. Cow body condition score estimation with convolutional neural networks. In Proceedings of the 2019 IEEE 4th International Conference on Image, Vision and Computing (ICIVC), Xiamen, China, 5–7 July 2019; pp. 433–437. [Google Scholar]
- Çevik, K.K. Deep learning based real-time body condition score classification system. IEEE Access 2020, 8, 213950–213957. [Google Scholar] [CrossRef]
- Nagy, S.Á.; Kilim, O.; Csabai, I.; Gábor, G.; Solymosi, N. Impact evaluation of score classes and annotation regions in deep learning-based dairy cow body condition prediction. Animals 2023, 13, 194. [Google Scholar] [CrossRef]
- He, H.; Chen, C.; Zhang, W.; Wang, Z.; Zhang, X. Body condition scoring network based on improved YOLOX. Pattern Anal. Appl. 2023, 26, 1071–1087. [Google Scholar] [CrossRef]
- Make Sense. Available online: https://github.com/SkalskiP/make-sense (accessed on 1 April 2023).
- Zhao, X.; He, Y.; Zhang, H.; Ding, Z.; Zhou, C.; Zhang, K. A quality grade classification method for fresh tea leaves based on an improved YOLOv8x-SPPCSPC-CBAM model. Sci. Rep. 2024, 14, 4166. [Google Scholar] [CrossRef]
- Wang, Z.; Hua, Z.; Wen, Y.; Zhang, S.; Xu, X.; Song, H. E-YOLO: Recognition of estrus cow based on improved YOLOv8n model. Expert Syst. Appl. 2024, 238, 122212. [Google Scholar] [CrossRef]
- Yukun, S.; Pengju, H.; Yujie, W.; Ziqi, C.; Yang, L.; Baisheng, D.; Runze, L.; Yonggen, Z. Automatic monitoring system for individual dairy cows based on a deep learning framework that provides identification via body parts and estimation of body condition score. J. Dairy Sci. 2019, 102, 10140–10151. [Google Scholar] [CrossRef] [PubMed]
Hardware | Specification |
---|---|
Computer | Desktop |
Central processor (CPU) | 4-Core AMD Ryzen3 2200 G 3.5 GHz processor (AMD Ryzen Santa Clara, CA, USA) |
Memory (RAM) | 32 GB |
Mainboard | Gigabyte B450M S2H |
Graphical processing unit (GPU) | NVIDIA GeForce RTX 3060 12 GB (NVIDIA, Santa Clara, CA, USA) |
Hard disc driver | 120 GB (500 MB/s Read/Write) SDD |
Parameters | Value |
---|---|
Weights | YOLOv8x |
Epoch | 300 |
Batch size | 16 |
Image size | 512 |
Optimizer | SGD |
Mask ratio | 4 |
IoU | 0.5 |
Learning rate | 0.01 |
Momentum | 0.937 |
Mosaic | 1.0 |
Dropout | 0.0 |
Weight decay | 0.0005 |
BCS Description | BCS Scale | Training Images | Test Images | Total Images | Total | |||
---|---|---|---|---|---|---|---|---|
Simmental | Holstein | Simmental | Holstein | Simmental | Holstein | |||
Emaciated | 2.0 | 1 | 71 | 1 | 7 | 2 | 78 | 80 |
Poor | 2.5 | 13 | 212 | 3 | 22 | 16 | 234 | 250 |
Good | 3.5 | 82 | 363 | 11 | 38 | 93 | 401 | 494 |
Fat | 4.0 | 156 | 163 | 18 | 17 | 174 | 180 | 354 |
Obese | 4.5 | 54 | 29 | 6 | 3 | 60 | 32 | 92 |
Total | 306 | 838 | 39 | 87 | 345 | 925 | 1270 |
Total | 8 | 25 | 49 | 35 | 9 | 126 | |
Predicted | Emaciated | 8 | 8 | ||||
Poor | 17 | 1 | 18 | ||||
Good | 7 | 44 | 8 | 1 | 60 | ||
Fat | 1 | 4 | 27 | 2 | 34 | ||
Obese | 6 | 6 | |||||
Emaciated | Poor | Good | Fat | Obese | Total | ||
Actual |
Total | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 5.00 | |
Predicted | Emaciated | 1.00 | 1.00 | ||||
Poor | 0.68 | 0.02 | 0.70 | ||||
Good | 0.28 | 0.90 | 0.23 | 0.11 | 1.52 | ||
Fat | 0.04 | 0.08 | 0.77 | 0.22 | 1.11 | ||
Obese | 0.67 | 0.67 | |||||
Emaciated | Poor | Good | Fat | Obese | Total | ||
Actual |
Total | 1 | 3 | 11 | 18 | 6 | 39 | |
Predicted | Emaciated | 1 | 1 | ||||
Poor | 1 | 1 | |||||
Good | 2 | 8 | 2 | 12 | |||
Fat | 3 | 16 | 1 | 20 | |||
Obese | 5 | 5 | |||||
Emaciated | Poor | Good | Fat | Obese | Total | ||
Actual |
Total | 7 | 22 | 38 | 17 | 3 | 87 | |
Predicted | Emaciated | 7 | 7 | ||||
Poor | 16 | 1 | 17 | ||||
Good | 5 | 36 | 6 | 1 | 48 | ||
Fat | 1 | 1 | 11 | 1 | 14 | ||
Obese | 1 | 1 | |||||
Emaciated | Poor | Good | Fat | Obese | Total | ||
Actual |
Study | Year | Number of Dairy Farms | Cow Breed | Number of Images | Methodology | Accuracy (%) |
---|---|---|---|---|---|---|
Bercovich et al. [20] | 2013 | 1 | Holstein | 151 | Body shape signature and Fourier descriptors | 72.0 (with 0.5 unit error range) |
Alvarez et al. [36] | 2018 | 3 | Holstein | 1661 | CNN | 78.0 (with 0.25 unit error range) |
Li et al. [38] | 2019 | 2 | Holstein | 2231 | YOLOv2 and ResNet50 | 78.15 (with 0.25 unit error range) |
Alvarez et al. [37] | 2019 | N/A | N/A | 1661 | CNN and ensemble Techniques | 82.0 (with 0.25 unit error range) |
Çevik and Boğa [12] | 2019 | N/A | N/A | 184 | VGG19 and R-CNN | 67.39 |
Yukun et al. [45] | 2019 | 1 | Holstein-Friesian | 686 | CNN-based deep learning model | 77.0 (with 0.25 unit error range) |
Liu et al. [13] | 2020 | 1 | N/A | 295 | Ensemble learning model based on bagging and boosting | 76.0 (with 0.25 unit error range) |
Çevik [39] | 2020 | 10 | Holstein | 505 | Pre-trained VGG19-bsaed CNN (mobile app.) | 78.0 |
Ours | 2024 | 20 | Simmental and Holstein | 1270 | YOLOv8x-based deep learning architecture | 80.0 (Simmental) 82.0 (Holstein) 81.0 (Average) |
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. |
© 2024 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
Dandıl, E.; Çevik, K.K.; Boğa, M. Automated Classification System Based on YOLO Architecture for Body Condition Score in Dairy Cows. Vet. Sci. 2024, 11, 399. https://doi.org/10.3390/vetsci11090399
Dandıl E, Çevik KK, Boğa M. Automated Classification System Based on YOLO Architecture for Body Condition Score in Dairy Cows. Veterinary Sciences. 2024; 11(9):399. https://doi.org/10.3390/vetsci11090399
Chicago/Turabian StyleDandıl, Emre, Kerim Kürşat Çevik, and Mustafa Boğa. 2024. "Automated Classification System Based on YOLO Architecture for Body Condition Score in Dairy Cows" Veterinary Sciences 11, no. 9: 399. https://doi.org/10.3390/vetsci11090399
APA StyleDandıl, E., Çevik, K. K., & Boğa, M. (2024). Automated Classification System Based on YOLO Architecture for Body Condition Score in Dairy Cows. Veterinary Sciences, 11(9), 399. https://doi.org/10.3390/vetsci11090399