Lei Yao, Jin Liu, Wei Hong, Fanrong Kong, Zipei Fan, Lin Lei, Xinwei Li
Accurate and non-invasive monitoring of dairy cows is a cornerstone of precision livestock farming, paving the way for proactive health management and earlier disease detection. The development of robust, AI-driven diagnostic tools, however, is hindered by a dual challenge: scarce realistic video datasets and a lack of standardized benchmarks for deep learning models. To confront these issues, this study puts forward SideCow-VSS, a video semantic segmentation dataset comprising 921 side-view clips with dense, pixel-level annotations of dairy cows under variable on-farm conditions. We systematically evaluated eight deep learning architectures, from classic convolutional neural networks to state-of-the-art Transformers. The evaluation highlighted a clear performance trade-off: the Mask2Former model with a Swin-L backbone yielded the highest mIoU at 97.32%, making it well-suited for detailed morphological analysis. In contrast, the lightweight PIDNet-s model achieved the fastest inference speed of 59.5 FPS, demonstrating its potential for real-time behavioral alerting systems. This work delivers a foundational resource and quantitative framework to inform model selection, accelerating the creation of computer vision systems for automated health monitoring and adopting preventive strategies against key metabolic and immunological disorders in dairy production.