FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Bug fix: `add_new_videos(..., extract_frames=True)` by n-poulsen · Pull Request #2468 · DeepLabCut/DeepLabCut · GitHub

Bug fix: add_new_videos(..., extract_frames=True) - #2468

Merged
AlexEMG merged 2 commits into
mainfrom
niels/extract_frames_bug
Dec 19, 2023
Merged

Bug fix: add_new_videos(..., extract_frames=True)#2468
AlexEMG merged 2 commits into
mainfrom
niels/extract_frames_bug

Conversation

n-poulsen commented Dec 18, 2023
edited
Loading

Copy link
Copy Markdown
Contributor

Addresses issues #2461 and #2463

When running add_new_videos(..., extract_frames=True), the configuration file is written after extract_frames is called. So when getting the videos for which to extract new frames, the new videos are not yet in the project configuration:

    # deeplabcut.extract_frames, lines 269-272
    if videos_list is None:
        videos = cfg.get("video_sets_original") or cfg["video_sets"]
    else:  # filter video_list by the ones in the config file
        videos = [v for v in cfg["video_sets"] if v in videos_list]  # none of videos_list are in cfg["video_sets"] yet!
    ...

    has_failed = []
    for video in videos:
        ...

    if all(has_failed):  # True as the list is empty
        print("Frame extraction failed. Video files must be corrupted.")

Also deals with the case when users pass a single video to add as a string: wraps it in a list to avoid the annoying issue in #2463.

n-poulsen added the bug fix! fix for a real buggy one... label Dec 18, 2023

MMathisLab left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Lgtm

AlexEMG merged commit d3b9f1f into main Dec 19, 2023
MMathisLab mentioned this pull request Feb 8, 2024
MMathisLab deleted the niels/extract_frames_bug branch February 11, 2024 17:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix! fix for a real buggy one...

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL