vahidrezanezhad commited on
Commit
858ba25
·
verified ·
1 Parent(s): 533cad9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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' : [0, 0, 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.2
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