File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 55Licensed under GNU Lesser General Public License v3.0
66"""
77
8-
8+ import os
9+ import urllib .request
910import sys
1011import shutil
1112import warnings
@@ -51,10 +52,12 @@ def main():
5152 model_dir = tmp_dir / 'DLC_Dog_resnet_50_iteration-0_shuffle-0'
5253
5354 # download dog test video from github:
54- # TODO: Should check if the video's already there before downloading it (should have been cloned with the files)
55- print (f"Downloading Video to { video_file } " )
56- url_link = "https://github.com/DeepLabCut/DeepLabCut-live/blob/main/check_install/dog_clip.avi?raw=True"
57- urllib .request .urlretrieve (url_link , video_file , reporthook = urllib_pbar )
55+ if not os .path .exists (video_file ):
56+ print (f"Downloading Video to { video_file } " )
57+ url_link = "https://github.com/DeepLabCut/DeepLabCut-live/blob/main/check_install/dog_clip.avi?raw=True"
58+ urllib .request .urlretrieve (url_link , video_file , reporthook = urllib_pbar )
59+ else :
60+ print (f"Video already exists at { video_file } " )
5861
5962 # download model from the DeepLabCut Model Zoo
6063 if Path (model_dir / SNAPSHOT_NAME ).exists ():
You can’t perform that action at this time.
0 commit comments