Pain Levels in Sheep Detected by AI

Yet another exciting boost for animals from artificial intelligence…An AI system is now able to detect pain levels in sheep, which could aid in early diagnosis and treatment of common, but painful, conditions in animals.


AI system to diagnose pain levels in sheep

The researchers have developed an AI system which uses five different facial expressions to recognize whether a sheep is in pain, and estimate the severity of that pain. The results could be used to improve sheep welfare, and could be applied to other types of animals, such as rodents used in animal research, rabbits or horses.

Building on earlier work which teaches computers to recognize emotions and expressions in human faces, the system is able to detect the distinct parts of a sheep’s face and compare it with a standardized measurement tool developed by veterinarians for diagnosing pain…


“The interesting part is that you can see a clear analogy between these actions in the sheep’s faces and similar facial actions in humans when they are in pain — there is a similarity in terms of the muscles in their faces and in our faces.”

–Dr. Marwa Mahmoud, study co-author and postdoctoral researcher


According to the AI system (SPFES), when a sheep is in pain, there are five main things which happen to their faces: their eyes narrow, their cheeks tighten, their ears fold forwards, their lips pull down and back, and their nostrils change from a U shape to a V shape. The SPFES then ranks these characteristics on a scale of one to 10 to measure the severity of the pain…

To train the model, the Cambridge researchers used a small dataset consisting of approximately 500 photographs of sheep, which had been gathered by veterinarians in the course of providing treatment…

Early tests of the model showed that it was able to estimate pain levels with about 80% degree of accuracy, which means that the system is learning. While the results with still photographs have been successful, in order to make the system more robust, they require much larger datasets.

The next plans for the system are to train it to detect and recognize sheep faces from moving images, and to train it to work when the sheep is in profile or not looking directly at the camera. Dr. Robinson, lead researcher,  says that if they are able to train the system well enough, a camera could be positioned at a water trough or other place where sheep congregate, and the system would be able to recognize any sheep which were in pain. The farmer would then be able to retrieve the affected sheep from the field and get it the necessary medical attention.