Dr Ali Alameer A.Alameer1@salford.ac.uk
Lecturer in Artificial Intelligence
Automated detection and quantification of contact behaviour in pigs using deep learning
Alameer, Ali
Authors
Abstract
Detection of Pig Parts (csv, coco, tfrecord and voc formats)
The annotated dataset is provided with different formats for easy deployment: this include, coco, tfrecord, csv and voc. Furthermore, an augmented version of the dataset is provided with many more annotated images. The augmented dataset (recommended) is also provided with annotations using the above formats.
The collected image dataset was annotated by two trained individuals with an animal behaviour background. It encompassed a variety of scenarios, for example, pigs in close contact with one another and under various lighting conditions. We configured a set of pre-processing stages to augment the dataset, applying arbitrary scaling and horizontal flipping. We also manipulated the colour of the pixels and randomly altered the brightness and contrast using the hue, saturation, value (HSV) colour space. The detection dataset comprised a total of 51193 instances (26533 AFBI + 24660 AUF) across 2781 images (1556 AFBI + 1225 AUF); each pig within an image was manually annotated into two parts: head and rear. A bounding box1 was applied manually on the head and rear of all pigs in a pen. The bounding box denotes the location and size of each pig part.
Contact Between Pigs (csv format)
An additional dataset was annotated to validate the interaction method, i.e., the processing stage that feeds from the detection method. This dataset consisted of images from both farms used in this framework.
The total number of images of this dataset was 670 images; with sets of 376 and 294 images to represent AFBI and AUF datasets, respectively. A similar procedure was followed for selecting the image samples to diversify the dataset. This new dataset was annotated by an animal behaviour scientist who scanned all images to score interactions using a predefined ethogram. Any contact between one pig head and another pig rear was scored in a csv file. The entirety of the dataset comprised four classes (per image) as the following: no contact, 1 contact; 2 contacts; 3 or more contacts. Very few images (of the AUF dataset) included more than three contacts; therefore, these were combined in one class to achieve a more balanced class distribution.
Code
Code for the detection method, i.e., detecting heads and rears of individual pigs.
Code for the interaction method, using the above detector to index interactions between head and rear of pigs.
Online Publication Date | Oct 18, 2022 |
---|---|
Publication Date | Oct 18, 2022 |
Deposit Date | Jan 23, 2025 |
DOI | https://doi.org/10.17866/rd.salford.21346767.v2 |
Publisher URL | https://salford.figshare.com/articles/dataset/Automated_detection_and_quantification_of_contact_behaviour_in_pigs_using_deep_learning/21346767 |
Collection Date | Oct 18, 2022 |
You might also like
Vision transformers for automated detection of pig interactions in groups
(2025)
Journal Article
A Newly Adopted YOLOv9 Model for Detecting Mould Regions Inside of Buildings
(2024)
Journal Article
Review of farmer-centered AI systems technologies in livestock operations
(2024)
Journal Article
The Intersection of Generative AI and Healthcare: Addressing Challenges to Enhance Patient Care
(2024)
Presentation / Conference Contribution
A Comprehensive Review of AI Techniques for Addressing Algorithmic Bias in Job Hiring
(2024)
Journal Article
Downloadable Citations
About USIR
Administrator e-mail: library-research@salford.ac.uk
This application uses the following open-source libraries:
SheetJS Community Edition
Apache License Version 2.0 (http://www.apache.org/licenses/)
PDF.js
Apache License Version 2.0 (http://www.apache.org/licenses/)
Font Awesome
SIL OFL 1.1 (http://scripts.sil.org/OFL)
MIT License (http://opensource.org/licenses/mit-license.html)
CC BY 3.0 ( http://creativecommons.org/licenses/by/3.0/)
Powered by Worktribe © 2025
Advanced Search