Skip to content
Open access

Identifying mounting behaviour in boars using deep learning-based instance segmentation and binary classification - a pilot study

Sep 2026 · Frontiers in Bioinformatics · Vol 6 · 0 citations · 46 references
Medicine

Abstract

Introduction Mounting behaviour in group-housed pigs poses significant welfare and productivity challenges, often resulting in injuries and stress. To address this issue, we developed a novel computer vision-based approach for the automatic detection of mounting behaviour in pigs. Methods The pilot study was conducted on eight boars, aged 4–5 months and weighing between 60 and 90 kg, housed in two groups of four. Continuous video footage was collected over a 1-week period using an overhead camera, resulting in 766 2-s video clips. The proposed hybrid approach integrates Mask Region-based Convolutional Neural Network (Mask R-CNN) instance segmentation with a binary classifier. To evaluate the model’s performance under varying data conditions, the dataset was divided into training, validation, and testing sets using three data grouping scenarios: by frame, by clip, and by day. Results Among the five evaluated binary classification algorithms, Support Vector Machine (SVM) was selected based on its superior performance. The hybrid system achieved a balanced accuracy and F1-score of 95% with the clip-based split, rising to 99% with the frame-based split and falling to 74% with the day-based split. Discussion Under pilot conditions, the system offers a feasible proof-of-concept for continuous monitoring of mounting behaviour in group-housed pigs, operating at a processing rate of five frames per second. This capability offers strong potential for supporting early intervention and proactive welfare management, subject to future multi-site validation. Moving forward, future research will focus on integrating individual animal tracking and conducting larger-scale studies to further explore the system’s scalability and enhance its performance.

Read PDF

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