2023-DnB-Project/train.py

8 lines
256 B
Python
Raw Permalink Normal View History

2023-06-26 17:18:00 +08:00
from ultralytics import YOLO
# Load a model
2023-06-29 23:49:53 +08:00
model = YOLO('../../project/runs/detect/train3/weights/best.pt') # load a pretrained model (recommended for training)
2023-06-26 17:18:00 +08:00
# Train the model
2023-06-29 23:49:53 +08:00
model.train(data='../datasets/zcxv.v2i.yolov8/data.yaml', device="cuda")