Skip to content

Conversation

@n-poulsen
Copy link
Contributor

Implements shelving data during video analysis for the PyTorch engine.

DeepLabCut 3.0 new API features - analyze_videos

  • addition of the use_shelve
  • addition of the robust_nframes parameter for the analyze_videos

Changes to the code

  • implementation of a ShelfReader and a ShelfWriter in deeplabcut.pose_estimation_pytorch.runners.shelving
  • as the ShelfWriter now creates the _full.pickle file on-the-fly, assign_identity is called in a new AssignIndividualIdentities post-processor instead of in video_inference (which is an improvement on the previous implementation)

Notes

When reading from the ShelfReader, the order of keys returned does not necessarily match the order in which the keys were inserted. This could cause the predictions for frames to be shuffled when iterating over the frame keys. To solve this issue, the nframes parameter is now used to iterate over the number of frames in the video (in _generate_assemblies_file and in convert_detections2tracklets), and a "key_str_width" parameter is added to the metadata, storing the str_width parameter so that frame keys can be recreated from the frame index.

@n-poulsen n-poulsen added enhancement New feature or request DLC3.0🔥 labels Nov 18, 2024
Copy link
Contributor

@maximpavliv maximpavliv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!! 😃

@n-poulsen n-poulsen merged commit 89ac4a0 into pytorch_dlc Nov 22, 2024
@n-poulsen n-poulsen deleted the niels/shelve_db_video_anlaysis branch November 22, 2024 08:26
xiu-cs pushed a commit to xiu-cs/DeepLabCut that referenced this pull request Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DLC3.0🔥 enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants