vahidrezanezhad commited on
Commit
7e6d552
·
verified ·
1 Parent(s): 98abfe5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -39,8 +39,11 @@ def visualize_model_output(prediction, img):
39
  output[:,:,2][prediction[:,:,0]==unq_class] = rgb_class_unique[2]
40
 
41
  output = output.astype(np.uint8)
42
- im_pil_output = Image.fromarray(output)
43
- im_pil = Image.fromarray(img)
 
 
 
44
 
45
  im_pil.paste(im_pil_output, (0,0))
46
 
 
39
  output[:,:,2][prediction[:,:,0]==unq_class] = rgb_class_unique[2]
40
 
41
  output = output.astype(np.uint8)
42
+ output_color_coverted = cv2.cvtColor(output, cv2.COLOR_BGR2RGB)
43
+ im_pil_output = Image.fromarray(output_color_coverted)
44
+
45
+ color_coverted = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
46
+ im_pil = Image.fromarray(color_coverted)
47
 
48
  im_pil.paste(im_pil_output, (0,0))
49