File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010import sys
1111import shutil
1212import warnings
13+ from dlclibrary .dlcmodelzoo .modelzoo_download import (
14+ download_huggingface_model ,
15+ MODELOPTIONS ,
16+ )
1317
1418from dlclive import benchmark_videos
1519import urllib .request
@@ -57,13 +61,15 @@ def main(display:bool=None):
5761 print ('Tarball already downloaded, using cached version' )
5862 else :
5963 print ("Downloading full_dog model from the DeepLabCut Model Zoo..." )
60- model_url = "http://deeplabcut.rowland.harvard.edu/models/DLC_Dog_resnet_50_iteration-0_shuffle-0.tar.gz"
61- urllib .request .urlretrieve (model_url , str (model_tarball ), reporthook = urllib_pbar )
62-
63- print ('Untarring compressed model' )
64- model_file = tarfile .open (str (model_tarball ))
65- model_file .extractall (str (model_dir .parent ))
66- model_file .close ()
64+ model = 'superanimal_quadruped'
65+ download_huggingface_model (model ,model_dir )
66+ #model_url = "http://deeplabcut.rowland.harvard.edu/models/DLC_Dog_resnet_50_iteration-0_shuffle-0.tar.gz"
67+ #urllib.request.urlretrieve(model_url, str(model_tarball), reporthook=urllib_pbar)
68+
69+ #print('Untarring compressed model')
70+ #model_file = tarfile.open(str(model_tarball))
71+ # model_file.extractall(str(model_dir.parent))
72+ #model_file.close()
6773
6874 # assert these things exist so we can give informative error messages
6975 assert Path (video_file ).exists ()
You can’t perform that action at this time.
0 commit comments