Skip to main content

Research Repository

Advanced Search

Towards on-farm pig face recognition using convolutional neural networks

Baxter, Emma M.; Salter, Michael G.; Smith, Lyndon N.; Smith, Melvyn L.; Hansen, Mark F.; Hansen, Mark F; Smith, Melvyn; Smith, Lyndon; Salter, Michael; Baxter, Emma; Farish, Marianne; Grieve, Bruce


Emma M. Baxter

Michael G. Salter

Lyndon N. Smith

Melvyn L. Smith

Mark F. Hansen

Mark Hansen
Associate Professor in Knowledge Exchange & External Engagement

Profile Image

Melvyn Smith
Research Centre Director Vision Lab/Prof

Lyndon Smith
Professor in Computer Simulation and Machine

Michael Salter

Emma Baxter

Marianne Farish

Bruce Grieve


© 2018 Elsevier B.V. Identification of individual livestock such as pigs and cows has become a pressing issue in recent years as intensification practices continue to be adopted and precise objective measurements are required (e.g. weight). Current best practice involves the use of RFID tags which are time-consuming for the farmer and distressing for the animal to fit. To overcome this, non-invasive biometrics are proposed by using the face of the animal. We test this in a farm environment, on 10 individual pigs using three techniques adopted from the human face recognition literature: Fisherfaces, the VGG-Face pre-trained face convolutional neural network (CNN) model and our own CNN model that we train using an artificially augmented data set. Our results show that accurate individual pig recognition is possible with accuracy rates of 96.7% on 1553 images. Class Activated Mapping using Grad-CAM is used to show the regions that our network uses to discriminate between pigs.


Baxter, E. M., Salter, M. G., Smith, L. N., Smith, M. L., Hansen, M. F., Hansen, M. F., …Grieve, B. (2018). Towards on-farm pig face recognition using convolutional neural networks. Computers in Industry, 98, 145-152.

Journal Article Type Article
Acceptance Date Feb 14, 2018
Publication Date Jun 1, 2018
Deposit Date Mar 6, 2018
Publicly Available Date Jun 2, 2020
Journal Computers in Industry
Print ISSN 0166-3615
Publisher Elsevier
Peer Reviewed Peer Reviewed
Volume 98
Pages 145-152
Keywords pig face recognition, deep learning, convolutional neural network, biometrics
Public URL
Publisher URL
Additional Information Corporate Creators : AB Agri, SRUC, Manchester University


You might also like

Downloadable Citations