Views
No views yet
🔒 The model was trained exclusively on proprietary data and is provided for inference only.
Phoca vitulina (common seal).pt (Ultralytics YOLO11x-seg)ultralytics library:1from huggingface_hub import hf_hub_download
2import shutil
3import os
4
5from ultralytics import YOLO
6
7filename="phoca-vitulina_yolo11x-seg.pt"
8# Download to the cache
9cached_path = hf_hub_download(
10 repo_id="NPWCLLC/phoca-vitulina_yolo11x-seg",
11 filename=filename,
12)
13
14# Copy to the desired folder
15target_dir = "./models"
16os.makedirs(target_dir, exist_ok=True)
17target_path = os.path.join(target_dir, filename)
18
19shutil.copy(cached_path, target_path)
20print(f"✅ Model copied to: {target_path}")
21
22# Making a prediction
23model = YOLO(target_path)
24
25results = model("images/image1.jpg")
26results[0].save("output.jpg")
27print("Done! Result saved to output.jpg")