Monitoring cattle behavior using deep learning: An LSTM-based approach with accelerometer data

Monitoring cattle behavior using deep learning

11 views

Authors

  • Tran Duc Nghia Institute of Information Technology, Vietnam Academy of Science and Technology
  • Vi Manh Tuyen Faculty of Electrical and Electronic Engineering, Phenikaa University
  • Tran Binh Duong Vietnam Paper Corporation
  • Hoang Minh Thang MobiFone Corporation - MobiFone Northern Network Center
  • Pham Quang Huy Electric Power University
  • Do Viet Manh Institute of Information Technology, Vietnam Academy of Science and Technology
  • Prof.Dr Tan Tran Duc (Corresponding Author) Faculty of Electrical and Electronic Engineering, Phenikaa University

Keywords:

accelerometer, behavior classification, LSTM, monitoring

Abstract

Behavior data analysis is a crucial factor in the early detection of cow health issues, thereby optimizing farming processes and improving productivity in large-scale farms. Accelerometers, attached to the neck or legs of cows, collect movement data, providing a foundation for analyzing animal behavior. Previous studies have proposed cow behavior classification systems based on accelerometer data combined with machine learning algorithms. However, with the advancement of deep learning, the application of Long Short-Term Memory (LSTM) networks can significantly enhance classification performance. In this study, we utilize an LSTM network to classify four primary cow behaviors: Eating, Lying, Standing, and Walking. The LSTM model effectively processes time-series data by retaining essential information while filtering out unnecessary data. Experimental results demonstrate that the model achieves high classification performance, with an average accuracy of approximately 90% across all behaviors, outperforming traditional machine learning algorithms. This research can be implemented in smart farms, integrating with IoT technology to automate livestock monitoring and management efficiently.

References

. S. S. Goel, A. Goel, M. Kumar, G. Moltó, "A review of Internet of Things: qualifying technologies and boundless horizon", J. Reliab. Intell. Environ., vol. 7, pp. 23-33, Jan. 2021.

. C. Demongivert, K. Bouchard, S. Gaboury, B. Bouchard, M. Lussier, C. Parenteau, C. Laliberté, M. Couture, N. Bier, S. Giroux, "A distributable event-oriented architecture for activity recognition in smart homes", J. Reliab. Intell. Environ., vol. 7, pp. 215–231, Jan. 2021.

. P. K. Keserwani, M. C. Govil, E. S. Pilli, P. Govil, "A smart anomaly-based intrusion detection system for the Internet of Things (IoT) network using GWO-PSO-RF model", J. Reliab. Intell. Environ., vol. 25, pp. 3-21, Jan. 2021.

. M. Laghrouche, L. Montes, J. Boussey, D. Meunier, S. Ameur, A. Adane, "In situ calibration of wall shear stress sensor for micro fluidic application", Procedia Eng., vol. 7, pp. 1225–1228, 2011.

. J. A. Onesimu, A. Kadam, K. M. Sagayam, A. A. Elngar, "Internet of things based intelligent accident avoidance system for adverse weather and road conditions", J. Reliab. Intell. Environ., Jan. 2021.

. Charlton, G. L., V. Bouffard, J. Gibbons, E. Vasseur, D. B. Haley, D. Pellerin, J. Rushen, A. M. de Passillé., " Can automated measures of lying time help assess lameness and leg lesions on tie-stall dairy farms?", Appl. Anim. Behav. Sci., vol. 175, pp. 14-22, Feb. 2013.

. Bailey, D. W., M. B. Stephenson, and M. Pittarello, " Effect of terrain heterogeneity on feeding site selection and livestock movement patterns", Anim. Prod. Sci., vol. 55, pp. 298–308, Feb. 2015.

. B. Robert, B. J. White, D. G. Renter, R. L. Larson, "Evaluation of three-dimensional accelerometers to monitor and classify behavior patterns in cattle", Comput. Electro. Agric., vol. 67, no. 1-2, pp. 80–84, Mar. 2009.

