STELLAR-CB: Synthetic Temporal LSTM for Livestock Activity Recognition-Cow Behaviour.

Journal: Veterinary medicine and science
Published Date:

Abstract

Precision livestock farming (PLF) leverages activity sensors to monitor behaviours like grazing, resting and walking, yet class imbalance in datasets often leads to underrepresentation of minority behaviours such as 'escaping' and 'being mounted.' This study proposes a novel framework combining long short-term memory (LSTM) networks with the synthetic minority oversampling technique (SMOTE) to address this challenge. Unlike existing methods that use complex SMOTE variants such as DeepSMOTE or latent space augmentations, which add computational complexity and overhead, our approach integrates simple SMOTE with non-overlapping windowed segmentation, preserving sequential patterns during synthetic data generation while augmenting minority classes. The LSTM architecture captures temporal dependencies in the balanced dataset, enabling robust behaviour recognition. Evaluated on a composite accelerometer dataset derived from three distinct cows, the framework generalises across breeds, overcoming limitations of breed-specific models. It achieves state-of-the-art performance with 97.24% accuracy, 97.56% precision, 97.24% recall and a 97.29% F1-score, significantly improving detection of rare behaviours without compromising majority class precision. By unifying data from multiple cows, the model ensures robustness to behavioural variability, enhancing scalability for diverse farming environments. The simplicity of using basic SMOTE reduces computational overhead, making the solution practical for real-world deployment. This work bridges classical data balancing techniques with modern deep learning, offering a resource-efficient blueprint for handling imbalanced time-series data in agricultural AI. The results advance precision livestock farming by improving the reliability of automated behaviour monitoring, directly contributing to enhanced animal welfare and farm productivity through accessible, breed-agnostic AI tools.

Authors

Keywords

No keywords available for this article.