Pig Image Analysis
From ADSA-AMPA-ASAS-CSAS-WSASAS Joint Annual Meeting, July 8-12, 2013 in Indianapolis, Indiana
Models for facial recognition and body weight to more precisely provide individual pig care
J. J. McGlone*1, B. Backus1, K. Guay1, J. Ao2, Q. Wan2, B. Nutter2, R. Pal2, S. Mitra2.
1 Laboratory of Animal Behavior, Physiology and Welfare, and 2 Department of Electrical and Computer Engineering, Texas Tech University, Lubbock, TX 79409-2141
The US pig industry markets over 110 million pigs a year. An average worker spends only seconds per pig providing pig care. An automated solution that is able to transmit individual pig information to farm management would improve welfare and management at the individual pig level. Our objectives were 1) to develop software for individual pig recognition, and 2) estimate the body weight of pigs using facial dimensions. After weaning, 21 d old, littermate pigs were housed in 4 pens of 10 pigs. Weekly body weights and pictures were taken of each pig. Specific facial features were captured by image analysis. Among several systems tested, the Eigenface algorithm was used to estimate individual pig identity. Each face image in a training set represents a linear combination of the principal components of the distribution of faces. These principal components are called the eigenvectors (displayed as eigenfaces) which characterize the variation in faces from statistical computation of the covariance matrix of a set of the face images involved. The Eigenface sums the pixels in an image to generate a weighting vector that, with some variation, is unique for that individual. The Eigenface weight vector was calculated for each pig face image and tested to determine if it could reliably identify individuals. If the test image was correctly recognized as the most matched, we called it a ‘direct hit’. Cross-validation reached a 72% level of accuracy for direct hits. In the second objective, the mean distance in pixels between eyes for each pig was used to relate to body weight (pig faces grow in proportion to body weight). Over a range of body weights from birth through 100 kg, an exponential curve (y=71.97*x1/3) described the relationship between the weight of pigs and the distance between the eyes in pixels (r2 = 0.9874); for the narrow weight range of 5 to 42 kg, a linear model (y=2.915*x+129.5) described the relationship between distance between the eyes in pixels and body weight (r2 = 0.9925). These early findings will be key components in an automated monitoring system that will have significant impact on individual pig care.
Key Words:: image analysis, pigs, animal welfare