PriMAT: A robust multi-animal tracking model for primates in the wild

Richard Vogg, Matthias Nuske, Marissa A. Weis, Timo Lüddecke, Elif Karakoç, Zurna Ahmed, Sofia Cardoso Pereira, Suchinda Malaivijitnond, Suthirote Meesawat, Florentin Wörgötter, Peter M. Kappeler, Alexander Gail, Julia Ostner, Oliver Schülke, Claudia Fichtel, Alexander S. EckerbioRxiv 2024

TL;DR

Researchers have developed PriMAT, a novel deep learning model for tracking multiple primates in their natural habitats. Unlike existing methods that rely on complex keypoint annotations, PriMAT uses simpler bounding boxes, significantly reducing annotation time and improving robustness in challenging wild environments. This makes it a powerful new tool for studying animal behavior in the wild.

What Problem Does This Paper Address?

Studying animal behavior in the wild is crucial, but analyzing video data is a major bottleneck. Current state-of-the-art methods often use deep learning to track animals by identifying specific "keypoints" (like joints or facial features). While these methods work well in controlled lab settings with consistent lighting and backgrounds, they struggle in the wild due to:

  • High variability: Wild environments have constantly changing backgrounds, lighting, and weather.
  • Complex motion: Animals move unpredictably, including fast jumps and occlusions (when one animal hides another).
  • Annotation burden: Labeling keypoints for multiple animals across many video frames is extremely time-consuming and labor-intensive.

This gap limits our ability to conduct large-scale, automated behavioral studies in natural settings.

Methods

PriMAT is built upon the FairMOT architecture, a successful model for tracking pedestrians. However, it introduces several key adaptations for primate tracking in the wild:

  • Bounding Box Detection: Instead of relying on precise keypoint annotations, PriMAT uses bounding boxes. This simplifies data annotation significantly, requiring less time and expertise.
  • One-Stage Model: It's a single, unified model that handles both detection and tracking, making it conceptually simpler and more efficient.
  • Multi-Class Tracking: PriMAT can be trained to detect not only primates but also other objects of interest, such as feeding boxes, enabling the study of interactions.
  • Classification Branch: An additional branch is added to the model for individual identification, allowing researchers to distinguish between different animals within a group.
  • Adaptations for Primate Behavior: The model incorporates specific adjustments to handle challenges like non-standard poses, occlusion, and fast, non-linear motion (e.g., jumps) common in primate behavior. This includes a modified association logic that considers the last known position of an animal if its predicted position is uncertain.

Datasets

The paper utilizes several datasets for training and evaluation:

  • MacaquePose: A dataset of macaque images with instance segmentation masks and keypoints, used for pre-training.
  • ImageNet: A large-scale dataset used for general image pre-training.
  • MacaqueCopyPaste & MacaqueCopyPasteWild: Custom datasets created by copying macaque instances from MacaquePose and pasting them onto ImageNet backgrounds or real forest backgrounds from Thailand. These were used to improve generalization.
  • Assamese Macaque Videos: Collected from the Phu Khieo Wildlife Sanctuary in Thailand, these videos present challenging conditions (dense forest, variable lighting, occlusion).
  • Redfronted Lemur Videos: Collected from Kirindy Forest, Madagascar, these videos feature social learning experiments with feeding boxes, also presenting challenges like variable camera angles and lighting.
  • Individual Identification Data: Manually selected images of individual lemurs with collars, annotated with bounding boxes and identities.

Key Insights and Ideas

  • Bounding Boxes are Sufficient (and Better) for Wild Tracking: The core insight is that for many wild animal tracking tasks, precise keypoint localization is overkill and introduces significant annotation overhead. Bounding boxes offer a more practical and robust starting point, especially when combined with intelligent tracking logic.
  • Data Augmentation is Crucial for Generalization: Creating synthetic datasets like MacaqueCopyPaste and MacaqueCopyPasteWild proved vital for improving the model's ability to generalize to new environments and backgrounds, outperforming models trained solely on domain-specific datasets.
  • Individual Identification is Feasible with Limited Data: The addition of a classification branch demonstrates that even with a few hundred annotated images, individual identification of primates is achievable, opening doors for more detailed social behavior studies.
  • Primate-Specific Challenges Require Tailored Solutions: The paper highlights that simply applying pedestrian tracking models to primates is insufficient. Specific adaptations for motion, occlusion, and appearance are necessary for robust performance.

Key Results

  • Robust Tracking in the Wild: PriMAT successfully detected and tracked individual macaques and lemurs in challenging wild environments with high background variability and complex motion.
  • Reduced Annotation Time: The use of bounding boxes significantly reduced annotation time compared to keypoint-based methods. For example, annotating 500 frames with bounding boxes took 3-5 hours, while annotating the same number of frames with keypoints took around 12 hours.
  • Competitive Performance: PriMAT achieved competitive tracking performance, with HOTA scores comparable to or exceeding other methods on validation videos.
  • Individual Identification Accuracy: The model achieved an accuracy of 83% for individual lemur identification using a dedicated classification branch.
  • Outperforming Keypoint Methods: In a direct comparison, PriMAT outperformed DeepLabCut (a popular keypoint-based method) on validation videos, even when DeepLabCut was given a favorable evaluation metric.

Limitations and Future Work

  • Annotation Effort Still Exists: While reduced, bounding box annotation is still required. The paper notes that for identification, more data would be beneficial.
  • Shared Backbone for Tracking and Identification: The attempt to combine tracking and identification into a single head on a shared backbone yielded poor results with the limited data used. The authors suggest this might be due to competing tasks or insufficient data, and that a separate branch is currently more effective.
  • Future Work: The authors envision extending PriMAT to incorporate other tasks like instance segmentation and interaction classification between objects. They also suggest that with more annotated data, a unified model with a shared backbone for multiple tasks might become feasible.

Summary updated

BibTeX
@misc{vogg2024primat,
  author = {Richard Vogg and Matthias Nuske and Marissa A. Weis and Timo Lüddecke and Elif Karakoç and Zurna Ahmed and Sofia Cardoso Pereira and Suchinda Malaivijitnond and Suthirote Meesawat and Florentin Wörgötter and Peter M. Kappeler and Alexander Gail and Julia Ostner and Oliver Schülke and Claudia Fichtel and Alexander S. Ecker and Claudia Fichtel and Alexander S. Ecker},
  title = {{PriMAT: A robust multi-animal tracking model for primates in the wild}},
  year = {2024},
  doi = {10.1101/2024.08.21.607881},
  howpublished = {bioRxiv},
}
Figure