. C. Arcidiacono, S. M. Porto, M. Mancino, G. Cascone, "A threshold-based algorithm for the development of inertial sensor-based systems to perform real-time cow step counting in free-stall barns", Biosyst. Eng., vol. 153, pp. 99–109, Nov. 2016.

. C. Arcidiacono, S. M. C. Porto, M. Mancino, G. Cascone, "Development of a threshold-based classifier for real-time recognition of cow feeding and standing behavioral activities from accelerometer data", Comput. Electro. Agric., vol. 134, pp. 124–134, Jan. 2017.

. N. B. Cook, T. B. Bennett, K. V. Nordlund, "Monitoring Indices of Cow Comfort in Free-Stall-Housed Dairy Herds", J. Dairy Sci., vol. 88, no. 11, pp. 3876–3885, Nov. 2005.

. S. A. Schoenig, T. S. Hildreth, L. Nagl, H. Erickson, M. F. Spire, D. Andresen, S. Warren, "Ambulatory Instrumentation Suitable for Long-Term Monitoring of Cattle Health", in Conf. Proc. IEEE Eng. Med. Biol. Soc., San Francisco, CA, USA, 2004.

. F. Mahmoud, B. Christopher, A. Maher, H. Jürg, S. Alexander, S. Adrian, H. Gaby, "Prediction of calving time in dairy cattle", Anim. Reprod. Sci., vol. 187, pp. 37–46, Dec. 2017.

. H. C. Weigele, L. Gygax, A. Steiner, B. Wechsler, J. B. Burla, "Moderate lameness leads to marked behavioral changes in dairy cows", J. Dairy Sci., vol. 3101, pp. 2370–2382, Mar. 2018.

. G. M. Pereira, J. H. Bradley, I. E. Marcia, "Validation of an eartag accelerometer sensor to determine rumination, eating, and activity behaviors of grazing dairy cattle", J. Dairy Sci., vol. 101, pp. 2492–2495, Jan. 2019.

. M. R. Borchers, Y. M. Chang, "A validation of technologies monitoring dairy cow feeding, ruminating, and lying behaviors", J. Dairy Sci., vol. 999, pp. 7458–7466, May 2016.

. S. M. C. Porto, C. Arcidiacono, "Localization and identification performances of a real-time 4 system based on ultra wide band technology for monitoring and tracking dairy cow behavior in semi-open free-stall barn", Comput. Electro. Agric., vol. 108, pp. 221–229, Oct. 2014.

. I. Halachmi, "Precision livestock farming applications. ", Wageningen Academic Publishers, vol. 10:9, pp. 1482–1483, 2016.

. K. Fogsgaard, C. Røntved, P. Sørensen, M. Herskin, "Sickness behavior in dairy cows during Escherichia coli mastitis", Int. J. Dairy Sci., vol. 95, pp. 630–638, Feb. 2012.

. J. Siivonen, S. Taponen, M. Hovinen, M. Pastell, B. J. Lensink, S. Pyörälä, L. Hänninen, "Impact of acute clinical mastitis on cow behaviour", Appl. Anim. Behav. Sci., vol. 132, pp. 101–106, July. 2011.

. T. Halasa, K. Huijps, O. Østerås, H. Hogeveen, "Economic effects of bovine mastitis and mastitis management: a review.", Veterinary Quarterly, vol. 29:1, pp. 18–31, Nov. 2011.

. P. Sepulveda-Varas, K. L. Proudfoot, D. M. Weary, M. A.G. von Keyserlingk, "Changes in behaviour of dairy cows with clinical mastitis", Appl. Anim. Behav. Sci., vol. 175, pp. 8–13, Feb. 2016.

. H. M. Zebari, S. M. Rutter, E. C. L. Bleach, "Characterizing changes in activity and feeding behaviour of lactating dairy cows during behavioural and silent oestrus", Appl. Anim. Behav. Sci., vol. 206, pp. 12–17, Sep. 2018.

