Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion deeplabcut/create_project/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ def add_new_videos(
# Read the config file
cfg = auxiliaryfunctions.read_config(config)

# deal with user passing a single video to add
if isinstance(videos, str):
videos = [videos]

video_path = Path(config).parents[0] / "videos"
data_path = Path(config).parents[0] / "labeled-data"
videos = [Path(vp) for vp in videos]
Expand Down Expand Up @@ -127,6 +131,7 @@ def add_new_videos(
else:
cfg["video_sets_original"].update(params)
videos_str = [str(video) for video in videos]
auxiliaryfunctions.write_config(config, cfg)
if extract_frames:
frame_extraction.extract_frames(
config, userfeedback=False, videos_list=videos_str
Expand All @@ -138,4 +143,3 @@ def add_new_videos(
print(
"New videos were added to the project! Use the function 'extract_frames' to select frames for labeling."
)
auxiliaryfunctions.write_config(config, cfg)