mirror of
https://github.com/deepinsight/insightface.git
synced 2025-12-30 08:02:27 +00:00
add v0.7.3, move model storage to github release
This commit is contained in:
@@ -11,7 +11,7 @@ except ImportError:
|
||||
"Unable to import dependency onnxruntime. "
|
||||
)
|
||||
|
||||
__version__ = '0.7.2'
|
||||
__version__ = '0.7.3'
|
||||
|
||||
from . import model_zoo
|
||||
from . import utils
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,9 +4,7 @@ import os.path as osp
|
||||
import zipfile
|
||||
from .download import download_file
|
||||
|
||||
#BASE_REPO_URL='http://storage.insightface.ai/files'
|
||||
#BASE_REPO_URL='http://insightface.cn-sh2.ufileos.com'
|
||||
BASE_REPO_URL='http://d1gsb2o3ihr2l5.cloudfront.net'
|
||||
BASE_REPO_URL = 'https://github.com/deepinsight/insightface/releases/download/v0.7'
|
||||
|
||||
def download(sub_dir, name, force=False, root='~/.insightface'):
|
||||
_root = os.path.expanduser(root)
|
||||
@@ -15,8 +13,7 @@ def download(sub_dir, name, force=False, root='~/.insightface'):
|
||||
return dir_path
|
||||
print('download_path:', dir_path)
|
||||
zip_file_path = os.path.join(_root, sub_dir, name + '.zip')
|
||||
model_url = "%s/%s/%s.zip"%(BASE_REPO_URL, sub_dir, name)
|
||||
#model_url = "%s/%s.zip"%(BASE_REPO_URL, name)
|
||||
model_url = "%s/%s.zip"%(BASE_REPO_URL, name)
|
||||
download_file(model_url,
|
||||
path=zip_file_path,
|
||||
overwrite=True)
|
||||
@@ -40,12 +37,12 @@ def download_onnx(sub_dir, model_file, force=False, root='~/.insightface', downl
|
||||
os.makedirs(model_root)
|
||||
print('download_path:', new_model_file)
|
||||
if not download_zip:
|
||||
model_url = "%s/%s/%s"%(BASE_REPO_URL, sub_dir, model_file)
|
||||
model_url = "%s/%s"%(BASE_REPO_URL, model_file)
|
||||
download_file(model_url,
|
||||
path=new_model_file,
|
||||
overwrite=True)
|
||||
else:
|
||||
model_url = "%s/%s/%s.zip"%(BASE_REPO_URL, sub_dir, model_file)
|
||||
model_url = "%s/%s.zip"%(BASE_REPO_URL, model_file)
|
||||
zip_file_path = new_model_file+".zip"
|
||||
download_file(model_url,
|
||||
path=zip_file_path,
|
||||
|
||||
Reference in New Issue
Block a user