from transformers import pipeline | |
generator = pipeline("mask-generation", device = 0, points_per_batch = 256) | |
image_url = "https://huggingface.co/ybelkada/segment-anything/resolve/main/assets/car.png" | |
outputs = generator(image_url, points_per_batch = 256) | |