load_demo_data.py
download_djarchive_dlc_data(target_directory='/tmp/test_data/')
¶
Download DLC demo data from djarchive. Approx .3 GB
Parameters:
Name | Type | Description | Default |
---|---|---|---|
target_directory |
str
|
Where to store the downloaded data. |
'/tmp/test_data/'
|
Source code in workflow_deeplabcut/load_demo_data.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
update_pose_cfg(project='from_top_tracking', net_type=None, update_snapshot=0)
¶
Updates weight paths to absolute. If update_snapshot, changes weights to snap #
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project |
str
|
Default from 'from_top_tracking'. Poject name/folder in dlc_root_data_dir |
'from_top_tracking'
|
net_type |
str
|
Project net weights (e.g., resnet50) If project is 'from_top_tracking', 'mobilenet_v2_1.0' |
None
|
update_snapshot |
int
|
Default 0 = no. If -1, highest integer value available. If integer, look for that snapshot. |
0
|
Source code in workflow_deeplabcut/load_demo_data.py
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 |
|
setup_bare_project(project='from_top_tracking', net_type=None)
¶
Adds absolute paths to config files and generates training-datasets folder
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project |
str
|
Default 'from_top_tracking'. DLC project folder |
'from_top_tracking'
|
net_type |
str
|
Project net (e.g., resnet50) passed to creat_training_dataset. If 'from_top', 'mobilenet_v2_1.0' |
None
|
Source code in workflow_deeplabcut/load_demo_data.py
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 |
|
shorten_video(vid_path='from_top_tracking/videos/test.mp4', output_path=None, first_n_sec=2)
¶
Save the first 2 seconds of a video relative to dlc root dir.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vid_path |
str
|
Default "from_top_tracking/videos/test_full.mp4". Path relative to get_dlc_root_data_dir() root directory |
'from_top_tracking/videos/test.mp4'
|
output_path |
str
|
Destination relative to vid_path root. If none, adds '-Ns' to filename, where N in first_n_sec |
None
|
first_n_sec |
int
|
Default 2. # of seconds to extract from beginning of video |
2
|
Source code in workflow_deeplabcut/load_demo_data.py
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
|
revert_checkpoint_file(project='from_top_tracking', original_checkpoint='checkpoint_orig')
¶
Delete existing checkpoint file and replace with original_checkpoint
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project |
str
|
DLC project name. Defaults to "from_top_tracking". |
'from_top_tracking'
|
original_checkpoint |
str
|
Original checkpoint file ot use in the revert, in the same directory as the checkpoint file. Defaults to "checkpoint_orig". |
'checkpoint_orig'
|
Source code in workflow_deeplabcut/load_demo_data.py
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
|