Update README.md
Browse files
README.md
CHANGED
@@ -161,9 +161,9 @@ result=model(image)
|
|
161 |
result_image = postprocess_image(result[0][0], orig_im_size)
|
162 |
|
163 |
# save result
|
164 |
-
|
165 |
-
no_bg_image = Image.new("RGBA", pil_im.size, (0,0,0,0))
|
166 |
orig_image = Image.open(image_path)
|
167 |
-
no_bg_image.
|
|
|
168 |
```
|
169 |
|
|
|
161 |
result_image = postprocess_image(result[0][0], orig_im_size)
|
162 |
|
163 |
# save result
|
164 |
+
pil_mask_im = Image.fromarray(result_image)
|
|
|
165 |
orig_image = Image.open(image_path)
|
166 |
+
no_bg_image = orig_image.copy()
|
167 |
+
no_bg_image.putalpha(pil_mask_im)
|
168 |
```
|
169 |
|