DOI: 10.1093/jas/skag272.322 ISSN: 0021-8812

PS10-3. Effectiveness of Computer Vision to Quantify Piglet Backtest Behavior.

Gloria Sunderland, Mamunur Rahman, Sandra L Rodriguez Zas, Isabella C F S Condotta

Abstract

The backtest is a behavioral assay in which a piglet is restrained in dorsal recumbency for approximately 60 s while its struggle response is observed. The amount of movement expressed during the test is commonly interpreted as an indicator of behavioral reactivity or stress responsiveness. However, manual scoring of these recordings is labor-intensive and difficult to scale across large behavioral datasets. Therefore, the objectives of this study were to 1) evaluate the feasibility of using computer vision and pose estimation to automatically quantify piglet movement during backtest assays and 2) examine whether the resulting movement metrics captured variation among piglet groups. A pilot pose-based estimation model based on keypoints was trained on over 60 manually annotated frames from backtest videos of piglets from different sex and litter size groups. Each annotated frame included a bounding box and the snout, and hoofs served as anatomical keypoints. The model was developed in the Ultralytics YOLOv8 pose framework, and validation on the manually annotated dataset indicated high image analysis performance (precision ≈ 0.99 and recall ≈ 0.99). The trained model was then applied to more than 100 back test videos, generating approximately 6,000 frames for analysis. Body movement was calculated as centroid displacement derived from pose keypoints. Mean body movement was 12.0 ± 5.8 pixels/s, and model-derived movement metrics showed structured variation across groups. Female piglets had greater mean body movement than males (P = 0.011), and movement also increased with litter size (P < 0.001). Model-derived movement was positively associated with manually annotated struggle events (P < 0.001). Across piglet groups, image analysis predictions discriminated between struggle and non-struggle intervals with a Receiver Operating Characteristic Area Under Curve value of 0.63. These results indicate that pose-based computer vision can recover behaviorally relevant movement signals from piglet backtest videos and support its potential as a scalable tool for behavioral phenotyping. This study is supported by USDA NIFA grant number 2022-38420-38610.