Analysis of visual features extracted from farrowing sows
Abstract
Understanding the farrowing process is essential for advancing swine welfare and productivity. Computer vision offers a non-invasive approach to monitor sow farrowing. While current efforts largely rely on fine-tuned supervised models that require extensive image labeling, the use of foundation vision models (FVM) in this context remains underexplored. The objective of this study is to implement a FVM for extracting visual features of farrowing sows and to evaluate the variation associated with those features. Top-view cameras were installed in each crate overlooking sows and piglets before and during farrowing. We developed a phenotyping tool based on FVM to segment the sow's body with minimal supervision. The tool requires only a single manually annotated body contour (mask) of each sow as input and it automatically extends this mask to segment the sow across all frames. The resulting segmentation masks were highlighted in the output videos and reviewed by a trained human observer to verify the performance of the phenotyping tool. It was noticed that when the FVM was applied forward, many errors occurred. For example, piglet pixels were mistakenly labeled as sow pixels (false positive sow mask). Thus, a bidirectional segmentation method was applied, consisting of reverse and forward segmentation from the middle frame to the beginning and the end of the video. The resulting masks contained very few incorrectly labeled pixels. It was concluded that the ideal starting point for segmenting a sow is any frame where both piglets and sow are visible. From the mask-annotated frames, image features such as the mask area, convex area, and various dimensions were extracted for detailed shape analysis. Then, we studied the variation of visual features during a baseline period before farrowing. We expect that those features that show greater sow-to-sow variation are more predictive of sow ID while those features that have less sow-to-sow variance and more within sow variance are more predictive of sow changes in posture and behavior. Feature values were averaged over sliding time windows of 10, 20, 30, and 60 minutes and examined in relation to the hour of the day to account for circadian variation. Using a linear mixed-effects model with sow as a random effect, we identified where the variation was mainly due the sow, such as total area (57% repeatability). On the other side, eccentricity, concavity, and elongation, showed low repeatability (15%, 17%, and 19%, respectively), which shows the least sow-to-sow variance. This suggests that a common baseline across sows is more likely for these traits. The effect of time and window length did not affect repeatability. Using the analyzed baseline, we will apply anomaly detection identify outliers that indicate the onset of farrowing.
Keywords: 2026
How to Cite:
Berg, I., Bi, Y., Perez, J., Rosero, D., Silva, G. & Steibel, J., (2026) “Analysis of visual features extracted from farrowing sows”, World Congress on Genetics Applied to Livestock Production Digital Archive 2026(1): 2286003. doi: https://doi.org/10.31274/wcgalp.23834
Rights: 1
Downloads:
Download PDF
View PDF
54 Views
13 Downloads