# Spatiotemporal Modeling and Intelligent Recognition of Sow Estrus Behavior for Precision Livestock Farming

**Authors:** Kaidong Lei, Bugao Li, Hua Yang, Hao Wang, Di Wang, Benhai Xiong

PMC · DOI: 10.3390/ani15192868 · 2025-09-30

## TL;DR

This paper introduces a deep learning system to automatically detect estrus behaviors in sows using video data, improving accuracy and reducing manual labor in pig farming.

## Contribution

A novel CNN + TCN deep learning model is proposed for spatiotemporal recognition of sow estrus behaviors with high accuracy and stability.

## Key findings

- The CNN + TCN model achieved a validation accuracy exceeding 0.98 and an average AUC of 0.9988.
- An intelligent system was developed for real-time monitoring and decision-making in pig farms.
- 3D-CNN and CNN + LSTM models showed strengths in specific behavior types like short-term dynamics and long-duration static behaviors.

## Abstract

Estrus detection in sows is a key challenge in precision livestock farming, as traditional methods are labor-intensive, subjective, and prone to errors. To address this challenge, this study developed and compared three deep learning models (Convolutional Neural Network combined with Long Short-Term Memory, CNN + LSTM), (Three-Dimensional Convolutional Neural Network, 3D-CNN), and (Convolutional Neural Network combined with Temporal Convolu-tional Network, CNN + TCN) based on behavioral video sequences, systematically evaluating their classification performance across multiple estrus-related behaviors. The results show that the CNN + TCN model performs best in terms of recognition accuracy and stability, particularly suitable for behavior recognition tasks with multi-stage and strong temporal characteristics. Based on this, an intelligent recognition system with front-end display and interactive functions was further developed, enabling real-time monitoring and assisted decision-making of sow estrus behaviors, thereby providing a feasible path for the construction of smart pig farms.

Accurate recognition of estrus behavior in sows is of great importance for achieving scientific breeding management, improving reproductive efficiency, and reducing labor costs in modern pig farms. However, due to the evident spatiotemporal continuity, stage-specific changes, and ambiguous category boundaries of estrus behaviors, traditional methods based on static images or manual observation suffer from low efficiency and high misjudgment rates in practical applications. To address these issues, this study follows a video-based behavior recognition approach and designs three deep learning model structures: (Convolutional Neural Network combined with Long Short-Term Memory) CNN + LSTM, (Three-Dimensional Convolutional Neural Network) 3D-CNN, and (Convolutional Neural Network combined with Temporal Convolutional Network) CNN + TCN, aiming to achieve high-precision recognition and classification of four key behaviors (SOB, SOC, SOS, SOW) during the estrus process in sows. In terms of data processing, a sliding window strategy was adopted to slice the annotated video sequences, constructing image sequence samples with uniform length. The training, validation, and test sets were divided in a 6:2:2 ratio, ensuring balanced distribution of behavior categories. During model training and evaluation, a systematic comparative analysis was conducted from multiple aspects, including loss function variation (Loss), accuracy, precision, recall, F1-score, confusion matrix, and ROC-AUC curves. Experimental results show that the CNN + TCN model performed best overall, with validation accuracy exceeding 0.98, F1-score approaching 1.0, and an average AUC value of 0.9988, demonstrating excellent recognition accuracy and generalization ability. The 3D-CNN model performed well in recognizing short-term dynamic behaviors (such as SOC), achieving a validation F1-score of 0.91 and an AUC of 0.770, making it suitable for high-frequency, short-duration behavior recognition. The CNN + LSTM model exhibited good robustness in handling long-duration static behaviors (such as SOB and SOS), with a validation accuracy of 0.99 and an AUC of 0.9965. In addition, this study further developed an intelligent recognition system with front-end visualization, result feedback, and user interaction functions, enabling local deployment and real-time application of the model in farming environments, thus providing practical technical support for the digitalization and intelligentization of reproductive management in large-scale pig farms.

## Full-text entities

- **Species:** Sus scrofa (pig, species) [taxon 9823]

## Figures

13 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12523337/full.md

---
Source: https://tomesphere.com/paper/PMC12523337