部署 YOLOv8

部署 YOLOv8 —— 从安装到运行

YOLOv8 是 Ultralytics 推出的最新 YOLO 系列模型,支持检测、分割、姿态识别等功能。


1. 安装 YOLOv8

pip install ultralytics

2. YOLOv8 模型下载

from ultralytics import YOLO
model = YOLO("yolov8n.pt")

3. 推理图片

model("bus.jpg", show=True)

image


4. 推理视频

model.predict("video.mp4", save=True)

image

posted @ 2025-11-01 21:28  元始天尊123  阅读(16)  评论(0)    收藏  举报