yizhangliu commited on
Commit
c69b167
·
1 Parent(s): 35d654a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -124,7 +124,7 @@ def model_process(image, mask):
124
  # form = request.form
125
  print(f'liuyz_3_here_', original_shape)
126
 
127
- size_limit = 1080 # : Union[int, str] = form.get("sizeLimit", "1080")
128
  if size_limit == "Original":
129
  size_limit = max(image.shape)
130
  else:
@@ -238,7 +238,7 @@ def predict(dict):
238
  print(f'liuyz_3_', image.convert("RGB").resize((512, 512)).shape)
239
  # mask = dict["mask"] # .convert("RGB") #.resize((512, 512))
240
  '''
241
-
242
  image = Image.fromarray(dict["image"])
243
  mask = np.array(Image.fromarray(dict["mask"]).convert("L"))
244
  print(f'mask___1 = {mask.shape}')
 
124
  # form = request.form
125
  print(f'liuyz_3_here_', original_shape)
126
 
127
+ size_limit = 512 # : Union[int, str] = form.get("sizeLimit", "1080")
128
  if size_limit == "Original":
129
  size_limit = max(image.shape)
130
  else:
 
238
  print(f'liuyz_3_', image.convert("RGB").resize((512, 512)).shape)
239
  # mask = dict["mask"] # .convert("RGB") #.resize((512, 512))
240
  '''
241
+ print(f'size__', dict["image"].size)
242
  image = Image.fromarray(dict["image"])
243
  mask = np.array(Image.fromarray(dict["mask"]).convert("L"))
244
  print(f'mask___1 = {mask.shape}')