Related Experiment Video
Updated: Sep 21, 2026

A Pipeline using Bilateral In Utero Electroporation to Interrogate Genetic Influences on Rodent Behavior
Published on: May 21, 2020
Identifying mounting behaviour in boars using deep learning-based instance segmentation and binary classification - a
Harry Aricibasi1, Jessica Bode1, Renée Bergeron1
1Department of Animal Biosciences, University of Guelph, Guelph, ON, Canada.
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.
