# Detecting ear lesions in slaughtered pigs through open-source convolutional neural networks

**Authors:** Matteo D’Angelo, Domenico Sciota, Anastasia Romano, Alfonso Rosamilia, Chiara Guarnieri, Chiara Cecchini, Alberto Olivastri, Giuseppe Marruchella

PMC · DOI: 10.1186/s40813-025-00442-9 · Porcine Health Management · 2025-05-23

## TL;DR

This paper explores using open-source AI to detect ear lesions in slaughtered pigs, aiming to improve animal welfare monitoring in abattoirs.

## Contribution

The study demonstrates that open-source convolutional neural networks can effectively detect ear lesions in pigs with high accuracy.

## Key findings

- Convolutional neural networks achieved an overall accuracy of 0.89 in detecting ear lesions.
- High inter-observer agreement (Cohen’s kappa > 0.88) was found among veterinarians assessing the lesions.
- AI tools showed promise for cost-effective welfare monitoring in high-throughput abattoirs.

## Abstract

Ear biting is a damaging behavior of pigs, likely triggered by a genetic predisposition, previous health issues and/or poor environmental conditions. The accurate assessment of animal health and welfare relies on the systematic gathering of data about animals, resources and management. In this respect, slaughterhouse surveys offer valuable insights, as distinct tail and skin lesions can act as ‘iceberg’ parameters, suitable to estimate welfare during the entire animals’ lifecycle. However, the routine recording of lesions is often costly and time-consuming, making it unfeasible in high-throughput abattoirs. This study aims to train open-source convolutional neural networks for detecting ear biting lesions in slaughtered pigs, as a pre-requisite for a systematic and cost-effective welfare monitoring.

A total of 3,140 pictures were employed to train and test open-source convolutional neural networks. Investigations were carried out by three veterinarians, who agreed to assess porcine ears using a simplified method, to minimize inter-observers’ variability and to facilitate the convolutional neural networks’ training: a) healthy auricles (label 0); deformed auricles displaying alterations in their contour due to real lesions (label 1); postmortem artefacts due to slaughtering (label 2). The entire dataset (training set and test set) was evaluated by one observer, while a supplementary set of 150 pictures was assessed by all veterinarians. Overall, the agreement among observers was very high (Cohen’s kappa coefficient > 0.88). Moreover, convolutional neural networks’ performances appeared suitable when compared with veterinarians: overall accuracy 0.89, specificity 0.96, sensitivity 0.86, agreement with each individual observer 0.79 (Cohen’s kappa coefficient).

Open-source convolutional neural networks can achieve good performances, especially when the task is strictly defined and rather easy. Valuable experiences are being gathered about the routine application of artificial intelligence-powered tools in pig abattoirs. We consider that such tools will likely enable the systematic collection of data, addressing the distinct needs of stakeholders in a cost-effective manner.

## Linked entities

- **Species:** Sus scrofa (taxon 9823)

## Full-text entities

- **Diseases:** skin lesions (MESH:D012871), Ear biting (MESH:D004427)
- **Species:** Sus scrofa (pig, species) [taxon 9823]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12102859/full.md

## Figures

5 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12102859/full.md

## References

4 references — full list in the complete paper: https://tomesphere.com/paper/PMC12102859/full.md

---
Source: https://tomesphere.com/paper/PMC12102859