doevent commited on
Commit
2deac97
β€’
1 Parent(s): aed806b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -128,7 +128,7 @@ def inference(image: Image):
128
  image_tensor, orig_size = load_image(image_path, hypar)
129
  mask = predict(net, image_tensor, orig_size, hypar, device)
130
 
131
- pil_mask = Image.fromarray(mask).convert('1')
132
  im_rgb = Image.open(image).convert("RGB")
133
 
134
  im_rgba = im_rgb.copy()
 
128
  image_tensor, orig_size = load_image(image_path, hypar)
129
  mask = predict(net, image_tensor, orig_size, hypar, device)
130
 
131
+ pil_mask = Image.fromarray(mask).convert("1").convert("L")
132
  im_rgb = Image.open(image).convert("RGB")
133
 
134
  im_rgba = im_rgb.copy()