niulx commited on
Commit
6cf97e1
1 Parent(s): 842da73

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -87,7 +87,7 @@ def transparent_paste_with_mask(backimg, foreimg, mask_np,transparency = 128):
87
  mask_np = mask_np[:,:,np.newaxis]
88
 
89
  new_img_np = bimg_np*mask_np + (1-mask_np)* backimg_solid_np
90
- return Image.fromarray(new_img_np)
91
 
92
  def show_segmentation(image, segmentation, flag):
93
  if flag is False:
 
87
  mask_np = mask_np[:,:,np.newaxis]
88
 
89
  new_img_np = bimg_np*mask_np + (1-mask_np)* backimg_solid_np
90
+ return Image.fromarray(np.uint8(new_img_np))
91
 
92
  def show_segmentation(image, segmentation, flag):
93
  if flag is False: