How to initialize SAM predictor without running inference to dummy images, to save time
from ultralytics import SAM
# Initialize
self.model = SAM("sam2tiny")
self.model() ## note this prints:
"""
WARNING ⚠️ 'source' is missing. Using 'source=/home/master-andreas/my_proj/test_env/lib/python3.11/site-packages/ultralytics/assets'.
image 1/2 /home/master-andreas/my_proj/test_env/lib/python3.11/site-packages/ultralytics/assets/bus.jpg: 1024x1024 1 0, 1 1, 1 2, 1 3, 1 4, 1 5, 1 6, 1 7, 1 8, 1 9, 1 10, 1 11, 1 12, 9691.9ms
image 2/2 /home/master-andreas/my_proj/test_env/lib/python3.11/site-packages/ultralytics/assets/zidane.jpg: 1024x1024 1 0, 1 1, 1 2, 9208.4ms
"""
# Inference
results = self.model.predictor(image, points=[[point]], imgsz=size, multimask_output=True)
The reason why i want to initialize the predictor is: because i want multimask_output=True Ambigueous promt with SAM, return top 3 Masks