Spaces:
Sleeping
Sleeping
Test dataset
Browse files- prismer_model.py +3 -1
prismer_model.py
CHANGED
@@ -69,7 +69,9 @@ def compute_md5(image_path: str) -> str:
|
|
69 |
|
70 |
def run_experts(image_path: str) -> Tuple[str, Tuple[str, ...]]:
|
71 |
im_name = compute_md5(image_path)
|
72 |
-
|
|
|
|
|
73 |
keys = ['depth', 'edge', 'normal', 'seg_coco', 'obj_detection', 'ocr_detection']
|
74 |
results = [pathlib.Path('prismer/helpers/labels') / key / f'helpers/images/{im_name}.png' for key in keys]
|
75 |
results_pretty = [pathlib.Path('prismer/helpers/labels') / key / f'helpers/images/{im_name}_p.png' for key in keys]
|
|
|
69 |
|
70 |
def run_experts(image_path: str) -> Tuple[str, Tuple[str, ...]]:
|
71 |
im_name = compute_md5(image_path)
|
72 |
+
image_dir = submodule_dir / 'helpers' / 'images'
|
73 |
+
out_path = image_dir / f'{im_name}.jpg'
|
74 |
+
image_dir.mkdir(parents=True, exist_ok=True)
|
75 |
keys = ['depth', 'edge', 'normal', 'seg_coco', 'obj_detection', 'ocr_detection']
|
76 |
results = [pathlib.Path('prismer/helpers/labels') / key / f'helpers/images/{im_name}.png' for key in keys]
|
77 |
results_pretty = [pathlib.Path('prismer/helpers/labels') / key / f'helpers/images/{im_name}_p.png' for key in keys]
|