Abstract
Tracking body parts in behaving animals, extracting fluorescence signals from cells embedded in deforming tissue, and analyzing cell migration patterns during development all require tracking objects with partially correlated motion. As dataset sizes increase, manual tracking of objects becomes prohibitively inefficient and slow, necessitating automated and semi-automated computational tools. Unfortunately, existing methods for multiple object tracking (MOT) are either developed for specific datasets and hence do not generalize well to other datasets, or require large amounts of training data that are not readily available. This is further exacerbated when tracking fluorescent sources in moving and deforming tissues, where the lack of unique features and sparsely populated images create a challenging environment, especially for modern deep learning techniques. By leveraging technology recently developed for spatial transformer networks, we propose ZephIR, an image registration framework for semi-supervised MOT in 2D and 3D videos. ZephIR can generalize to a wide range of biological systems by incorporating adjustable parameters that encode spatial (sparsity, texture, rigidity) and temporal priors of a given data class. We demonstrate the accuracy and versatility of our approach in a variety of applications, including tracking the body parts of a behaving mouse and neurons in the brain of a freely moving C. elegans . We provide an open-source package along with a web-based graphical user interface that allows users to provide small numbers of annotations to interactively improve tracking results.
Introduction
Tracking objects in biological videos—such as individual neurons in a squirming worm or body parts of a behaving mouse—presents a significant challenge for standard computer vision. These objects often lack unique features, appearing as identical fluorescent blobs, while the tissues they are embedded in undergo complex, non-linear deformations.
Existing solutions typically fall into two categories: "detect and link" algorithms, which often suffer from identity swaps and detection errors, and deep learning models like DeepLabCut, which require extensive manual labeling to generalize. ZephIR addresses the need for an efficient tool that requires minimal training data and can handle the "sparse" nature of 3D fluorescent microscopy.
Methods
ZephIR shifts the focus from simple detection to diffeomorphic image registration. Instead of merely finding points, it aligns local image patches (descriptors) between a reference frame and a "child" frame using spatial transformer networks.
The framework utilizes a multi-term loss function to incorporate biological priors:
- Image Registration ($L_R$): Measures the overlap of local image features.
- Spatial Regularization ($L_N$): A "spring network" connecting neighboring keypoints to maintain global tissue structure.
- Feature Detection ($L_D$): A shallow CNN "model selector" that integrates results from other algorithms (e.g., StarDist) to guide tracking toward feature centers.
- Temporal Smoothing ($L_T$): Ensures intensity signals change smoothly over time, consistent with physical expectations for calcium imaging.
To minimize the "distance" the registration algorithm must bridge, ZephIR employs a frame sorting strategy, organizing video frames into "branches" based on similarity or chronology. Additionally, a web-based GUI facilitates "human-in-the-loop" verification, where minimal manual corrections can propagate improvements across the entire dataset.
Results and Discussion
The authors validated ZephIR across several challenging systems, including freely moving C. elegans (tracking 178 neurons in 3D), behaving mice (10 body parts), deforming Hydra (50 neurons), and mitotic CHO nuclei.
Key Insights
- Registration Robustness: By analyzing the "texture" around a point, ZephIR avoids identity-swap issues common in sparse data.
- Priors vs. Big Data: Encoding physical assumptions directly into the loss function reduces the need for massive training sets.
- Efficiency: In mouse posture tracking, ZephIR outperformed DeepLabCut with fewer than 20 reference frames and reduced human labor time by approximately 66%.
- Accuracy: ZephIR matched or exceeded specialized state-of-the-art trackers in C. elegans and Hydra datasets.
Limitations
ZephIR requires at least one fully annotated reference frame to begin (the "cold start" problem). While frame sorting mitigates error propagation, tracking errors can still accumulate. Future work may involve automated object detection for initialization and further streamlining hyperparameter tuning for specific datasets.
Summary updated