Skip to content
Open access

A Computer Vision Pipeline for Individual-Level Behavior Analysis: Benchmarking on the Edinburgh Pig Dataset

Sep 2025 · Scientific Reports · Vol abs/2509.12047 · 4 citations · 59 references
Computer Science

Abstract

Animal behavior analysis is central to understanding welfare, health, and productivity in livestock, yet manual observation is time-consuming, subjective, and difficult to scale. We present a modular pipeline that integrates open-source, state-of-the-art computer vision models to automate individual-level behavior analysis in group-housing environments. The pipeline does not introduce a new learning algorithm or training paradigm; instead, it combines existing zero-shot object detection, motion-aware segmentation and tracking, and vision-transformer feature extraction into a reproducible end-to-end workflow that isolates each animal from its background before behavior is recognized. This individual-level, background-independent design directly targets the poor cross-environment generalization that limits group-level approaches, and it addresses challenges such as occlusion and crowding in indoor pig monitoring. We validated the system on the Edinburgh Pig Behavior Video Dataset across detection, tracking, and behavior-classification tasks. A temporal model achieved 94.2% overall accuracy on nine behaviors, a 21.2 percentage-point improvement over the previous benchmark, while tracking reached 93.3% identity preservation (IDF1) and detection reached 89.3% average precision. The same pipeline, unchanged in structure, transfers across species and tasks: companion studies report 97.6% accuracy for calf play behavior and 98.3% for dairy-cow posture. By releasing an open-source, end-to-end implementation, this work provides a reproducible and scalable tool for automated, objective, and continuous behavior monitoring in precision livestock farming and welfare assessment.

Read PDF

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.