from ultralytics import YOLO # Load a pre-trained YOLOv10n model model = YOLO("./yolov10x.pt") model.train(data="./dataset.yaml", epochs=3) # Perform object detection on an image results = model("./1.jpg") # Display the results results[0].show()