simple_yolo.py 477 B

12345678910111213141516
  1. #!/usr/bin/env python
  2. # -*- coding:utf-8 -*-
  3. from ultralytics import YOLO
  4. model = YOLO("/Volumes/Media/WorkDoc/Beizhi/CODE/hyd-yolo/yolov8/yolov8n.pt")
  5. # yolo train data= model=/home/jxft/datasets/yolov8/yolov8n.pt epochs=100 lr0=0.01
  6. model.train(data="/Users/zhenqin/temp/yolo_demo/datasets/hyd-action.yaml",
  7. workers=0,
  8. batch=16,
  9. epochs=3)
  10. results = model.val()
  11. # Export the model to ONNX format
  12. success = model.export(format='onnx')