|

A computer vision image differential approach for automatic detection of aggressive behaviour in pigs using deep learning.

Researchers

Journal

Modalities

Models

Abstract

Pig aggression is a major problem facing the industry as it negatively affects both the welfare and the productivity of group-housed pigs. This study aimed to use a supervised deep learning approach based on a Convolutional Neural Network (CNN) and image differential to automatically detect aggressive behaviours in pairs of pigs. Different pairs of unfamiliar piglets (N = 32) were placed into one of two observation pens for 3 days, where they were video recorded each day for 1 hour following mixing, resulting in 16 hours of video recordings of which 1.25 hours were selected for modelling. Four different approaches based on the number of frames skipped (1, 5, or 10 for Diff1, Diff5 and Diff10, respectively) and the amalgamation of multiple image differences into one (blended) were used to create 4 different datasets. Two CNN models were tested, with architectures based on the Visual Geometry Group (VGG) VGG-16 model architecture, consisting of convolutional layers, max-pooling layers, dense layers, and dropout layers. While both models had similar architectures, the second CNN model included stacked convolutional layers. Nine different sigmoid activation function thresholds between 0.1 and 1.0 were evaluated and a 0.5 threshold was selected to be used for testing. The stacked CNN model correctly predicted aggressive behaviours with the highest accuracy (0.80), precision (0.80), recall (0.78) and AUC (0.80) values. When analysing the model recall for behaviour subtypes prediction, mounting and mobile non-aggressive behaviours were the hardest to classify (recall = 0.63 and 0.75), while head biting, immobile and parallel pressing were easy to classify (recall = 0.95, 0.94 and 0.91). Runtimes were also analyzed with the blended dataset, taking 4 times less time to train and validate than the Diff1, Diff5, and Diff10 datasets. Pre-processing time was reduced by up to 2.3 times in the blended dataset compared to the other datasets and, when combined with testing run-times, it satisfied the requirements for real-time systems capable to detect aggressive behaviour in pairs of pigs. Overall, these results show that using a CNN and image differential-based deep learning approach can be an effective and computationally efficient technique to automatically detect aggressive behaviours in pigs.© The Author(s) 2023. Published by Oxford University Press on behalf of the American Society of Animal Science. All rights reserved. For permissions, please e-mail: [email protected].

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *