Deep learning for automating pig tail scoring
The animal article of the month for May is ‘Tailception’: using neural networks for assessing tail lesions on pictures of pig carcasses’
Injuries caused by one pig biting the tail of another pig are a big welfare problem in pigs reared for slaughter. Preventing this behaviour costs time and money which current pig prices do not necessarily cover. Pigs reaching slaughter without tail injuries could be rewarded with premium payments. To make sure payments are distributed correctly, a very large number of pigs needs to be looked at. This could be done at the slaughterhouse, but even there human observers will become tired after some time. Automated assessment circumvents the problem of tiredness and night shifts. We showed that neural networks could be used to automatically score the degree of injury of a pig’s tail. For this we trained neural networks to classify pictures of pig carcasses on a slaughter line.
The tails were scored as to whether they were injured (4-point scale from 0 = no injury, to 3 = severe injury) and whether the complete tail had been lost (yes / no). Three human observers trained with each other and reached 80 % agreement (= identical scores on 80 % of pictures) for the injury scores and 94 % agreement for tail loss. Scoring the degree of injury can be hard because injuries may look very differently, for example one small deep injury vs. a larger but shallower injury).
The three humans scored the tail pictures of 13 124 pigs. Eighty percent of those pictures were used for training and 20 % for validating our neural networks. The neural networks were a part detection network which found the tail in the picture, and a classification network which scored the degree of tail injury. The neural networks agreed with the humans in 74 % of pictures on the degree of tail injury and in 95 % of pictures on tail loss. In short, the neural networks agreed with the humans at the same level as the humans with each other.
We hope our results will motivate others facing similar tasks to try out neural networks. In a next study we would like to score injuries on a continuous line from “no injury” to “very severe injury” instead of on a point scale. This would avoid the “is this still a 1 or already a 2”-issue which the humans often faced. Improved human agreement would mean better training material for the networks and thus even better network results. In the long run, this will hopefully help rewarding tails without blemish and thus good pig practices.
This article is freely available for one month: ‘Tailception’: using neural networks for assessing tail lesions on pictures of pig carcasses’
Author: J. Brünger, S. Dippel, R. Koch and C. Veit
The animal Article of the Month is selected by the Editor-in-Chief and is freely available for one month. View the recent selections