NAPS: Integrating pose estimation and tag-based tracking

Significant advances in computational ethology have allowed the quantification of behavior in unprecedented detail. Tracking animals in social groups, however, remains challenging as most existing methods can either capture pose or robustly retain individual identity over time but not both. To capture finely resolved behaviors while maintaining individual identity, we built NAPS (NAPS is ArUco Plus SLEAP), a hybrid tracking framework that combines state-of-the-art, deep learning-based methods for pose estimation (SLEAP) with unique markers for identity persistence (ArUco). We show that this framework allows the exploration of the social dynamics of the common eastern bumblebee (Bombus impatiens). We provide a stand-alone Python package for implementing this framework along with detailed documentation to allow for easy utilization and expansion. We show that NAPS can scale to long timescale experiments at a high frame rate and that it enables the investigation of detailed behavioral variation within individuals in a group. Expanding the toolkit for capturing the constituent behaviors of social groups is essential for understanding the structure and dynamics of social networks. NAPS provides a key tool for capturing these behaviors and can provide critical data for understanding how individual variation influences collective dynamics.