deeplabcut.create_project.add
Functions:
| Name | Description |
|---|---|
add_new_videos |
Add new videos to the config file at any stage of the project. |
add_new_videos
add_new_videos(config: str | Path, videos: list[str | Path], copy_videos=False, coords=None, extract_frames=False)
Add new videos to the config file at any stage of the project.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
string
|
String containing the full path of the config file in the project. |
required |
|
list
|
A list of strings containing the full paths of the videos to include in the project. |
required |
|
bool
|
If True, the videos will be copied to your project/videos directory. If False, symlinks of the videos are copied instead. Defaults to False. |
False
|
|
list
|
A list containing the list of cropping coordinates of the video. Defaults to None. |
None
|
|
bool
|
If True, extract_frames will be run on the new videos. Defaults to False. |
False
|
Examples:
Video will be added, with cropping dimensions according to the frame dimensions of mouse5.avi:
deeplabcut.add_new_videos(
"/home/project/reaching-task-Tanmay-2018-08-23/config.yaml",
["/data/videos/mouse5.avi"],
)
Video will be added, with cropping dimensions [0,100,0,200]:
deeplabcut.add_new_videos(
"/home/project/reaching-task-Tanmay-2018-08-23/config.yaml",
["/data/videos/mouse5.avi"],
copy_videos=False,
coords=[[0, 100, 0, 200]],
)
Two videos will be added, with cropping dimensions [0,100,0,200] and [0,100,0,250], respectively:
deeplabcut.add_new_videos(
"/home/project/reaching-task-Tanmay-2018-08-23/config.yaml",
["/data/videos/mouse5.avi", "/data/videos/mouse6.avi"],
copy_videos=False,
coords=[[0, 100, 0, 200], [0, 100, 0, 250]],
)
Source code in deeplabcut/create_project/add.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | |