Fusion of Res3D, BiLSTM and Attention Mechanism for Sheep Behavior Recognition Method

YUAN Hongbo, CAO Runliu, CHENG Man

Abstract

In intensive sheep farms, behavioral changes can map out whether there are abnormalities in the sheep’s body. For example, when sheep are sick, rumination and feeding time will produce significant changes, and behavioral observation is one of the ways to diagnose their health. Identifying animal behavior can provide a basis for disease prevention and rational feeding, thus improving the focus on animal health and welfare. Therefore, animal behavior recognition has always been a focus of attention for researchers and production managers. Traditional manual observation methods require continuous human monitoring, and the fatigue response from long hours of human work tends to cause subjective errors in the results. In addition, sensor detection methods that require direct contact with the animal’s body tend to stress the animal, affecting animal health and production performance. A deep learning network model AdRes3D-BiLSTM was proposed that incorporated a three dimensional residual convolutional neural network, a bi-directional long and short-term memory network, and an attention mechanism. The AdRes3D component introduced depth separable convolution, a technique instrumental in curtailing computational complexity and enhancing network efficiency. Furthermore, an actionnet attention mechanism based on motion principles was embedded within the AdRes3D section, directing the network’s focus toward discerning behavioral nuances. This augmentation amplified the model’s adeptness in extracting pivotal behavioral key points across consecutive video frames, thereby augmenting its capacity for feature extraction across both temporal and spatial dimensions. Subsequently, the feature vectors extracted from this process were inputted into the BiLSTM module, affording bidirectional filtering and updating for temporal features, and the final sheep behaviors were accurately recognized. A dataset comprising 6000 distinct videos was amassed for training the proposed model. This dataset encompassed different sheep instances, spanning varying periods, lighting conditions, and poses. An additional set of 1200 behavioral videos, distincting from those employed in training, was selected as the testing data. The experimental results showed the efficacy of the AdRes3D-BiLSTM model, as evidenced by an exceptional comprehensive recognition accuracy rate of 98.72% across five fundamental sheep behaviors: standing, lying, feeding, walking, and ruminating. In contrast to five alternative network architectures—namely, C3D, R(2+1)D, Res3D, Res3D-LSTM, and Res3D-BiLSTM-the AdRes3D-BiLSTM model achieved notable improvements in recognition metrics. Specifically, relative to these network models, AdRes3D-BiLSTM exhibited a precision enhancement of 11.32 percentage points, 6.24 percentage points, 4.34 percentage points, 2.04 percentage points and 1.52 percentage points, respectively. The corresponding improvements in recognition recall stood at 11.78 percentage points, 6.38 percentage points, 4.38 percentage points, 2.12 percentage points and 1.68 percentage points, while F1-score improvements registered at 11.70 percentage points, 6.35 percentage points, 4.38 percentage points, 2.08 percentage points and 1.60 percentage points, and the augmentation in recognition accuracy was quantified at 11.97 percentage points, 6.33 percentage points, 4.37 percentage points, 2.32 percentage points and 2.01 percentage points. Furthermore, the method elucidated boasted an impressive frame rate, attaining a remarkable 52.79 frames per second (FPS). This recognition speed substantiated the model’s real-time processing capabilities, thereby satisfying operational demands. Additionally, a 24-hour uninterrupted video segment was randomly culled from the repository of collected videos, effectively validating the model’s efficacy in a real-world environment. This investigation ushers in novel methodologies and conceptual insights for animal behavior recognition based on video streams. The strides furnished fresh avenues for advancing the field, presenting innovative strategies and perspectives for further exploration and implementation.

 

Keywords:sheep;behavior recognition;video streaming;Res3D;BiLSTM;attentional mechanism

 

Download Full Text:

PDF


References


MEPHAM Т В. The role of food ethics in food policy [J] . Proceedings of the Nutrition Society, 2020,59; 609 -618.

GOUGOULIS D A, KYRIAZAKIS I, FTHENAKIS G C. Diagnostic significance of behaviour changes of sheep; a selected review[J]. Small Ruminant Research, 2010, 92(1 -3) ; 52 -56.

MANSBRIDGE N, MITSCH J, BOLLARD N, et al. Feature selection and comparison of machine learning algorithms in classification of grazing and rumination behaviour in sheep [J ]. Sensors, 2018, 18( 10) ; 3532.

