not-lain commited on
Commit
ac03925
·
verified ·
1 Parent(s): 8c3c5af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -42,7 +42,7 @@ def process(img):
42
  path = load_img(img,output_type="str")
43
  img = cv2.cvtColor(cv2.imread(path, cv2.IMREAD_COLOR), cv2.COLOR_BGR2RGB)
44
  mask = get_mask(model, img, use_amp= False, s=img_size)
45
- img = mask * img
46
  out = load_img(img)
47
  return out
48
 
 
42
  path = load_img(img,output_type="str")
43
  img = cv2.cvtColor(cv2.imread(path, cv2.IMREAD_COLOR), cv2.COLOR_BGR2RGB)
44
  mask = get_mask(model, img, use_amp= False, s=img_size)
45
+ img = np.concatenate((img, mask * img, mask.repeat(3, 2) * 255), axis=1).astype(np.uint8)
46
  out = load_img(img)
47
  return out
48