Created
October 7, 2022 18:48
-
-
Save gsanchezd/df62e3c369e549b7d1dfca158c7c6366 to your computer and use it in GitHub Desktop.
remove_backgrounds
This file contains hidden or 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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
from rembg import remove | |
from PIL import Image | |
import sys | |
def main(): | |
input_path = sys.argv[1] | |
output_path = sys.argv[2] | |
input = Image.open(input_path) | |
output = remove(input) | |
output.save(output_path) | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment