kongkip commited on
Commit
399fb9d
1 Parent(s): ad96308

minor fixes

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -53,7 +53,9 @@ def predict(image):
53
  mask *= 255
54
 
55
  mask = np.array(Image.fromarray(mask).convert("L"))
56
- mask = np.resize(mask, original_shape)
 
 
57
 
58
  return mask
59
 
 
53
  mask *= 255
54
 
55
  mask = np.array(Image.fromarray(mask).convert("L"))
56
+ mask = tf.image.resize(mask[..., tf.newaxis], original_shape)
57
+ mask = tf.cast(mask, tf.uint8)
58
+ mask = mask.numpy().squeeze()
59
 
60
  return mask
61