OriLib commited on
Commit
7650b57
·
verified ·
1 Parent(s): 153cb76

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -3
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
- pil_im = Image.fromarray(result_image)
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.paste(orig_image, mask=pil_im)
 
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