Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
f7de572
1
Parent(s):
a6ceb33
Set 4 images as input.
Browse files
app.py
CHANGED
@@ -34,8 +34,8 @@ if os.path.exists(state_dict):
|
|
34 |
model.eval()
|
35 |
|
36 |
|
37 |
-
def pred_maps(
|
38 |
-
images = [image_1, image_2, image_3, image_4]
|
39 |
image_shapes = [image.shape[:2] for image in images]
|
40 |
images = [Image.fromarray(image) for image in images]
|
41 |
|
@@ -55,9 +55,7 @@ def pred_maps(image_1, image_2, image_3, image_4):
|
|
55 |
image_preds = []
|
56 |
for image, pred in zip(images, preds):
|
57 |
image_preds.append(
|
58 |
-
|
59 |
-
np.hstack([np.array(image.convert('RGB')), cv2.cvtColor((pred*255).astype(np.uint8), cv2.COLOR_GRAY2RGB)]),
|
60 |
-
# cv2.COLOR_BGR2RGB)
|
61 |
)
|
62 |
return image_preds[:]
|
63 |
|
|
|
34 |
model.eval()
|
35 |
|
36 |
|
37 |
+
def pred_maps(images):
|
38 |
+
# images = [image_1, image_2, image_3, image_4]
|
39 |
image_shapes = [image.shape[:2] for image in images]
|
40 |
images = [Image.fromarray(image) for image in images]
|
41 |
|
|
|
55 |
image_preds = []
|
56 |
for image, pred in zip(images, preds):
|
57 |
image_preds.append(
|
58 |
+
np.hstack([np.array(image.convert('RGB')), cv2.cvtColor((pred*255).astype(np.uint8), cv2.COLOR_GRAY2RGB)])
|
|
|
|
|
59 |
)
|
60 |
return image_preds[:]
|
61 |
|