Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ def resize_image(img_in,input_height,input_width):
|
|
10 |
|
11 |
def visualize_model_output(prediction, img):
|
12 |
unique_classes = np.unique(prediction[:,:,0])
|
13 |
-
rgb_colors = {'0' : [
|
14 |
'1' : [255, 0, 0],
|
15 |
'2' : [255, 125, 0],
|
16 |
'3' : [255, 0, 125],
|
@@ -45,7 +45,7 @@ def visualize_model_output(prediction, img):
|
|
45 |
shapes = np.zeros_like(img, np.uint8)
|
46 |
shapes = output
|
47 |
mask = shapes.astype(bool)
|
48 |
-
alpha = 0.
|
49 |
bg_img[mask] = cv2.addWeighted(bg_img, 1 - alpha, shapes, alpha, 0)[mask]
|
50 |
|
51 |
|
|
|
10 |
|
11 |
def visualize_model_output(prediction, img):
|
12 |
unique_classes = np.unique(prediction[:,:,0])
|
13 |
+
rgb_colors = {'0' : [255, 255, 255],
|
14 |
'1' : [255, 0, 0],
|
15 |
'2' : [255, 125, 0],
|
16 |
'3' : [255, 0, 125],
|
|
|
45 |
shapes = np.zeros_like(img, np.uint8)
|
46 |
shapes = output
|
47 |
mask = shapes.astype(bool)
|
48 |
+
alpha = 0.5
|
49 |
bg_img[mask] = cv2.addWeighted(bg_img, 1 - alpha, shapes, alpha, 0)[mask]
|
50 |
|
51 |
|