File size: 393 Bytes
72dddd7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
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")
|