Department of Psychology, University of Michigan, Ann Arbor, MI, 48109-1043, USA.
Electrical Engineering and Computer Science Department, University of Michigan, Ann Arbor, MI, 48109-2121, USA.
Sci Rep. 2024 Sep 12;14(1):21366. doi: 10.1038/s41598-024-72367-2.
Accurate detection and tracking of animals across diverse environments are crucial for studying brain and behavior. Recently, computer vision techniques have become essential for high-throughput behavioral studies; however, localizing animals in complex conditions remains challenging due to intra-class visual variability and environmental diversity. These challenges hinder studies in naturalistic settings, such as when animals are partially concealed within nests. Moreover, current tools are laborious and time-consuming, requiring extensive, setup-specific annotation and training procedures. To address these challenges, we introduce the 'Detect-Any-Mouse-Model' (DAMM), an object detector for localizing mice in complex environments with minimal training. Our approach involved collecting and annotating a diverse dataset of single- and multi-housed mice in complex setups. We trained a Mask R-CNN, a popular object detector in animal studies, to perform instance segmentation and validated DAMM's performance on a collection of downstream datasets using zero-shot and few-shot inference. DAMM excels in zero-shot inference, detecting mice and even rats, in entirely unseen scenarios and further improves with minimal training. Using the SORT algorithm, we demonstrate robust tracking, competitive with keypoint-estimation-based methods. Notably, to advance and simplify behavioral studies, we release our code, model weights, and data, along with a user-friendly Python API and a Google Colab implementation.
准确地在不同环境下检测和跟踪动物对于研究大脑和行为至关重要。最近,计算机视觉技术已经成为高通量行为研究的必要手段;然而,由于类内视觉可变性和环境多样性,在复杂条件下定位动物仍然具有挑战性。这些挑战阻碍了自然环境下的研究,例如当动物部分藏在巢穴中时。此外,当前的工具既繁琐又耗时,需要进行广泛的、特定于设置的注释和训练过程。为了解决这些挑战,我们引入了“Detect-Any-Mouse-Model”(DAMM),这是一种在复杂环境中定位老鼠的目标检测器,只需最少的训练。我们的方法包括收集和注释在复杂设置中单人和多人饲养的老鼠的多样化数据集。我们训练了一个 Mask R-CNN,这是动物研究中流行的目标检测器,用于执行实例分割,并使用零样本和少样本推断在一系列下游数据集上验证 DAMM 的性能。DAMM 在零样本推断中表现出色,即使在完全未知的场景中也能检测到老鼠,甚至是老鼠,并且通过最少的训练进一步提高。我们使用 SORT 算法展示了稳健的跟踪,与基于关键点估计的方法具有竞争力。值得注意的是,为了推进和简化行为研究,我们发布了我们的代码、模型权重和数据,以及一个用户友好的 Python API 和 Google Colab 实现。