vahidrezanezhad commited on
Commit
07ad194
1 Parent(s): c68758e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -38,10 +38,12 @@ def visualize_model_output(prediction, img):
38
  output[:,:,1][prediction[:,:,0]==unq_class] = rgb_class_unique[1]
39
  output[:,:,2][prediction[:,:,0]==unq_class] = rgb_class_unique[2]
40
 
41
- output = output.astype(np.int16)
42
- img = img.astype(np.int16)
 
 
43
 
44
- added_image = cv2.addWeighted(img,1,output,1,0)
45
 
46
  return added_image
47
 
 
38
  output[:,:,1][prediction[:,:,0]==unq_class] = rgb_class_unique[1]
39
  output[:,:,2][prediction[:,:,0]==unq_class] = rgb_class_unique[2]
40
 
41
+ output = output.astype(np.float64)
42
+ img = img.astype(np.float64)
43
+
44
+ print(output.shape, img.shape,'shapes')
45
 
46
+ added_image = cv2.addWeighted(img,1.,output,1.,0)
47
 
48
  return added_image
49