Bug fix: `add_new_videos(..., extract_frames=True)` by n-poulsen · Pull Request #2468 · DeepLabCut/DeepLabCut
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.