Deep Graph Pose: a semi-supervised deep graphical model for improved animal pose tracking

Anqi Wu, Estefany Kelly Buchanan, Matthew Whiteway, Michael Schartner, Guido Meijer, Jean-Paul Noel, Erica Rodriguez, Claire Everett, Amy Norovich, Evan Schaffer, Neeli Mishra, C. Daniel Salzman, Dora Angelaki, Andrés Bendesky, International Brain Laboratory, John P. Cunningham, Liam Paninski

TL;DR

This paper introduces Deep Graph Pose (DGP), a novel semi-supervised graphical model that significantly improves animal pose tracking by leveraging both spatial and temporal constraints within video data. By effectively utilizing unlabeled frames alongside labeled ones, DGP achieves more accurate and robust tracking with fewer manual labels, leading to better downstream analyses of animal behavior.

What Problem Does This Paper Address?

Accurately tracking animal pose in videos is fundamental for many scientific disciplines, from ethology to neuroscience. While deep learning methods like DeepLabCut (DLC) have made great strides, they typically require a substantial number of manually labeled frames to achieve high precision and reliability. This labeling process is time-consuming and labor-intensive, especially for complex behaviors or when tracking many body parts. Furthermore, existing methods often treat each frame independently, failing to exploit the inherent structure within animal movement, such as physical constraints between body parts (e.g., paw-to-elbow distance) and the smooth progression of motion across consecutive frames. This can lead to occasional tracking "glitches" that hinder downstream analysis.

Methods

The core of Deep Graph Pose (DGP) is a probabilistic graphical model built upon deep neural networks. DGP integrates two key types of constraints:

  • Spatial Constraints: These capture physical relationships between different body parts. For instance, the distance between a paw and an elbow marker is modeled using a quadratic potential.
  • Temporal Constraints: These enforce smoothness in movement across consecutive frames, also modeled with quadratic potentials that penalize large changes in marker positions between frames.

DGP uses a deep neural network ($\phi_n$) to extract image features, which are then incorporated into the graphical model. Crucially, DGP is semi-supervised. It leverages both labeled frames (where the ground truth pose is known) and unlabeled frames. For unlabeled frames, the model uses an efficient structured variational inference approach to approximate the posterior distribution of the hidden pose variables. This allows the model to learn from the structure of the data even without explicit labels, effectively regularizing the pose estimation and reducing the reliance on extensive manual annotation.

Datasets

The paper evaluates DGP on several datasets, including:

  • Mouse-wheel [30]: Used for detailed quantitative comparisons and visualizations.
  • Mouse-reach [31]
  • Fly-run [32]
  • Twomice-top-down (unpublished)
  • Fish-swim [33]

These datasets cover a variety of species, poses, and environments, demonstrating the generalizability of DGP. The paper does not introduce new benchmark datasets but rather applies DGP to existing ones to showcase its performance improvements.

Key Insights and Ideas

  • Leveraging Spatiotemporal Structure: The most significant insight is that explicitly modeling the physical and temporal constraints of animal movement, in addition to image features, dramatically improves tracking accuracy and robustness. This is a departure from many purely data-driven deep learning approaches.
  • Semi-Supervised Learning for Pose Estimation: DGP demonstrates that semi-supervised learning, by effectively utilizing unlabeled data, can significantly reduce the need for manual labeling in animal pose estimation, a major bottleneck in the field.
  • Unimodality of Confidence Maps: DGP's confidence maps (visualizations of where the model "believes" a marker is located) tend to be more unimodal than those from methods like DLC. This suggests a more focused and less ambiguous prediction, which is beneficial for downstream tasks.
  • Disentangled Representations: When used in conjunction with conditional autoencoders (CAEs), DGP markers lead to more interpretable and "disentangled" latent representations of animal behavior, allowing for better scientific insight.

Key Results

  • Improved Accuracy: DGP consistently outperformed DeepLabCut (DLC) across various datasets and training set sizes. For example, in Figure 3, DGP shows significantly lower RMSE (Root Mean Squared Error) compared to DLC, especially with fewer labeled frames.
  • Reduced Glitches: DGP significantly reduces the occurrence of tracking "glitches" (frames where tracking is lost or highly inaccurate), which are prevalent in DLC outputs. This is visually demonstrated in Figure 2 and discussed in the text.
  • Fewer Labels Needed: The semi-supervised nature of DGP allows it to achieve high performance with substantially fewer labeled training frames compared to fully supervised methods like DLC.
  • Enhanced Downstream Performance:
    • Unsupervised Temporal Segmentation: DGP's accurate traces enable robust segmentation of animal behavior into interpretable states (e.g., "resting" vs. "moving") using unsupervised methods like ARHMMs, whereas DLC traces lead to unreliable segmentation due to glitches (Figure 4A).
  • Interpretable Representations: Conditioning CAEs on DGP markers results in better reconstruction performance and more disentangled latent representations compared to using DLC markers (Figure 4B and Figure 5).

Limitations and Future Work

  • Computational Cost: While an efficient structured variational approach is used, the inference can still be computationally intensive, especially for long videos.
  • Online Inference: The current implementation is not optimized for real-time, online inference, which is desirable for live experiments.
  • 3D Pose Estimation: The current work focuses on 2D pose estimation. Extending the method to 3D by fusing information from multiple cameras is a promising future direction.
  • Architecture Exploration: The authors plan to experiment with other deep learning architectures for the image potential $\phi_n$, similar to those used in other state-of-the-art methods.
  • User Interface: Integrating the model into existing toolboxes and GUIs would facilitate wider user adoption.

Summary updated

BibTeX
@inproceedings{wu2020deep,
  author = {Anqi Wu and Estefany Kelly Buchanan and Matthew Whiteway and Michael Schartner and Guido Meijer and Jean-Paul Noel and Erica Rodriguez and Claire Everett and Amy Norovich and Evan Schaffer and Neeli Mishra and C. Daniel Salzman and Dora Angelaki and Andrés Bendesky and International Brain Laboratory and John P. Cunningham and Liam Paninski},
  title = {{Deep Graph Pose: a semi-supervised deep graphical model for improved animal pose tracking}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
  url = {https://openreview.net/forum?id=jlpj2vZVi2},
}
Figure