grrvk commited on
Commit
cbf0b41
1 Parent(s): bb2b081

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -48,8 +48,9 @@ def inference_instance(image):
48
  instance_seg_mask = result["segmentation"].cpu().detach().numpy()
49
 
50
  instance_seg_mask_disp = visualize_instance_seg_mask(instance_seg_mask)
51
- image.paste(instance_seg_mask_disp, (0, 0), instance_seg_mask_disp)
52
- st.image(image, caption='Result')
53
 
54
  image = Image.open(file).convert("RGB")
55
- inference_instance(image)
 
 
 
48
  instance_seg_mask = result["segmentation"].cpu().detach().numpy()
49
 
50
  instance_seg_mask_disp = visualize_instance_seg_mask(instance_seg_mask)
51
+ return instance_seg_mask_disp
 
52
 
53
  image = Image.open(file).convert("RGB")
54
+ mask = inference_instance(image)
55
+ image.paste(mask, (0, 0), mask)
56
+ st.image(image, caption='Result')