One way to reduce the negative impact of farrowing crates on sow welfare is to limit confinement of sows from the onset of farrowing until the end of the critical period of piglets’ life a few days after farrowing. In order to provide an indication of the time when sows should be confined in crates, ear tag-based acceleration data was modeled to provide the following two types of alarms: A “first-stage” alarm that indicates the beginning of nest-building behaviour, and a “second-stage” alarm that indicates the ending of the nest-building behaviour. In total, 53 sows were included in the experiment. Each sow had an ear tag with an accelerometer sensor mounted on the ear. Acceleration data were modeled with the Kalman filtering and fixed interval smoothing (KALMSMO) algorithm. It was possible to predict farrowing on the basis of increased activity in the validation dataset with a median of 8 h 51 min before the onset of farrowing. Alarms that indicated the need for confinement of the sow in a crate were generated with a median of 2 h 3 min before the onset of farrowing. These results suggest that the developed model should be sufficient to provide early warning of approaching farrowing and secondary alarm indicating the need to confine a sow in a crate.
The adoption of temporary sow confinement could improve animal welfare during farrowing for both the sow and the piglets. An important challenge related to the implementation of temporary sow confinement is the optimal timing of confinement in crates, considering sow welfare and piglet survival. The objective of this study was to predict farrowing with computer vision techniques to optimize the timing of sow confinement. In total, 71 Austrian Large White and Landrace × Large White crossbred sows and four types of farrowing pens were included in the observational study. We applied computer vision model You Only Look Once X to detect sow locations, the calculated activity level of sows based on detected locations and detected changes in sow activity trends with Kalman filtering and the fixed interval smoothing algorithm. The results indicated the beginning of nest-building behavior with a median of 12 h 51 min and ending with a median of 2 h 38 min before the beginning of farrowing with the YOLOX-large object detection model. It was possible to predict farrowing for 29 out of 44 sows. The developed method could reduce labor costs otherwise required for the regular control of sows in farrowing compartments.