Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -111,13 +111,10 @@ def predict(jpg, msk):
|
|
111 |
|
112 |
|
113 |
def infer(img,option):
|
114 |
-
|
115 |
-
|
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
|
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,
|