Learning YOLOv8

尝试调用YOLOv8模型

YOLOv8是发布YOLOv5的组织发布的

https://github.com/ultralytics/yolov5

https://docs.ultralytics.com/


安装

pip install ultralytics

使用预训练的模型(会自动下载)

预训练模型分为10档

from ultralytics import YOLO

model = YOLO("yolov8n.pt")

预测

inputs = [img, img] # list of np arrays
results = model(inputs) # List of Results objects
for result in results:
    boxes = result.boxes # Boxes object for bbox outputs
    masks = result.masks # Masks object for segmenation masks outputs
    probs = result.probs # Class probabilities for classification outputs
    ...

中文readme:https://github.com/ultralytics/yolov5/blob/master/README.zh-CN.md

组织首页:https://ultralytics.com/