anodev commited on
Commit
08086a2
1 Parent(s): f84a891

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -111,13 +111,10 @@ def predict(jpg, msk):
111
 
112
 
113
  def infer(img,option):
114
- print(type(img))
115
- print(type(img["image"]))
116
- print(type(img["mask"]))
117
- imageio.imwrite("./data/data.png", img["image"])
118
- if option == "automatic (U2net)":
119
  result = model.Segmentation(
120
- images=[cv2.cvtColor(img["image"], cv2.COLOR_RGB2BGR)],
121
  paths=None,
122
  batch_size=1,
123
  input_size=320,
 
111
 
112
 
113
  def infer(img,option):
114
+ imageio.imwrite("./data/data.png", img)
115
+ if option == "automatic":
 
 
 
116
  result = model.Segmentation(
117
+ images=[cv2.cvtColor(img, cv2.COLOR_RGB2BGR)],
118
  paths=None,
119
  batch_size=1,
120
  input_size=320,