Classification and Analysis of Multiple Cattle Unitary Behaviors and Movements Based on Machine Learning Methods
Abstract
:Simple Summary
Abstract
1. Introduction
2. Materials and Methods
2.1. Animals and Experiment Arena
2.2. Sensor System
2.3. Data Collection
2.4. Unitary Behavior Classification and Analysis
2.4.1. Data Preprocessing
2.4.2. Machine Learning Algorithms
- K-nearest neighbors (KNN)
- 2.
- Random forest (RF)
- 3.
- Extreme boosting algorithm (XGBoost)
2.4.3. Movement Analysis
2.5. Evaluation of the Prediction
3. Results
3.1. Unitary Behavior Classification
3.2. Detailed Movement Analysis
4. Discussion
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Andriamandroso, A.L.H.; Bindelle, J.; Mercatoris, B.; Lebeau, F. A review on the use of sensors to monitor cattle jaw movements and behavior when grazing. Biotechnol. Agron. Soc. Environ. 2016, 20, 273–286. [Google Scholar] [CrossRef]
- Halachmi, I.; Guarino, M.; Bewley, J.; Pastell, M. Smart Animal Agriculture: Application of Real-Time Sensors to Improve Animal Well-Being and Production. Annu. Rev. Anim. Biosci. 2019, 7, 403–425. [Google Scholar] [CrossRef] [PubMed]
- Zehner, N.; Umstätter, C.; Niederhauser, J.J.; Schick, M. System specification and validation of a noseband pressure sensor for measurement of ruminating and eating behavior in stable-fed cows. Comput. Electron. Agric. 2017, 136, 31–41. [Google Scholar] [CrossRef]
- Chelotti, J.O.; Vanrell, S.R.; Galli, J.R.; Giovanini, L.L.; Rufiner, H.L. A pattern recognition approach for detecting and classifying jaw movements in grazing cattle. Comput. Electron. Agric. 2018, 145, 83–91. [Google Scholar] [CrossRef]
- Rahman, A.; Smith, D.V.; Little, B.; Ingham, A.B.; Greenwood, P.L.; Bishop-Hurley, G.J. Cattle behaviour classification from collar, halter, and ear tag sensors. Inf. Process. Agric. 2018, 5, 124–133. [Google Scholar] [CrossRef]
- Riaboff, L.; Poggi, S.; Madouasse, A.; Couvreur, S.; Aubin, S.; Bédère, N.; Goumand, E.; Chauvin, A.; Plantier, G. Development of a methodological framework for a robust prediction of the main behaviours of dairy cows using a combination of machine learning algorithms on accelerometer data. Comput. Electron. Agric. 2020, 169, 105179. [Google Scholar] [CrossRef]
- Benaissa, S.; Tuyttens, F.A.M.; Plets, D.; Trogh, J.; Martens, L.; Vandaele, L.; Joseph, W.; Sonck, B. Calving and estrus detection in dairy cattle using a combination of indoor localization and accelerometer sensors. Comput. Electron. Agric. 2020, 168, 105153. [Google Scholar] [CrossRef]
- Thorup, V.M.; Munksgaard, L.; Robert, P.E.; Erhard, H.W.; Thomsen, P.T.; Friggens, N.C. Lameness detection via leg-mounted accelerometers on dairy cows on four commercial farms. Animal 2015, 9, 1704–1712. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Gusterer, E.; Kanz, P.; Krieger, S.; Schweinzer, V.; Süss, D.; Lidauer, L.; Kickinger, F.; Öhlschuster, M.; Auer, W.; Drillich, M.; et al. Sensor technology to support herd health monitoring: Using rumination duration and activity measures as unspecific variables for the early detection of dairy cows with health deviations. Theriogenology 2020, 157, 61–69. [Google Scholar] [CrossRef]
- Wang, J.; He, Z.; Ji, J.; Zhao, K.; Zhang, H. IoT-based measurement system for classifying cow behavior from tri-axial accelerometer. Ciência Rural 2019, 49. [Google Scholar] [CrossRef]
- Achour, B.; Belkadi, M.; Aoudjit, R.; Laghrouche, M. Unsupervised automated monitoring of dairy cows’ behavior based on Inertial Measurement Unit attached to their back. Comput. Electron. Agric. 2019, 167, 105068. [Google Scholar] [CrossRef]
- Smith, D.; Rahman, A.; Bishop-Hurley, G.J.; Hills, J.; Shahriar, S.; Henry, D.; Rawnsley, R. Behavior classification of cows fitted with motion collars: Decomposing multi-class classification into a set of binary problems. Comput. Electron. Agric. 2016, 131, 40–50. [Google Scholar] [CrossRef]
- Zambelis, A.; Wolfe, T.; Vasseur, E. Validation of an ear-tag accelerometer to identify feeding and activity behaviors of tiestall-housed dairy cattle. J. Dairy Sci. 2019, 102, 4536–4540. [Google Scholar] [CrossRef] [PubMed]
- Krieger, S.; Sattlecker, G.; Kickinger, F.; Auer, W.; Drillich, M.; Iwersen, M. Prediction of calving in dairy cows using a tail-mounted tri-axial accelerometer: A pilot study. Biosyst. Eng. 2018, 173, 79–84. [Google Scholar] [CrossRef]
- Peng, Y.; Kondo, N.; Fujiura, T.; Suzuki, T.; Yoshioka, H.; Itoyama, E. Classification of multiple cattle behavior patterns using a recurrent neural network with long short-term memory and inertial measurement units. Comput. Electron. Agric. 2019, 157, 247–253. [Google Scholar] [CrossRef]
- Riaboff, L.; Aubin, S.; Bédère, N.; Couvreur, S.; Madouasse, A.; Goumand, E.; Chauvin, A.; Plantier, G. Evaluation of pre-processing methods for the prediction of cattle behaviour from accelerometer data. Comput. Electron. Agric. 2019, 165, 104961. [Google Scholar] [CrossRef]
- Redbo, I. The influence of restraint on the occurrence of oral stereotypies in dairy cows. Appl. Anim. Behav. Sci. 1992, 35, 115–123. [Google Scholar] [CrossRef]
- Albright, J. Feeding behavior of dairy cattle. J. Dairy Sci. 1993, 76, 485–498. [Google Scholar] [CrossRef]
- Schäfer, E.M.; Sambraus, H.H. [Fodder flinging in cattle]. Tierarztl Prax Ausg G Grosstiere Nutztiere 1998, 26, 141–147. [Google Scholar]
- Gibb, M. Animal grazing/intake terminology and definitions. Pasture Ecol. Anim. Intake 1998, 3, 21–37. [Google Scholar] [CrossRef]
- Andriamandroso, A.L.H.; Lebeau, F.; Beckers, Y.; Froidmont, E.; Dufrasne, I.; Heinesch, B.; Dumortier, P.; Blanchy, G.; Blaise, Y.; Bindelle, J. Development of an open-source algorithm based on inertial measurement units (IMU) of a smartphone to detect cattle grass intake and ruminating behaviors. Comput. Electron. Agric. 2017, 139, 126–137. [Google Scholar] [CrossRef]
- Chelotti, J.O.; Vanrell, S.R.; Martinez Rau, L.S.; Galli, J.R.; Planisich, A.M.; Utsumi, S.A.; Milone, D.H.; Giovanini, L.L.; Rufiner, H.L. An online method for estimating grazing and rumination bouts using acoustic signals in grazing cattle. Comput. Electron. Agric. 2020, 173, 105443. [Google Scholar] [CrossRef]
- Shen, W.; Zhang, A.; Zhang, Y.; Wei, X.; Sun, J. Rumination recognition method of dairy cows based on the change of noseband pressure. Inf. Processing Agric. 2020, 7, 479–490. [Google Scholar] [CrossRef]
- Pahl, C.; Hartung, E.; Grothmann, A.; Mahlkow-Nerge, K.; Haeussermann, A. Suitability of feeding and chewing time for estimation of feed intake in dairy cows. Animal 2016, 10, 1507–1512. [Google Scholar] [CrossRef]
- Barwick, J.; Lamb, D.W.; Dobos, R.; Welch, M.; Trotter, M. Categorising sheep activity using a tri-axial accelerometer. Comput. Electron. Agric. 2018, 145, 289–297. [Google Scholar] [CrossRef]
- Vázquez Diosdado, J.A.; Barker, Z.E.; Hodges, H.R.; Amory, J.R.; Croft, D.P.; Bell, N.J.; Codling, E.A. Classification of behaviour in housed dairy cows using an accelerometer-based activity monitoring system. Anim. Biotelem. 2015, 3, 15. [Google Scholar] [CrossRef] [Green Version]
- Guo, G.; Wang, H.; Bell, D.; Bi, Y.; Greer, K. KNN model-based approach in classification. In Proceedings of the OTM Confederated International Conferences “On the Move to Meaningful Internet Systems”, Catania, Italy, 3–7 November 2003; pp. 986–996. [Google Scholar]
- Breiman, L. Random forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef] [Green Version]
- Dietterich, T.G. An experimental comparison of three methods for constructing ensembles of decision trees: Bagging, boosting, and randomization. Mach. Learn. 2000, 40, 139–157. [Google Scholar] [CrossRef]
- Chen, T.; He, T.; Benesty, M.; Khotilovich, V.; Tang, Y.; Cho, H. Xgboost: Extreme Gradient Boosting. R Package Version 0.4-2. 2015. Available online: https://cran.r-project.org/src/contrib/Archive/xgboost/ (accessed on 17 December 2021).
- Brennan, J.; Johnson, P.; Olson, K. Classifying season long livestock grazing behavior with the use of a low-cost GPS and accelerometer. Comput. Electron. Agric. 2021, 181, 105957. [Google Scholar] [CrossRef]
- Tamura, T.; Okubo, Y.; Deguchi, Y.; Koshikawa, S.; Takahashi, M.; Chida, Y.; Okada, K. Dairy cattle behavior classifications based on decision tree learning using 3-axis neck-mounted accelerometers. Anim. Sci. J. 2019, 90, 589–596. [Google Scholar] [CrossRef] [PubMed]
- Uenishi, S.; Oishi, K.; Kojima, T.; Kitajima, K.; Yasunaka, Y.; Sakai, K.; Sonoda, Y.; Kumagai, H.; Hirooka, H. A novel accelerometry approach combining information on classified behaviors and quantified physical activity for assessing health status of cattle: A preliminary study. Appl. Anim. Behav. Sci. 2021, 235, 105220. [Google Scholar] [CrossRef]
- Eerdekens, A.; Deruyck, M.; Fontaine, J.; Martens, L.; De Poorter, E.; Joseph, W. Automatic equine activity detection by convolutional neural networks using accelerometer data. Comput. Electron. Agric. 2020, 168, 105139. [Google Scholar] [CrossRef]
- Bersch, S.D.; Azzi, D.; Khusainov, R.; Achumba, I.E.; Ries, J. Sensor data acquisition and processing parameters for human activity classification. Sensors 2014, 14, 4239–4270. [Google Scholar] [CrossRef] [Green Version]
- Barwick, J.; Lamb, D.W.; Dobos, R.; Welch, M.; Schneider, D.; Trotter, M. Identifying Sheep Activity from Tri-Axial Acceleration Signals Using a Moving Window Classification Model. Remote Sens. 2020, 12, 646. [Google Scholar] [CrossRef] [Green Version]
- Hu, S.; Ingham, A.; Schmoelzl, S.; McNally, J.; Little, B.; Smith, D.; Bishop-Hurley, G.; Wang, Y.-G.; Li, Y. Inclusion of features derived from a mixture of time window sizes improved classification accuracy of machine learning algorithms for sheep grazing behaviours. Comput. Electron. Agric. 2020, 179, 105857. [Google Scholar] [CrossRef]
- González, L.A.; Bishop-Hurley, G.J.; Handcock, R.N.; Crossman, C. Behavioral classification of data from collars containing motion sensors in grazing cattle. Comput. Electron. Agric. 2015, 110, 91–102. [Google Scholar] [CrossRef]
- Riaboff, L.; Shalloo, L.; Smeaton, A.F.; Couvreur, S.; Madouasse, A.; Keane, M.T. Predicting livestock behaviour using accelerometers: A systematic review of processing techniques for ruminant behaviour prediction from raw accelerometer data. Comput. Electron. Agric. 2022, 192, 106610. [Google Scholar] [CrossRef]
- Phillips, C. (Ed.) Behavioural Adaptation to Inadequate Environments. In Cattle Behaviour & Welfare; John Wiley & Sons: Hoboken, NJ, USA, 2002; pp. 208–216. [Google Scholar] [CrossRef]
Class | Description | |
---|---|---|
Unitary behaviors | Feeding | The animal puts its head into the stall and eats in the feeding rack |
Standing | The animal stands without head movement and rumination | |
Lying | The main body touches the cubicle floor without head movement and rumination | |
Ruminating-standing | The animal regurgitates food bolus from the rumen, chews and swallows it while standing | |
Ruminating- Lying | The animal regurgitates food bolus from the rumen, chews, and swallows it while lying | |
Walking | The animal moves in one direction for at least 30 s | |
Movements during feeding | Feed tossing | The animal takes a mouthful of feed then throws the feed into the air or even over its back by twisting the neck |
Rolling biting | The animal lowers its head and uses its tongue to roll feed into the mouth during feeding | |
Chewing | The animal chews feed with its head up during feeding |
Behavior | Number of Segments | % | Duration (HH:MM:SS) |
---|---|---|---|
Feeding | 76 | 27 | 21:19:15 |
Standing | 87 | 11 | 08:26:28 |
Lying | 90 | 19 | 15:06:13 |
Ruminating-standing | 58 | 18 | 14:03:16 |
Ruminating-lying | 54 | 23 | 17:57:04 |
Walking | 35 | 2 | 01:44:22 |
Total | 400 | 100 | 78:36:38 |
Window Size | Sample |
---|---|
5 s | 116,960 |
10 s | 58,474 |
30 s | 19,485 |
60 s | 9739 |
Machine Learning Algorithm | Time Window | ||||||||
---|---|---|---|---|---|---|---|---|---|
Unitary Behavior | 5 s | 10 s | 30 s | 60 s | |||||
Pr | Se | Pr | Se | Pr | Se | Pr | Se | ||
KNN | F | 85 | 80 | 89 | 84 | 92 | 92 | 94 | 96 |
S | 77 | 80 | 77 | 80 | 84 | 83 | 85 | 86 | |
L | 85 | 84 | 88 | 83 | 89 | 87 | 91 | 84 | |
RS | 70 | 73 | 74 | 78 | 81 | 84 | 87 | 86 | |
RL | 80 | 81 | 83 | 86 | 90 | 90 | 87 | 92 | |
W | 82 | 83 | 82 | 85 | 89 | 88 | 100 | 94 | |
RF | F | 86 | 88 | 89 | 89 | 92 | 92 | 95 | 96 |
S | 83 | 84 | 81 | 86 | 86 | 89 | 83 | 91 | |
L | 94 | 90 | 93 | 90 | 91 | 92 | 95 | 90 | |
RS | 82 | 81 | 84 | 82 | 86 | 83 | 92 | 86 | |
RL | 89 | 91 | 90 | 93 | 92 | 93 | 91 | 95 | |
W | 92 | 81 | 92 | 82 | 98 | 82 | 100 | 83 | |
XGBoost | F | 88 | 89 | 91 | 91 | 94 | 94 | 96 | 96 |
S | 84 | 85 | 82 | 86 | 88 | 91 | 85 | 93 | |
L | 93 | 91 | 94 | 91 | 93 | 94 | 96 | 91 | |
RS | 84 | 81 | 86 | 84 | 90 | 87 | 94 | 91 | |
RL | 90 | 92 | 92 | 95 | 94 | 96 | 93 | 96 | |
W | 91 | 83 | 91 | 87 | 97 | 88 | 100 | 89 |
Movement | Pr | Se | F1 | Actual Observed | Model Predicted | True Positive |
---|---|---|---|---|---|---|
FT | 69 | 89 | 78 | 127 | 184 | 114 |
RB | 86 | 88 | 87 | 446 | 518 | 392 |
C | 87 | 89 | 87 | 460 | 529 | 409 |
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
Li, Y.; Shu, H.; Bindelle, J.; Xu, B.; Zhang, W.; Jin, Z.; Guo, L.; Wang, W. Classification and Analysis of Multiple Cattle Unitary Behaviors and Movements Based on Machine Learning Methods. Animals 2022, 12, 1060. https://doi.org/10.3390/ani12091060
Li Y, Shu H, Bindelle J, Xu B, Zhang W, Jin Z, Guo L, Wang W. Classification and Analysis of Multiple Cattle Unitary Behaviors and Movements Based on Machine Learning Methods. Animals. 2022; 12(9):1060. https://doi.org/10.3390/ani12091060
Chicago/Turabian StyleLi, Yongfeng, Hang Shu, Jérôme Bindelle, Beibei Xu, Wenju Zhang, Zhongming Jin, Leifeng Guo, and Wensheng Wang. 2022. "Classification and Analysis of Multiple Cattle Unitary Behaviors and Movements Based on Machine Learning Methods" Animals 12, no. 9: 1060. https://doi.org/10.3390/ani12091060
APA StyleLi, Y., Shu, H., Bindelle, J., Xu, B., Zhang, W., Jin, Z., Guo, L., & Wang, W. (2022). Classification and Analysis of Multiple Cattle Unitary Behaviors and Movements Based on Machine Learning Methods. Animals, 12(9), 1060. https://doi.org/10.3390/ani12091060