Related Experiment Video
Updated: May 14, 2025

Profiling Maternal Behavior Responses During Whole-Brain Imaging
Published on: January 24, 2025
Prediction of Sow Farrowing Onset Time Using Activity Time Series Extracted by Optical Flow Estimation
Kejian Liu1, Yigui Huang1, Junbin Liu1
1College of Mathematics Informatics, South China Agricultural University, Guangzhou 510642, China.
Abstract:
Sow farrowing is a critical stage in pig farming, and predicting its onset can improve sow health and piglet survival. This study proposes a method based on optical flow estimation and time-series forecasting to predict sow farrowing onset. The RAFT optical flow algorithm is applied to visible-light videos of sows in late pregnancy to extract activity levels and generate time-series data. The reliability of the activity extraction algorithm is validated through correlation and trend analysis, showing strong inter-sow correlations with an average Pearson coefficient of 0.819. An in-depth analysis of sow_16 reveals a significant increase in activity 24 h before farrowing. Using these data, the CLA-PTNet model, incorporating CNN, LSTM, and attention mechanisms, is developed for continuous farrowing onset prediction. Experimental results demonstrate high predictive accuracy, with average MAE, RMSE, and R2 values of 5.42 min, 5.97 min, and 0.99, respectively, across four test sows. The method effectively captures activity pattern changes before farrowing, enabling precise predictions. This study offers an innovative, non-invasive solution for predicting sow farrowing onset, with significant application potential in farming practices.

