Spaces:
Runtime error
Runtime error
first commit
Browse files- annotator/midas/api.py +4 -4
- 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 |
-
|
| 93 |
-
|
| 94 |
-
|
| 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
|