amirgame197
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -15,16 +15,6 @@ remover = Remover(mode='fast') # custom setting
|
|
15 |
def doo(image):
|
16 |
img = Image.fromarray(image).convert('RGB') # read image
|
17 |
out = remover.process(img) # default setting - transparent background
|
18 |
-
out = remover.process(img, type='rgba') # same as above
|
19 |
-
out = remover.process(img, type='map') # object map only
|
20 |
-
out = remover.process(img, type='green') # image matting - green screen
|
21 |
-
out = remover.process(img, type='white') # change backround with white color
|
22 |
-
out = remover.process(img, type=[255, 0, 0]) # change background with color code [255, 0, 0]
|
23 |
-
out = remover.process(img, type='blur') # blur background
|
24 |
-
out = remover.process(img, type='overlay') # overlay object map onto the image
|
25 |
-
out = remover.process(img, type='samples/background.jpg') # use another image as a background
|
26 |
-
|
27 |
-
out = remover.process(img, threshold=0.5) # use threhold parameter for hard prediction.
|
28 |
|
29 |
out.save('output.png') # save result
|
30 |
return out
|
|
|
15 |
def doo(image):
|
16 |
img = Image.fromarray(image).convert('RGB') # read image
|
17 |
out = remover.process(img) # default setting - transparent background
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
out.save('output.png') # save result
|
20 |
return out
|