Automatic detection of pain in horses using machine learning

Principal investigator: Franziska Hakansson,

Project participants: Postdoc Franziska Hakansson, who has a background in ethology, welfare, and machine learning. Associate professor Dan Børge Jensen, who has a background in the application of machine learning and deep learning for automatic sensor- and video-based monitoring of livestock.

Purpose: The aim of this project is to develop a machine learning based tool that can recognize pain in horses from video data, with the long-term goal of improving the welfare of horses through a tool for early and automatic recognition of pain.

We will create machine learning models employing artificial intelligence to automatically recognize alterations in horses’ facial expression, indicative of pain ("pain face"), within short video sequences. This pilot study will utilize an existing dataset from Danish hobby horses consisting of 22 facial videos portraying 11 different horses in their individual stable environments, exhibiting both pain and non-pain facial expressions.

Various models and strategies for automatic recognition of pain faces will be developed and assessed using this dataset. Additionally, through data augmentation, we aim to create models applicable to highly diverse data encompassing varying image quality, lighting conditions, backgrounds, and horse breeds/colors.

The results are expected to be finalized by summer 2025 and will be made openly accessible for use by horse owners, veterinarians, and other stakeholders.

Funding: The project has received support from the Horse Levy Fund.