Monitoring the welfare of sows in groups: freeze frame

French researchers are testing an image analysis system that can automatically recognise the nature of interactions between animals, whether positive or negative. This system has been tested on groups of sows, with the aim of better ensuring the welfare of each individual within the group.

Published on 03 December 2025

© INRAE

Since 2013, it has been mandatory to raise pregnant sows in groups rather than isolated in cages. This measure aims to improve their comfort and encourage them to express their natural behaviour: they can move around, explore and interact with their fellow pigs. However, this cohabitation is not always peaceful. Sows establish a social hierarchy, sometimes through snorting or biting, which may require the farmer to intervene and take corrective measures.

However, constantly monitoring these interactions to detect problems requires time, staff and an expert eye. The solution tested by the researchers involves the use of video and image analysis: software would automatically analyse the filmed images to identify social behaviour in a non-intrusive and continuous manner over time.

Smile, you're on camera!

The project team, comprising INRAE, IFIP, INRIA and Dilepix, filmed two pens containing 19 and 20 pregnant sows day and night in rooms equipped with cameras.

Image analysis software was used to characterise the posture of each animal (lying down, sitting, standing), as well as the position of three key points on the body: the snout, neck and tail.

The analyses focused on stages 30 and 103 days of two consecutive pregnancies, when activity was at its peak, i.e. between midnight and 2 a.m. (the daily ration was made available at midnight). The images were analysed manually using the annotation system of the software currently under development.

A total of 360 situations were described from the images: i/ 120 corresponding to moments of positive interaction and 120 to moments of negative interaction, including images before, during and after the interaction between two individuals; ii/ 120 moments without interaction (two sows without contact). The valence of the interaction (positive or negative), as well as the posture and coordinates of the three key points of each sow, were identified. By tracking the position and movements of these key points in the images, the researchers were able to calculate the values of three variables : the relative distances between the sows, their speeds of movement and the individual distances travelled.

Decision trees were used to assess the relevance of these variables in detecting interaction.

When two points of interest belonging to two sows rapidly move closer together, an interaction begins; when they move apart, it ends. If both sows are standing, with one moving quickly towards the other, this may indicate a negative interaction (aggression). If they sniff each other calmly, it is a positive interaction.

Based on this data, researchers taught the software (machine learning) not only to automatically detect the occurrence of an interaction, but also to identify:

•          positive (e.g. when two sows touch snouts) or negative (e.g. head butting or biting),

•          the orientation of the interaction (snout-snout, snout-neck or snout-tail contact).

Promising results

The algorithms thus ‘trained’ were able to detect the beginning and end of an interaction with 88% accuracy and differentiate between positive and negative interactions in 80% of cases.

  • Negative interactions are characterised by faster movements, with one sow appearing to flee or chase the other.
  • Positive interactions, on the other hand, take place in a calmer context, often between familiar animals.

The orientation of contact, which is useful for identifying problematic behaviours, was also recognised. Snout-to-tail orientation is typical of negative interactions, such as tail or vulva biting, which is a sign of stress or overcrowding. This snout-to-tail detection was particularly effective, with a 94% success rate.

One step closer to precision farming

This project shows that it is possible to automatically monitor social relationships within a group of sows using image analysis. Ultimately, such a tool could alert farmers to abnormal behaviour, such as an increase in aggression, before injuries or stress occur.

The aim is not to replace the farmer's eye, but to help them better understand what the animals are ‘expressing’ through their behaviour. By making details invisible to the naked eye visible, the technology offers a new perspective on animal welfare: a step towards livestock farming characterised by greater attention, responsiveness and respect for animal welfare.

References:  Blanc, A.; Poissonnet, A.; Thomas, J.; Courboulay, V.; Simon, M.; Gaillard, C., 2025. Toward the automatic detection of social interactions in gestating sows using image analysis data. Journal of Animal Science, 103: 14 - https://doi.org/10.1093/jas/skaf249

 

Contacts

Charlotte Gaillard

Scientific contact

Physiology, Environment, and Genetics for the Animal and Livestock Systems (PEGASE)

Centre

Division

Learn more

Agroecology

Barriers and drivers of farmers to provide outdoor access in pig farming systems: a qualitative study

Based on qualitative interviews with pig farmers, this study provides an understanding of the motivations and obstacles to providing animals with access to the outdoors. It will also help to identify the levers likely to remove these obstacles, encourage farmers to sign up and facilitate the transition to a greater number of pig farming systems incorporating outdoor access for the animals.

20 November 2024

Agroecology

Research in pigs shows gut microbiota is partially heritable

PRESS RELEASE - Comprising billions of microorganisms, the gut microbiota progressively matures after birth in humans and other animals. While environmental factors, and especially diet, are known to have a major influence on microbiota development and composition, the role of genetics remains a topic of debate. In a groundbreaking study recently published in Microbiome, INRAE researchers used pigs to experimentally demonstrate that gut microbiota composition is partly heritable.

02 July 2024