Spaces:
Runtime error
Runtime error
Update predict.py
Browse files- predict.py +1 -2
predict.py
CHANGED
@@ -57,9 +57,8 @@ def draw_semantic_segmentation(segmentation_map, image, palette):
|
|
57 |
|
58 |
def visualize_instance_seg_mask(mask, input_image):
|
59 |
color_segmentation_map = np.zeros((mask.shape[0], mask.shape[1], 3), dtype=np.uint8)
|
60 |
-
|
61 |
labels = np.unique(mask)
|
62 |
-
print("labels:",labels)
|
63 |
label2color = {int(label): (random.randint(0, 1), random.randint(0, 255), random.randint(0, 255)) for label in labels}
|
64 |
|
65 |
for label, color in label2color.items():
|
|
|
57 |
|
58 |
def visualize_instance_seg_mask(mask, input_image):
|
59 |
color_segmentation_map = np.zeros((mask.shape[0], mask.shape[1], 3), dtype=np.uint8)
|
60 |
+
|
61 |
labels = np.unique(mask)
|
|
|
62 |
label2color = {int(label): (random.randint(0, 1), random.randint(0, 255), random.randint(0, 255)) for label in labels}
|
63 |
|
64 |
for label, color in label2color.items():
|