Byambadorj Batbayar, Lu ShaoKun
Monitoring animal behavior can prove challenging when working in inaccessible environments. This problem can be addressed by using animal attached accelerometers and automatic classi?ers. This study considers the feasibility of using specially designed hardware to capture three-dimensional accelerometer data from sheep and subsequently automatically classify their behavior based on these measurements. Five common behaviors have been identi?ed: Lying, standing, walking, running, and grazing. Linear discriminant analysis (LDA) and quadratic discriminant analysis (QDA) classi?ers were trained based on 10 features. A greedy selection procedure was used to determine which features provide the highest classi?cation accuracy. It is shown that both classi?ers can automatically identify the ?ve behaviors with high accuracy when all the features are used for training. The LDA and QDA classi?ers achieved an overall accuracy of 87.1% and 89.7% respectively. Grazing was misclassi?ed the most in both classi?ers because it was confused with lying. This result was expected considering the high similarity between the raw accelerometer data associated with grazing and lying. The QDA classi?er showed larger improvements when using a smaller number of features. identifying and classifying feeding behavior in free-ranging ruminants will help improve the efficiency of animal production. Another potential benefit would be in understanding the role behavior has in determining the heritability of methane measurement. This study aimed to determine the accuracy, sensitivity, specificity, and precision with which tri-axial accelerometers can identify sheep behavior at pasture. The animals were located in either a semi-improved pasture (0.3 ha) or in a small (30 m2) area with access to water to observe five mutually exclusive behaviors, grazing, lying, running, standing, and walking. A tri-axial accelerometer was attached to a halter on the under-jaw of each animal. Three epochs (3 s, 5 s, and 10 s) with forty-four features calculated from acceleration signals were used to classify behaviors. The five most important features for each epoch were determined using random forest and the five behaviors were classified using a decision-tree algorithm to determine model accuracy, sensitivity, specificity, and precision. The decision-tree algorithm correctly classified 90.5, 92.5, and 91.3% of the evaluation data set for grazing behavior for the 3, 5, and 10 s epochs, respectively. There was no difference in the accuracy between the evaluation and validation data sets for grazing behavior at each epoch. The model predicted grazing and running behavior highly accurately and with the highest precision, sensitivity, and specificity for the validation data set for the 10 s epoch. The 5 s epoch for both the evaluation and validation data sets were selected as the most suitable epoch based on the Kappa values. We successfully identified from the distribution of component populations that the natural log-transformation of the mean of X-axis accelerations for each epoch could identify grazing and non-grazing states. Therefore, this methodology will be useful in identifying sheep activity for research applications such as before methane measurement using portable accumulation chambers or other applications addressing temporal grazing patterns.
Byambadorj Batbayar1and Lu ShaoKun “Automatic Classi?cation of Sheep Behavior sing 3-Axis Accelerometer Data” International Journal of Engineering Works Vol. 9 Issue 04 PP. 100-110 April 2022. https://doi.org/10.34259/ijew.22.904100110.
[1] Abbott, K.; Lewis, C. Current approaches to the management of ovine footrot. Vet. J. 2005, 169, 28–
[2] 41. [CrossRef] [PubMed]
[3] Winter, A. Lameness in sheep. Small Rumin. Res. 2008, 76, 149–153. [CrossRef]
[4] Hodgkinson, O. The importance of feet examination in sheep health management. Small Rumin. Res. 2010, 92, 67–71. [CrossRef]
[5] Anil, S.; Anil, L.; Deen, J. Challenges of pain assessment in domestic animals. J.Am. Vet. Med. Assoc. 2002, 220, 313–319. [CrossRef] [PubMed]
[6] Animal Health Australia. Available online: www.animalhealthaustralia.com.au/wp- content/uploads/2015/ 09/LBN_Arthritis_Fact_Sheet.pdf (accessed on 6 November 2017).
[7] Brightling, T. Livestock Diseases in Australia: Diseases of Cattle, Sheep, Goats and Farm Dogs; Jerram, C.H., Ed.; Mt. Waverly: Victoria, Australia, 2006.
[8] Weary, D.; Huzzey, J.; Von Keyserlingk, M. Board-Invited Review: Using behavior to predict and identify ill health in animals. J. Anim. Sci. 2009, 87, 770–777. [CrossRef] [PubMed]
[9] Lascelles, B.; Roe, S.; Smith, E.; Reynolds, L.; Marcellin-Little, J.; Bergh, M.; Budsberg, S. Evaluation of apressurewalkwaysystemformeasurementofverticallimbforcesinclinicallynormaldogs. Am. J.Vet. Res. 2006, 67, 277–282. [CrossRef] [PubMed]
[10] Besancon, M.; Conzemius, M.; Derrick, T.; Ritter, M. Comparison of vertical forces in normal greyhounds between force platform and pressure walkway measurement systems. VCOT Arch. 2003, 16, 153.
[11] Oosterlinck, M.; Pille, F.; Huppes, T.; Gasthuys, F.; Back, W. Comparison of pressure plate and force plate gait kinetics in sound Warmbloods at walk and trot. Vet. J. 2010, 186, 347–351. [CrossRef] [PubMed]
[12] Kim,J.;Breur,G.Temporospatial and kinetic characteristics of sheep walking on a pressure sensing walk way. Can. J. Vet. Res. 2008, 72, 50–55. [PubMed]
[13] Seebeck, P.; Thompson, M.; Parwani, A.; Taylor, W.; Schell, H.; Duda, G. Gait evaluation: A tool to monitor bone healing? Clin. Biomech. 2005, 20, 883–891. [CrossRef] [PubMed]
[14] Rajkondawar, P.; Liu, M.; Dyer, R.; Neerchal, N.; Tasch, U.; Lefcourt, A.; Erez, B.; Varner, M. Comparison of models to identify lame cows based on gait and lesion scores, and limb movement variables. J. Dairy Sci. 2006, 89, 4267–4275. [CrossRef]
[15] Maertens, W.; Baert, J.; Vangayte, J.; Vranken, E.; Berckmans, D.; Sonck, B. Acquisition techniques for dairy cow gait analysis. Precis. Livest. Farming 2007, 7, 33–140.
[16] Pluk, A.; Bahr, C.; Maernets, W.; Veermäe, I.; Kokin, E.; Praks, J.; Poikalainen, V.; Pastell, M.; Ahokas, J.; van Nuffel, A.; Vangeyte, J.; Snock, B.; Berckmans, D. Approach to model based motion scoring for lameness detection in dairy cattle. Precis. Livest. Farming 2009, 9, 357–362.
[17] Pastell, M.; Tiusanen, J.; Hakojärvi, M.; Hänninen, L. A wireless accelerometer system with wavelet analysis for assessing lameness in cattle. Biosyst. Eng. 2009, 104, 545–551. [CrossRef]
[18] Van Nuffel, A.; Zwertvaegher, I.; Pluym, L.; Van Weyenberg, S.; Thorup, V.; Pastell, M.; Sonck, B.; Saeys, W. Lameness detection in dairy cows: Part 1. How to distinguish between non-lame and lame cows based on differences in locomotion or behavior. Animals 2015, 5, 838–860. [CrossRef] [PubMed]
[19] Sprecher, D.; Hostetler, D.; Kaneene, J. A lameness scoring system that uses posture and gait to predict dairy cattle reproductive performance. Theriogenology 1997, 47, 1179–1187. [CrossRef]
[20] Robert, B.; White, B.; Renter, D.; Larson, R. Evaluation of three-dimensional accelerometers to monitor and classify behavior patterns in cattle. Comput. Electron. Agric. 2009, 67, 80–84. [CrossRef]
[21] Animals 2018, 8, 12 15 of 16
[22] Martiskainen, P.; Ja¨rvinen, M.; Sko¨n, J.; Tiirikainen, J.; Kolehmainen, M.; Mononen, J. Cow behavior pattern recognition using a three-dimensional accelerometer and support vector machines. Appl. Anim. Behav. Sci. 2009, 119, 32–38. [CrossRef]
[23] De Passille, A.; Jensen, M.; Chapinal, N.; Rushen, J. Technical note: Use of accelerometers to describe gait patterns in dairy calves. J. Dairy Sci. 2010, 93, 3287–3293. [CrossRef] [PubMed]
[24] Greenwood, P.; Valencia, P.; Overs, L.; Paull, D.; Purvis, I. New ways of measuring intake, ef?ciency and behavior of grazing livestock. Anim. Prod. Sci. 2014, 54, 1796–1804. [CrossRef]
[25] Scheibe, K.; Gromann, C. Application testing of a new three-dimensional acceleration measuring system with wireless data transfer (WAS) for behavior analysis. Behav. Res. Methods2006, 38, 427–
[26] 433. [CrossRef] [PubMed]
[27] Keegan, K.; Yonezawa, Y.; Pai, P.; Wilson, D. Accelerometer-based system for the detection of lameness in horses. Biomed. Sci. Instrum. 2001, 38, 107–112.
[28] Keegan, K.; Yonezawa, Y.; Pai, F.; Wilson, D.; Kramer, J. Evaluation of a sensor-based system of motion analysis for detection and quanti?cation of forelimb and hind limb lameness in horses. Am. J.Vet. Res. 2004, 65, 665–670. [CrossRef] [PubMed]
[29] Kokin, E.; Praks, J.; Veermäe, I.; Poikalainen, V.; Vallas, M. IceTag3D™ accelerometric device in cattle lameness detection. Agron. Res. 2014, 12, 223–230.
[30] Chapinal, N.; de Passillé, A.; Rushen, J.; Wagner, S. Automated methods for detecting lameness and measuring analgesia in dairy cattle. J. Dairy Sci. 2010, 93, 2007–2013. [CrossRef] [PubMed]
[31] Higginson,J.;Millman,S.;Leslie,K.;Kelton,D.Validation of a new pedometry system foruse in behavioral research and lameness detection in dairy cattle. In Proceedings of the First North America Conference of Precision Dairy Management, Toronto, ON, Canada, 2–5 March 2010; Progressive Dairy Operators: Elora, ON, Canada, 2010.
[32] O’Callaghan, K.; Cripps, P.; Downham, D.; Murray, R. Subjective and objective assessment of pain and discomfort due to lameness in dairy cattle. In Proceedings of the 2nd Intermational Workshop on the Assessment of Animal Welfare at Farm and Group Level, Bristol, UK, 4–6 September 2002; Federation for Animal Welfare: Hertfordshire, UK, 2003.
[33] Blackie, N.; Amory, J.; Bleach, E.; Scaife, J. The effect of lameness on lying behavior of zero grazed Holstein dairy cattle. Appl. Anim. Behav. Sci. 2011, 134, 85–91. [CrossRef]
[34] Blomberg, K. Automatic Registration of Dairy Cows Grazing Behavior on Pasture; Swedish University of Agricultural Sciences: Uppsala, Sweden, 2011.
[35] Alvarenga, F.; Borges, I.; Palkovi?c, L.; Rodina, J.; Oddy, V.; Dobos, R. Using a three-axis accelerometer to identify and classify sheep behavior at pasture. Appl. Anim. Behav. Sci. 2016, 181, 91–99. [CrossRef]
[36] Mclennan, K.; Skillings, E.; Rebelo, C.; Corke, M.; Moreira, M.; Morton, J.; Constantino-Casas, F. Technical note: Validation of an automatic recording system to assess behavioral activity level in sheep (Ovis aries). Small Rumin. Res. 2015, 127, 92–96. [CrossRef]
[37] Umstatter, C.; Waterhouse, A.; Holland, J. An automated sensor-based method of simple behavioral classi?cation of sheep in extensive systems. Comput. Electron. Agric. 2008, 64, 19–26. [CrossRef]
[38] Mason, A.; Sneddon, J. Automated monitoring of foraging behavior in free ranging sheep grazing a biodiverse pasture. In Proceedings of the Seventh International Conference on Sensing Technology, Wellington, New Zealand, 3–5 December 2013.
[39] Trotter, M.; Lamb, D.; Hinch, G.; Guppy, C. Global navigation satellite system livestock tracking: System development and data interpretation. Anim. Prod. Sci. 2010, 50, 616–623. [CrossRef]
[40] Luu, J.; Johnsen, J.; de Passille, A.; Rushen, J. Which measures of acceleration best estimate the duration of locomotor play by dairy calves? Appl. Anim. Behav. Sci. 2013, 148, 21–27. [CrossRef]
[41] Campbell, H.; Gao, L.; Bidder, O.; Hunter, J.; Franklin, C. Creating a behavioral classi?cation module for acceleration data: Using a captive surrogate for dif?cult to observe species. J.Exp. Boil. 2013, 216, 4501–4506. [CrossRef] [PubMed]
[42] Zhang,M.;Sawchuk,A.Afeature selection-based framework for human activity recognition using wearable multimodal sensors. In Proceedings of the 6th International Conference on Body Area
[43] Networks, Beijing, China, 7–10 November 2011; Institute for Computer Sciences, Social-Informatics and Telecommunications Engineering: Beijing, China, 2011.
[44] Animals 2018, 8, 12 16 of 16
[45] Trotter, M.; Falzon, G.; Dobos, R.; Lamb, D.; Schneider, D. Accelerometer Based Inference of Livestock Behavior; In Science and Innovation Awards for Young People in Agriculture, Fisheries, and Forestry; Australian Government: NSW, Australia, 2012.
[46] Marais, J.; Le Roux, S.; Wolhuter, R.; Niesler, T. Automatic classi?cation of sheep behavior using 3-axis accelerometer data. In Proceedings of the 2014 PRASA, RobMech and AfLaT International Joint Symposium, Cape Town, South Africa, 27–28 November 2014.
[47] Liaw, A.; Wiener, M. Classi?cation and Regression by random Forest. R News 2002, 2, 18–22.
[48] Diaz-Uriate, R. varSelRF: Variable Selection Using Random Forests. 2014. Available online: http://CRAN.Rproject.org/package=varSelRF (accessed on 22 December 2017).
[49] Pober,D.M.;Staudenmayer,J.;Raphael,C.;Freedson,P.Development of novel techniques to classify physical activity mode using accelerometers. Med. Sci. Sports Exerc. 2006, 38, 1626–1634. [CrossRef] [PubMed]
[50] Stone, M. Cross-validatory choice and assessment of statistical predictions. J. R. Stat. Soc. 1974, 36, 111–147.
[51] Flower, F.; Sanderson, D.; Weary, D. Effects of milking on dairy cow gait. J. Dairy Sci. 2006, 89, 2084–2089. [CrossRef]
[52] Distl, O.; Mair, A. Computerized analysis of pedobarometric forces in cattle at the ground surface/?oor interface. Comput. Electron. Agric. 1993, 8, 237–250. [CrossRef]
[53] Nordlund,K.; Cook,N.B.; Oetzel,G.R.Investigation strategies for laminit is problem herds. J.DairySci. 2004, 87, 27–35. [CrossRef]
[54] Ford, L.; Brian, K. Reducing Lameness for Better Returns 2016. Available online: http://beefandlamb. ahdb.org.uk/wp-content/uploads/2016/03/BRP-Reducing-lameness-manual-7- 080316.pdf (accessed on 22 December 2017).
[55] Kaler, J. Epidemiological Investigations into Lameness in Sheep; University of Warwick: Coventry, UK, 2008.
[56] Colditz, I.; Paull, D.; Hervault, G.; Aubriot, D.; Lee, C. Development of a lameness model in sheep for assessing ef?cacy of analgesics. Aust. Vet. J. 2011, 89, 297–304. [CrossRef] [PubMed]
[57] Krohn, C.; Munksgaard, L. Behavior of dairy cows kept in extensive (loose housing/pasture) or intensive (tie stall) environments II. Lying and lying-down behavior. Appl. Anim. Behave. Sci. 1993, 37, 1–16. [CrossRef]
[58] Kubat, M.; Holte, R.C.; Matwin, S. Machine learning for the detection of oil spills in satellite radar images. Mach. Learn. 1998, 30, 195–215. [CrossRef]
[59] Mazrier, H.; Tal, S.; Aizinbud, E.; Bargai, U. A ?eld investigation of the use of the pedometer for the early detection of lameness in cattle. Can. Vet. J. 2006, 47, 883–886. [PubMed]
[60] Ito, K.; Weary, D.; von Keyserlingk, M. Extreme lying times predict lameness. In Proceedings of the 9th ISAE North-American Regional Meeting, Montreal, QC, Canada, 17–18 July 2009.
[61] King, E.M.; Green, L.E. Assessment of farmer recognition and reporting of lameness in adults in 35 lowland sheep ?ocks in England. Anim. Welf. 2011, 20, 321–328