from io import BytesIO | |
import io | |
import os | |
import time | |
from PIL import Image | |
import requests | |
import boto3 | |
from grounded_sam.app import get_mask | |
import time | |
get_mask(Image.open("girl.png"), "person", | |
expand_by=10) | |
start = time.time() | |
get_mask(Image.open("girl.png"), "person", | |
expand_by=10).save("get_mask_pil.png") | |
print("get_mask_pil took", time.time() - start, "seconds") | |