Dam behavior patterns in Japanese black beef cattle prior to calving: Automated detection using LSTMRNN Abstract   This study develops a recurrent neural network (RNN) with a long shorttime memory (LSTM) model to detect and recognize calving related behaviors using inertial measurement unit (IMU). The models were trained using IMU data collected from three expectant cows during the last three days before calving. Classified behavior pattern classes included feeding, ruminating (lying), ruminating (standing), lying normal (collected during 72xc2xa0hxe2x80x9324xc2xa0h before calving), standing normal (same as lying normal), lying final and standing final, which were defined as the lying and standing behavior that occurred during the last 24xc2xa0h before calving. The LSTMRNN models were trained to classify cow behavior classes across windowsize of 32, 64, 128 and 256 respectively (1.6xc2xa0s, 3.2xc2xa0s, 6.4xc2xa0s and 12.8xc2xa0s). The best overall performing LSTMRNN model had a windowsize of 32 (accuracy, precision, recall, f1score were 79.7%, 81.1%, 79.7% and 79.8%, respectively). With a windowsize of 32, the model classification accuracy for specific behaviors was 76.0% (feeding), 92.6% (ruminating (lying)), 88.3% (ruminating (standing)), 63.2% (lying normal), 78.0% (standing normal), 74.7% (lying final) and 70.1% (standing final). These results demonstrate the potential of a LSTMRNN model to automatically recognize behaviors patterns prior to birth. In the future, more related indicators will be added to improve the accuracy and robustness of this recognition model. With further work, statistically significant changes in behavior could be streamed to farmers informing them of the progress of calving and alerting them to critical changes in the situation.

Automated Video Behavior Recognition of Pigs Using TwoStream Convolutional Networks The detection of pig behavior helps detect abnormal conditions such as diseases and dangerous movements in a timely and effective manner, which plays an important role in ensuring the health and wellbeing of pigs. Monitoring pig behavior by staff is time consuming, subjective, and impractical. Therefore, there is an urgent need to implement methods for identifying pig behavior automatically. In recent years, deep learning has been gradually applied to the study of pig behavior recognition. Existing studies judge the behavior of the pig only based on the posture of the pig in a still image frame, without considering the motion information of the behavior. However, optical flow can well reflect the motion information. Thus, this study took image frames and optical flow from videos as twostream input objects to fully extract the temporal and spatial behavioral characteristics. Twostream convolutional network models based on deep learning were proposed, including inflated 3D convnet (I3D) and temporal segment networks (TSN) whose feature extraction network is Residual Network (ResNet) or the Inception architecture (e.g., Inception with Batch Normalization (BNInception), InceptionV3, InceptionV4, or InceptionResNetV2) to achieve pig behavior recognition. A standard pig video behavior dataset that included 1000 videos of feeding, lying, walking, scratching and mounting from five kinds of different behavioral actions of pigs under natural conditions was created. The dataset was used to train and test the proposed models, and a series of comparative experiments were conducted. The experimental results showed that the TSN model whose feature extraction network was ResNet101 was able to recognize pig feeding, lying, walking, scratching, and mounting behaviors with a higher average of 98.99%, and the average recognition time of each video was 0.3163 s. The TSN model (ResNet101) is superior to the other models in solving the task of pig behavior recognition.