Created
February 26, 2023 16:03
-
-
Save YiLi225/b9816dffa24629a3ca1ba858a1594b3d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!pip install rembg | |
from google.colab import files | |
uploaded = files.upload() | |
## https://pixabay.com/photos/animal-mammal-fallow-deer-stag-984573/ | |
from rembg import remove | |
from PIL import Image | |
input_img = 'deer.jpg' | |
output_img = 'deer_rmbg.png' | |
inp = Image.open(input_img) | |
output = remove(inp) | |
output.save(output_img) | |
files.download(output_img) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment