johnnv commited on
Commit
581ca56
1 Parent(s): cda9ccb

fix plot image with mask

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -118,7 +118,7 @@ def process_big_images(
118
  outputs = segment(Image.fromarray(img))
119
  msk = post_processing(outputs, target_size)
120
 
121
- return Mask(msk)
122
 
123
 
124
  def image_with_mask(
@@ -156,9 +156,9 @@ def categories_map(
156
 
157
 
158
  def main(image):
159
- img = Image.fromarray(image)
160
 
161
- mask = process_big_images(img)
162
  mask_colorized = colorize(mask)
163
  fig = image_with_mask(img, mask)
164
 
 
118
  outputs = segment(Image.fromarray(img))
119
  msk = post_processing(outputs, target_size)
120
 
121
+ return img, Mask(msk)
122
 
123
 
124
  def image_with_mask(
 
156
 
157
 
158
  def main(image):
159
+ image = Image.fromarray(image)
160
 
161
+ img, mask = process_big_images(image)
162
  mask_colorized = colorize(mask)
163
  fig = image_with_mask(img, mask)
164