Sheep Behavioral Analysis with Optical Flow

Authors

DOI:

https://doi.org/10.22456/2175-2745.143534

Keywords:

Precision Livestock Farming, Motion Detection, Optical Flow, Sheep Behavior

Abstract

Determining behavioral deviations in sheep is challenging through visual observation alone, as sheep are generally stoic animals and may not easily show signs of pain or discomfort. This study aimed to evaluate and classify activity changes in sheep using optical flow algorithms as an alternative approach. Video recordings of 32 sheep housed in 8 pens were analyzed over 4 days, with each day consisting of 4 one-hour video segments. These segments were manually observed at 5-minute intervals to document the time spent laying, standing, and walking. Simultaneously, the same video segments were analyzed using optical flow algorithms to track movement patterns. The calculated optical flow measures, including mean, variance, skewness, and kurtosis, were then correlated with the observed behaviors. These measures demonstrated their potential as effective tools for monitoring behavioral activity changes in sheep, providing an objective method to track behavior and detect deviations that might indicate discomfort, stress, or health issues.

Downloads

Download data is not yet available.

References

WALTON, E. et al. Evaluation of sampling frequency, window size and sensor position for classification of sheep behaviour. Royal Society Open Science, The Royal Society Publishing, v. 5, n. 2, p. 171442, 2018.

GUZMÁN, P. et al. Optical flow in a smart sensor based on hybrid analog-digital architecture. Sensors, Molecular Diversity Preservation International (MDPI), v. 10, n. 4, p. 2975–2994, 2010.

SUN, D.; ROTH, S.; BLACK, M. J. A quantitative analysis of current practices in optical flow estimation and the principles behind them. International Journal of Computer Vision, Springer, v. 106, p. 115–137, 2014.

DAWKINS, M. S.; CAIN, R.; ROBERTS, S. J. Optical flow, flock behaviour and chicken welfare. Animal Behaviour, Elsevier, v. 84, n. 1, p. 219–223, 2012.

DAWKINS, M. S. et al. Optical flow patterns in broiler chicken flocks as automated measures of behaviour and gait. Applied Animal Behaviour Science, Elsevier, v. 119, n. 3-4, p. 203–209, 2009.

LI, W. et al. Correlation search between growth performance and flock activity in automated assessment of pekin duck stocking density. Computers and Electronics in Agriculture, Elsevier, v. 152, p. 26–31, 2018.

ALVARENGA, F. et al. Using a three-axis accelerometer to identify and classify sheep behaviour at pasture. Applied Animal Behaviour Science, Elsevier, v. 181, p. 91–99, 2016.

BARWICK, J. et al. Predicting lameness in sheep activity using tri-axial acceleration signals. Animals, MDPI, v. 8, n. 1, p. 12, 2018.

KALER, J. et al. Automated detection of lameness in sheep using machine learning approaches: Novel insights into behavioural differences among lame and non-lame sheep. Royal Society Open Science, The Royal Society, v. 7, n. 1, p. 190824, 2020.

BATI, C. T.; SER, G. Sheepfearnet: Sheep fear test behaviors classification approach from video data based on optical flow and convolutional neural networks. Computers and Electronics in Agriculture, Elsevier, v. 204, p. 107540, 2023.

XU, J. et al. Automatic sheep behaviour analysis using mask R-CNN. In: IEEE. 2021 Digital Image Computing: Techniques and Applications (DICTA). [S.l.], 2021. p. 01–06.

CHEN, K. et al. Deep learning for sensor-based human activity recognition: Overview, challenges, and opportunities. ACM Computing Surveys (CSUR), ACM New York, NY, USA, v. 54, n. 4, p. 1–40, 2021.

QIAO, Y. et al. Intelligent perception-based cattle lameness detection and behaviour recognition: A review. Animals, MDPI, v. 11, n. 11, p. 3033, 2021.

DAWKINS, M. S. et al. Optical flow, behaviour and broiler chicken welfare in the UK and Switzerland. Applied Animal Behaviour Science, Elsevier, v. 234, p. 105180, 2021.

LI, Y. Z.; JOHNSTON, L. J.; DAWKINS, M. S. Utilization of optical flow algorithms to monitor development of tail biting outbreaks in pigs. Animals, MDPI, v. 10, n. 2, p. 323, 2020.

KÜSTER, S. et al. Usage of computer vision analysis for automatic detection of activity changes in sows during final gestation. Computers and Electronics in Agriculture, Elsevier, v. 169, p. 105177, 2020.

GOLLAPUDI, S. Learn Computer Vision Using OpenCV: With Deep Learning CNNs and RNNs. [S.l.]: Apress, 2019.

TANBERK, S. et al. A hybrid deep model using deep learning and dense optical flow approaches for human activity recognition. IEEE Access, IEEE, v. 8, p. 19799–19809, 2020.

FARNEBÄCK, G. Two-frame motion estimation based on polynomial expansion. In: SPRINGER. Image Analysis: 13th Scandinavian Conference, SCIA 2003 Halmstad, Sweden, June 29–July 2, 2003 Proceedings 13. [S.l.], 2003. p. 363–370.

Downloads

Published

2025-02-20

How to Cite

Neves da Silva, P. H., Gonçalves Mateus, R., Sant’Ana, D. A., Lucas Neves de Melo, S., & Pistori, H. (2025). Sheep Behavioral Analysis with Optical Flow. Revista De Informática Teórica E Aplicada, 32(1), 107–113. https://doi.org/10.22456/2175-2745.143534

Issue

Section

WVC2024

Most read articles by the same author(s)