Skip to content

Return frames2pick from extract_videos #3188

@sam-delap

Description

@sam-delap

A note at the top - I am happy to do the PR for this, I just wanted to verify it was even something the project wanted before dropping a PR.

Is your feature request related to a problem? Please describe.
Hello! I maintain a sister project (https://github.com/sam-delap/deepxromm) for integrating DeepLabCut and XMAlab. Currently, I'm implementing my own random shuffling algorithm for frame selection, however I'd like to make better use of the existing deeplabcut.extract_frames toolkit.

However, in order to then parse the subset of data I need in XMAlab format and transform it into DeepLabCut format to create my training dataset, I either have to:

  • List the contents of each video directory and parse frame numbers from the file names.
  • Use the frameselectiontools util function directly and re-implement error handling and image extraction.

Describe the solution you'd like

Modify the function definition of extract_frames to add both input type hints and a return type (would still be list[int] or None given the other branches of the function) so that if frames are successfully picked using an algorithm without user input, the frames selected are returned to the caller.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions