Robert001 commited on
Commit
5b1ae54
1 Parent(s): 9b83e5e

first commit

Browse files
Files changed (2) hide show
  1. annotator/midas/api.py +4 -4
  2. requirements.txt +2 -1
annotator/midas/api.py CHANGED
@@ -89,10 +89,10 @@ def load_model(model_type):
89
  # load network
90
  model_path = ISL_PATHS[model_type]
91
  if model_type == "dpt_large": # DPT-Large
92
- # if not os.path.exists(model_path):
93
- # from basicsr.utils.download_util import load_file_from_url
94
- # load_file_from_url(remote_model_path, model_dir=annotator_ckpts_path)
95
- model_path = remote_model_path
96
  model = DPTDepthModel(
97
  path=model_path,
98
  backbone="vitl16_384",
 
89
  # load network
90
  model_path = ISL_PATHS[model_type]
91
  if model_type == "dpt_large": # DPT-Large
92
+ if not os.path.exists(model_path):
93
+ from basicsr.utils.download_util import load_file_from_url
94
+ load_file_from_url(remote_model_path, model_dir=annotator_ckpts_path)
95
+ #model_path = remote_model_path
96
  model = DPTDepthModel(
97
  path=model_path,
98
  backbone="vitl16_384",
requirements.txt CHANGED
@@ -21,4 +21,5 @@ transformers==4.26.1
21
  xformers==0.0.16
22
  yapf==0.32.0
23
  cvlib==0.2.7
24
- tensorflow-cpu
 
 
21
  xformers==0.0.16
22
  yapf==0.32.0
23
  cvlib==0.2.7
24
+ tensorflow-cpu
25
+ basicsr==1.4.2