Execute the following Python code. The system will automatically fetch the default Nano model ( yolov8n.pt ):
from ultralytics import YOLO model = YOLO('yolov8n.pt') # Downloads to current directory or ~/.cache/ultralytics/ Download the desired weight file directly from the official Ultralytics release assets:
https://github.com/ultralytics/assets/releases/download/v0.0.0/[FILENAME].pt
| Model Type | File Name | Size (MB) | Use Case | | :--------- | :----------- | :-------- | :-------------------------------- | | Nano | yolov8n.pt | 6.2 | Mobile/Edge devices, speed first | | Small | yolov8s.pt | 21.4 | Balanced speed/accuracy | | Medium | yolov8m.pt | 49.6 | General purpose | | Large | yolov8l.pt | 83.7 | High accuracy, slower | | Extra-Large| yolov8x.pt | 130.5 | Maximum accuracy |