Leon Sick
commited on
Commit
•
0a5b105
1
Parent(s):
b260f1b
start of space
Browse files- demo_imgs/000000033221.jpg +0 -0
- demo_imgs/000000074256.jpg +0 -0
- model.py +0 -5
demo_imgs/000000033221.jpg
ADDED
demo_imgs/000000074256.jpg
DELETED
Binary file (148 kB)
|
|
model.py
CHANGED
@@ -84,7 +84,6 @@ def get_parser():
|
|
84 |
|
85 |
|
86 |
CONFIG_PATH = 'CutLER/cutler/model_zoo/configs/CutLER-ImageNet/cascade_mask_rcnn_R_50_FPN.yaml'
|
87 |
-
WEIGHT_URL = 'http://dl.fbaipublicfiles.com/cutler/checkpoints/cutler_cascade_final.pth'
|
88 |
|
89 |
|
90 |
def load_model(score_threshold: float) -> VisualizationDemo:
|
@@ -94,8 +93,6 @@ def load_model(score_threshold: float) -> VisualizationDemo:
|
|
94 |
|
95 |
model_dir = pathlib.Path('checkpoints')
|
96 |
model_dir.mkdir(exist_ok=True)
|
97 |
-
#weight_path = model_dir / WEIGHT_URL.split('/')[-1]
|
98 |
-
weight_path = model_dir / ".cache" / "huggingface" / "download"/ model_filename
|
99 |
weight_path = model_dir / model_filename
|
100 |
|
101 |
|
@@ -103,8 +100,6 @@ def load_model(score_threshold: float) -> VisualizationDemo:
|
|
103 |
if not weight_path.exists():
|
104 |
subprocess.run(shlex.split(f'huggingface-cli download leonsick/cuts3d_zeroshot {model_filename} --token {hf_token} --local-dir {model_dir}'))
|
105 |
|
106 |
-
#if not weight_path.exists():
|
107 |
-
# subprocess.run(shlex.split(f'wget {WEIGHT_URL} -O {weight_path}'))
|
108 |
|
109 |
arg_list = [
|
110 |
'--config-file',
|
|
|
84 |
|
85 |
|
86 |
CONFIG_PATH = 'CutLER/cutler/model_zoo/configs/CutLER-ImageNet/cascade_mask_rcnn_R_50_FPN.yaml'
|
|
|
87 |
|
88 |
|
89 |
def load_model(score_threshold: float) -> VisualizationDemo:
|
|
|
93 |
|
94 |
model_dir = pathlib.Path('checkpoints')
|
95 |
model_dir.mkdir(exist_ok=True)
|
|
|
|
|
96 |
weight_path = model_dir / model_filename
|
97 |
|
98 |
|
|
|
100 |
if not weight_path.exists():
|
101 |
subprocess.run(shlex.split(f'huggingface-cli download leonsick/cuts3d_zeroshot {model_filename} --token {hf_token} --local-dir {model_dir}'))
|
102 |
|
|
|
|
|
103 |
|
104 |
arg_list = [
|
105 |
'--config-file',
|