You are here

Tail biting in pigs: developing a machine vision early warning system for farmers

What to do when tail biting occurs?

Tail biting affects growing pigs in Scotland and around the world and has no simple solution. It begins in a sudden and unpredictable way, then spreads through a group. It can lead to losses at the abattoir due to carcass condemnation, estimated at around 1% of pigs.

We are using 3D cameras and machine vision software to automatically detect an early warning sign of tail biting: pigs holding their tails low. Together with agriculture-technology and pig supply chain companies, we are working on commercial farms to develop and test an early warning system for farmers so they can respond more quickly to tail biting.

Our research is working to reduce tail biting risk, and to test methods to stop outbreaks. We aim to reducing tail biting and enhance pig welfare and production efficiency.


Work in Progress


Key risk factors for tail biting include a lack of enrichment material for pigs to root and chew on, and limited space and feeder access, but there are many others.

Tail docking of piglets can reduce risk, but in the EU this painful mutilation is only permitted as a last resort, and farmers are under growing pressure to manage tail biting without docking.

Regardless of the farm type or risk factors, the timing of tail biting on any given farm is unpredictable, and our idea is to reduce this unpredictability by providing a reliable early warning system for tail biting that can be used on commercial farms.


A review of existing science found that an increase in pigs holding their tails low was the most reliable and specific early warning sign for tail biting, and our research then confirmed this. We think that when tail biting begins, bitten pigs hold their tails low because they are painful, or to make them less accessible to biters.

Therefore we ran our proof of concept project (3D Tails) on a single ‘high risk’ farm with undocked pigs. Agri-Tech company Innovent Technology Ltd use machine vision 3D cameras for weighing pigs, and they developed a system to measure tail posture. On-farm testing proved their system to be 75% accurate compared to human visual assessment of tail posture. The proportion of low tails detected increased in the days before a tail biting outbreak, and there were more low tails in an outbreak compared to non-outbreak pens.

In a follow-up project (TailTech), we wanted to test whether the concept would still work under diverse industry conditions e.g. docked and undocked tails, small or large groups, slatted or strawed systems.

Working with pig supply chain partners, 3D cameras are now in place on 8 commercial farms, and we are routinely visiting to score tail injury and health. This research is helping us to develop a prototype early warning system for tail biting based on tail posture.

Farmers are also concerned about how to manage tail biting risk. We have shown that tail biting prevention is possible when undocked pigs are given access to diverse, and regularly replenished enrichment materials presented in different ways such as racks of grass, hay or straw; ropes, wood, plastic or rubber objects.

Our experience and research with managing tail biting outbreaks show that adding enrichment, but also treating or removing injured pigs, and removing biters; or a combination of these can be effective in stopping most tail biting outbreaks. The sooner an outbreak is detected, and action is taken, the more effective the intervention.


Tail biting is a welfare and economic challenge for the pig industry. Growing pigs bite each other’s tails causing painful injuries which can become infected, resulting in ill health and carcass losses, conservatively estimated at around 1% of pigs. There is growing pressure on farmers to reduce the use of tail docking as a measure to reduce tail biting risk, and to find other solutions.

Our work shows that early detection of tail biting can lead to more effective intervention before tail injuries worsen and spread. This can be done using technology, but also by encouraging farmers to look more closely at pigs and their tails, looking for low tail posture, and for minor tail injuries.

Project Partners


Scottish Government


Innovate UK


Commercial partners:

Innovent Technology Ltd

Scottish Pig Producers



Garth Pig Practice

JSR Genetics

Sainsbury’s supermarkets


Academic collaboration:

Dr Dale Sandercock (SRUC)

AgriEPI Centre


SEGES Danish Pig Research Centre

University of Copenhagen

Related Links

Research Papers