*Article* **Computer Vision for Detection of Body Posture and Behavior of Red Foxes**

**Anne K. Schütz 1,\* , E. Tobias Krause <sup>2</sup> , Mareike Fischer <sup>3</sup> , Thomas Müller <sup>4</sup> , Conrad M. Freuling <sup>5</sup> , Franz J. Conraths <sup>1</sup> , Timo Homeier-Bachmann 1,† and Hartmut H. K. Lentz 1,†**


**Simple Summary:** Monitoring animal behavior provides an indicator of their health and welfare. For this purpose, video surveillance is an important method to get an unbiased insight into behavior, as animals often show different behavior in the presence of humans. However, manual analysis of video data is costly and time-consuming. For this reason, we present a method for automated analysis using computer vision—a method for teaching the computer to see like a human. In this study, we use computer vision to detect red foxes and their body posture (lying, sitting, or standing). With this data we are able to monitor the animals, determine their activity, and identify their behavior.

**Abstract:** The behavior of animals is related to their health and welfare status. The latter plays a particular role in animal experiments, where continuous monitoring is essential for animal welfare. In this study, we focus on red foxes in an experimental setting and study their behavior. Although animal behavior is a complex concept, it can be described as a combination of body posture and activity. To measure body posture and activity, video monitoring can be used as a non-invasive and cost-efficient tool. While it is possible to analyze the video data resulting from the experiment manually, this method is time consuming and costly. We therefore use computer vision to detect and track the animals over several days. The detector is based on a neural network architecture. It is trained to detect red foxes and their body postures, i.e., 'lying', 'sitting', and 'standing'. The trained algorithm has a mean average precision of 99.91%. The combination of activity and posture results in nearly continuous monitoring of animal behavior. Furthermore, the detector is suitable for real-time evaluation. In conclusion, evaluating the behavior of foxes in an experimental setting using computer vision is a powerful tool for cost-efficient real-time monitoring.

**Keywords:** YOLOv4; computer vision; animal monitoring; animal behavior; animal activity; animal welfare; body posture
