v0.3.1.0: Automated annotation with CoTracker
napari-deeplabcut v0.3.1.0
What's New
Automated annotation with point tracking
We're happy to introduce automated annotation with point tracking to help accelerate DeepLabCut annotation workflows in napari.
With the new Tracking Controls widget, you can now:
- Manually annotate keypoints on a reference frame
- Use a point tracking model to propagate those keypoints forward and/or backward in time
- Review, refine, delete, and merge tracked results before exporting them back into DeepLabCut
We currently support CoTracker3, please let us know if you would like to see more models added.
In more details:
- New Tracking Controls widget in napari
- Support for forward, backward, and bidirectional tracking
- Tracking results are created as separate Points layers, leaving the original annotation layer unchanged
- New refinement workflow for:
- Deleting selected tracked points in future frames
- Merging tracked results into annotation layers
- Merge modes include:
- Fill missing only
- Overwrite existing target points
- Extensible point tracking model registry for future additions
Tracking is intended to accelerate annotation and does not replace manual review. The current workflow is still new, we welcome all feedback, improvement suggestions and feature requests.
Bug Fixes
Trajectory plotting robustness and tracking-layer support
Refactored trajectory plotting to use a more explicit internal render state and fixed issues affecting tracking layers.
Trajectory plot boundary handling
Fixed an issue where the trajectory plot window would compress to half the window size near the start or end of a video. The slider value is now more faithful to what is shown.
Config placeholder layer handling
Refactored and clarified the logic for handling config placeholder keypoint layers.
Changes include:
- Improved user prompts when new keypoints are detected in a config file
- Clearer choices for resolving placeholder layers:
- Apply to current
- Keep both
- Cancel
- Fixed a segfault caused by premature layer deletion (see below)
Premature layer removal fix
Fixed a bug caused by placeholder layers being removed too early.
Color scheme legend text synchronization
Fixed an issue where legend color boxes updated when changing colormaps, but legend text did not.
This caused:
- Mismatch between legend text and color boxes
- Incorrect colors for newly added bodyparts
- Incorrect reset behavior after hover/unhover
Legend rendering is now more consistent with the selected colormap behavior.
Tracking widget and viewer synchronization
Fixed several issues in the tracking workflow:
- Fixed the viewer resetting to the first frame after adding tracking results
- Fixed the tracking widget not syncing to the current frame on startup
- Updated tracking progress behavior to use an indeterminate progress bar while preserving CoTracker-native batching
- Fixed the info button color so it follows napari settings instead of system theme settings (also affects layer stats)
We hope these fixes and improvements make the plugin more comfortable to use. Please let us know if you have any feedback!