Toggle Main Menu Toggle Search

Open Access padlockePrints

Automatic individual pig detection and tracking in pig farms

Lookup NU author(s): Dr Helen GrayORCiD



This work is licensed under a Creative Commons Attribution 4.0 International License (CC BY 4.0).


© 2019 by the authors. Licensee MDPI, Basel, Switzerland.Individual pig detection and tracking is an important requirement in many video-based pig monitoring applications. However, it still remains a challenging task in complex scenes, due to problems of light fluctuation, similar appearances of pigs, shape deformations, and occlusions. In order to tackle these problems, we propose a robust on-line multiple pig detection and tracking method which does not require manual marking or physical identification of the pigs and works under both daylight and infrared (nighttime) light conditions. Our method couples a CNN-based detector and a correlation filter-based tracker via a novel hierarchical data association algorithm. In our method, the detector gains the best accuracy/speed trade-off by using the features derived from multiple layers at different scales in a one-stage prediction network. We define a tag-box for each pig as the tracking target, from which features with a more local scope are extracted for learning, and the multiple object tracking is conducted in a key-points tracking manner using learned correlation filters. Under challenging conditions, the tracking failures are modelled based on the relations between responses of the detector and tracker, and the data association algorithm allows the detection hypotheses to be refined; meanwhile the drifted tracks can be corrected by probing the tracking failures followed by the re-initialization of tracking. As a result, the optimal tracklets can sequentially grow with on-line refined detections, and tracking fragments are correctly integrated into respective tracks while keeping the original identifications. Experiments with a dataset captured from a commercial farm show that our method can robustly detect and track multiple pigs under challenging conditions. The promising performance of the proposed method also demonstrates the feasibility of long-term individual pig tracking in a complex environment and thus promises commercial potential.

Publication metadata

Author(s): Zhang L, Gray H, Ye X, Collins L, Allinson N

Publication type: Article

Publication status: Published

Journal: Sensors

Year: 2019

Volume: 19

Issue: 5

Online publication date: 08/03/2019

Acceptance date: 04/03/2019

Date deposited: 14/06/2021

ISSN (electronic): 1424-8220

Publisher: MDPI AG


DOI: 10.3390/s19051188

PubMed id: 30857169


Altmetrics provided by Altmetric


Funder referenceFunder name