Below is the original image in grayscale with colorful maps overlaid. Very impressive.

Model Inference
Point Prompting
You can also use the model without the pipeline. To do so, initialize the model and
the processor.
thon
from transformers import SamModel, SamProcessor
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
model = SamModel.from_pretrained("facebook/sam-vit-base").to(device)
processor = SamProcessor.from_pretrained("facebook/sam-vit-base")