from ultralytics import YOLO # Load pretrained YOLOv8x-seg model (auto-downloads if missing) model = YOLO("yolo11n-seg.mlpackage")