from ultralytics import YOLO # Load a model model = YOLO('../../project/runs/detect/train3/weights/best.pt') # load a pretrained model (recommended for training) # Train the model model.train(data='../datasets/zcxv.v2i.yolov8/data.yaml', device="cuda")