MonkeyTrail: A scalable video-based method for tracking macaque movement trajectory in daily living cages

Zool Res. 2022 May 18;43(3):343-351. doi: 10.24272/j.issn.2095-8137.2021.353.

Abstract

Behavioral analysis of macaques provides important experimental evidence in the field of neuroscience. In recent years, video-based automatic animal behavior analysis has received widespread attention. However, methods capable of extracting and analyzing daily movement trajectories of macaques in their daily living cages remain underdeveloped, with previous approaches usually requiring specific environments to reduce interference from occlusion or environmental change. Here, we introduce a novel method, called MonkeyTrail, which satisfies the above requirements by frequently generating virtual empty backgrounds and using background subtraction to accurately obtain the foreground of moving animals. The empty background is generated by combining the frame difference method (FDM) and deep learning-based model (YOLOv5). The entire setup can be operated with low-cost hardware and can be applied to the daily living environments of individually caged macaques. To test MonkeyTrail performance, we labeled a dataset containing >8 000 video frames with the bounding boxes of macaques under various conditions as ground-truth. Results showed that the tracking accuracy and stability of MonkeyTrail exceeded that of two deep learning-based methods (YOLOv5 and Single-Shot MultiBox Detector), traditional frame difference method, and naïve background subtraction method. Using MonkeyTrail to analyze long-term surveillance video recordings, we successfully assessed changes in animal behavior in terms of movement amount and spatial preference. Thus, these findings demonstrate that MonkeyTrail enables low-cost, large-scale daily behavioral analysis of macaques.

猕猴的行为分析能为神经科学研究提供重要的实验证据。近年来,自动化的动物行为视频分析受到了广泛的关注。然而,这些方法大多需要特定的实验环境以减少物体遮挡或环境变化带来的干扰,目前还缺乏能够规模化用于日常饲养条件下猕猴运动轨迹跟踪的有效手段。在该研究中,我们提出了一种新的方法(MonkeyTrail)用于实现这一目的。其关键原理是通过频繁生成的虚拟空背景,结合背景减除法准确获得包含运动中动物的前景图像。空背景生成利用了帧差法(FDM)和基于深度学习的视觉目标检测模型(YOLOv5)。整个装置由低成本的硬件构成,并可以在单笼饲养猕猴的日常环境中有效工作。为了测试这一方法的性能,我们标定了>8000帧的视频图像作为验证数据集,其中包含各种条件下的猕猴边界框数据。测试结果表明,在相同条件下,MonkeyTrail的跟踪精度和稳定性均超过了传统帧差法、背景减除法和两种基于深度学习的方法(YOLOv5和SSD)。通过对长期监控视频的分析,MonkeyTrail成功地检测到了猕猴在运动量和空间偏好方面的变化。这些结果表明,该方法可以用于实现低成本、较大规模的猕猴日常行为分析。.

Keywords: Background subtraction; Movement trajectory tracking; Occlusion; Video-based behavioral analyses; Virtual empty background.

MeSH terms

  • Algorithms*
  • Animals
  • Behavior, Animal
  • Macaca*
  • Movement
  • Video Recording / methods

Grants and funding

This work was supported by the National Key Research and Development Program of China (2017YFA0105203, 2017YFA0105201), National Science Foundation of China (31771076, 81925011), Strategic Priority Research Program of the Chinese Academy of Sciences (CAS) (XDB32040201), Beijing Academy of Artificial Intelligence, and Key-Area Research and Development Program of Guangdong Province (2019B030335001)