. Robert B, White B, Renter D, Larson R, "Evaluation of three-dimensional accelerometers to monitor and classify behavior patterns in cattle", Comput. Electron. Agric., vol. 67, pp. 80–84, Sep. 2009.

. R. Dutta, D. Smith, R. Rawnsley, G. Bishop-Hurley, J. Hills, G. Timms, D. Henry, "Dynamic cattle behavioral classification using supervised ensemble classifiers", Comput. Electron. Agric., vol. 111, pp. 18–28, Feb. 2015.

. P. Martiskainen, M. Jarvinen, "Cow behavior pattern recognition using a three-dimensional accelerometer and support vector machines", Appl. Anim. Behav. Sci., vol. 119, pp. 32–38, Jun. 2009.

. J. A. Vázquez Diosdado, Z. E. Barker, H. R. Hodges et al., "Classification of behavior in housed dairy cows using an accelerometer-based activity monitoring system", Anim. Biotelemetry, vol. 3, no. 15, Jun. 2015.

. F. W. Oudshoorn, C. Cornou, A. L. F. Hellwing, H. H. Hansen, L. Munksgaard, P. Lund, T. Kristensen, "Estimation of grass intake on pasture for dairy cows using tightly and loosely mounted di- and tri-axial accelerometers combined with bite count", Comput. Electron. Agric., vol. 99, pp. 227–235, Sep. 2013.

. K. Abell, M. Theurer, R. Larson, B. White, D. Hardin, R. Randle, "Predicting bull behavior events in a multiple-sire pasture with video analysis, accelerometers, and classification algorithms", Comput. Electron. Agric., vol. 131, pp. 221–227, 2017.

. J. Wang, Z. He, "Development and validation of an ensemble classifier for real-time recognition of cow behavior patterns from accelerometer data and location data", PLoS One, vol. 13, 2018.

. J. Wang, Z. He, J. Ji, K. Zhao, H. Zhang, "IoT-based measurement system for classifying cow behavior from tri-axial accelerometer", Cienc. Rural, vol. 49, pp. 1–13, Mar. 2019.

. C. P. K. Phung, D. T. Tran, V. T. Duong, H. T. Nguyen, D. N. Tran, "The new design of cows' behavior classifier based on acceleration data and proposed feature set", Math. Biosci. Eng., vol. 17, no. 4, pp. 2760-2780, March 2020.

. B. D. Robért, B. J. White, D. G. Renter, R. L. Larson, "Determination of lying behavior patterns in healthy beef cattle by use of wireless accelerometers", Am. J. Vet. Res.; vol. 72, pp. 467–473, Apr. 2011.

. P. Martiskainen, M. Jarvinen, "Cow behavior pattern recognition using a three-dimensional accelerometer and support vector machines", Appl. Anim. Behav. Sci., vol. 119, pp. 32–38, Jun. 2009.

. Y. Peng, N. Kondo, T. Fujiura, T. Suzuki, W. Hidetsugu, Y. Yoshioka and E. Itoyama, "Classification of Multiple Cattle Behavior Patterns Using a Recurrent Neural Network with Long Short-Term Memory and Inertial Measurement Units," in Computers and Electronics in Agriculture, vol. 157, pp. 247-253, 2019, doi: 10.1016/j.compag.2018.12.023.

. D. N. Tran, T. N. Nguyen, P. C. P. Khanh and D. T. Tran, "An IoT-based Design Using Accelerometers in Animal Behavior Recognition Systems" in IEEE Sens. J., 2021, doi: 10.1109/JSEN.2021.3051194.

Downloads

Published

26-05-2025

How to Cite

[1]
D. N. Tran, “Monitoring cattle behavior using deep learning: An LSTM-based approach with accelerometer data: Monitoring cattle behavior using deep learning”, JMST, vol. 103, no. 103, pp. 102–109, May 2025.

Issue

Section

Information technology & Applied mathematics