Ahsen Khaliq commited on
Commit
b179895
1 Parent(s): 353b3be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -11,9 +11,8 @@ os.mkdir("data")
11
  os.mkdir("dataout")
12
  model = hub.Module(name='U2Net')
13
  def infer(img,mask,option):
14
- img = img.resize((600,600)) # image resizing
15
-
16
- mask = mask.resize((600,600))
17
  img.save("./data/data.png")
18
  if option == "automatic (U2net)":
19
  result = model.Segmentation(
 
11
  os.mkdir("dataout")
12
  model = hub.Module(name='U2Net')
13
  def infer(img,mask,option):
14
+ img = ImageOps.contain(img, (700,700))
15
+ mask = ImageOps.contain(mask, (700,700))
 
16
  img.save("./data/data.png")
17
  if option == "automatic (U2net)":
18
  result = model.Segmentation(