MARTISKA1NEN P, JARVINEN M, SKON J P, et al. Cow behavior pattern recognition using a three-dimensional accelerometer and support vector machines [ j. Applied Animal Behaviour Science, 2009, 1 19( 1 -2) ; 32 -38.

BARWICK J, LAMB D, DOBOS R, et al. Predicting lameness in sheep activity using tri-axial acceleration signals [J]. Animals, 2018, 8(1); 12.

SU Q G,TANG J L, ZHAI M X, et al. An intelligent method for dairy goat tracking based on Siamese network [J]. Computers and Electronics in Agriculture, 2022, 193; 106636.

CHEN Y J, HE D J, FU Y X, et al. Intelligent monitoring method of cow ruminant behavior based on video analysis technology [J] . International Journal of Agricultural and Biological Engineering, 2017, 10(5) ; 194 -202.

ALVARENGA F A P, BORGES I, PALKOVIC L, et al. Using a three-axis accelerometer to identify and classify sheep behaviour at pasture [J]. Applied Animal Behaviour Science, 2016, 181; 91 -99.

CHENG M, YUAN H B. WANG Q F, et al. Application of deep learning in sheep behaviors recognition and influence analysis of training data characteristics on the recognition effect [J]. Computers and Electronics in Agriculture, 2022, 198; 107010.

DWYER С M, LAWRENCE A B. Frequency and cost of human intervention at lambing; an interbreed comparison [ J]. Veterinary Record, 2005, 157(4) ; 101 - 104.

STOTT A W, MILNE С E, GODDARD P J, et al. Projected effect of alternative management strategies on profit and animal welfare in extensive sheep production systems in Great Britain [J ]. Livestock Production Science, 2005 , 97(2 - 3); 161 -171.

NASIRAHMADI A, STURM B, EDWARDS S, et al. Deep learning and machine vision approaches for posture detection of individual pigs [J ]. Sensors, 2019,19(17); 3738.

RAO Y, JIANG M, W ANG R, et al. On-farm welfare monitoring system for goats based on internet of things and machine learning [J/OL] . International Journal of Distributed Sensor Networks, 2020. https://doi. org/10. 1 177/1550147720944030.

WANG Shaohua, HE Dongjian. Estrus behavior recognition of dairy cows based on improved YOLO v3 model [J] . Transactions of the Chinese Society for Agricultural Machinery, 2021 , 52(7) : 141 - 150. (in Chinese)

ZHANG 'I Q,CAI J H, XIAO D Q, et al. Real-time sow behavior detection based on deep learning [ J ] . Computers and Electronics in Agriculture, 2019, 163: 104884.

LI Dan, ZHANG Kaifeng, LI Xingjian, et al. Mounting behavior recognition for pigs based on Mask R - CNN [ J ]. Transactions of the Chinese Society for Agricultural Machinery, 2019, 50(Supp. ) ; 261 -266. (in Chinese)

YANG A Q, HUANG LI S, YANG X F, et al. Automated video analysis of sow nursing behavior based on fully convolutional network and oriented optical flow[ J ]. Computers and Electronics in Agriculture, 2019, 167; 105048.

ZHANG К F,LI D, HUANG J Y, et al. Automated video behavior recognition of pigs using two-stream convolutional networks [J]. Sensors, 2020, 20(4) : 1085.

FUENTES A, YOON S, PARK J, et al. Deep learning-based hierarchical cattle behavior recognition with spatio-temporal information[ J ]. Computers and Electronics in Agriculture, 2020, 177: 105627.

QIAO Y L, GUO Y Y, YU К P, et al. C3D - ConvLSTM based cow behaviour classification using video data for precision livestock farming [ J]. Computers and Electronics in Agriculture, 2022, 193; 106650.

YIN X Q,WU D H, SHANG Y Y, et al. Using an EfficientNet - LSTM for the recognition of single cow's motion behaviours in a complicated environment [J ]. Computers and Electronics in Agriculture, 2020, 177: 105707.

WU D H, WANG Y F, HAN M X, et al. Using a CNN — LSTM for basic behaviors detection of a single dairy cow in a complex environment [J ]. Computers and Electronics in Agriculture, 2021 , 182; 106016.

JIANG B,YIN X Q, SONG H B. Single-stream long-term optical flow convolution network for action recognition of lameness dairy cow[J]. Computers and Electronics in Agriculture, 2020, 175; 105536.

LI D,ZHANG К F, LI Z B, et al. A spatiotemporal convolutional network for multi-behavior recognition of pigs[ J ]. Sensors, 2020, 20(8) : 2381.

CHEN C, ZHU W X, STEIBEL J, et al. Recognition of feeding behaviour of pigs and determination of feeding time of each pig by a video-based deep learning method [J] . Computers and Electronics in Agriculture, 2020, 176; 105642.


Refbacks

  • There are currently no refbacks.