windows下yolov8訓練環境配置

一颗xi瓜糖發表於2024-08-15

安裝

anaconda3

conda create -n yolov8 python=3.8
## 進入yolov8 虛擬環境
activate yolov8 

pip install ultralytics

conda install chardet

安裝pytorch、cuda

https://pytorch.org/get-started/locally/

image-20240524174628802

conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia

安裝onnx格式支援

conda install onnx

匯出pt模型為onnx格式:

yolo export model=best.pt format=onnx

https://docs.ultralytics.com/tasks/detect/#models

訓練:

yolo detect train data=my_coco.yaml model=yolov8s.pt epochs=150 imgsz=640 batch=64 workers=0 device=0

相關文章