skiAI/main.py

21 lines
612 B
Python
Raw Normal View History

2026-01-10 11:53:07 +01:00
from ultralytics import YOLO
# Create a new YOLO model from scratch
#model = YOLO("yolo11n.yaml")
# Load a pretrained YOLO model (recommended for training)
2026-01-10 11:53:07 +01:00
#model = YOLO("yolo11n-pose.pt")
# Train the model using the 'coco8.yaml' dataset for 3 epochs
2026-01-10 11:53:07 +01:00
#results = model.train(data="datasets/skier_pose/skier_pose.yaml", epochs=200, imgsz=640, device='mps')
# Evaluate the model's performance on the validation set
2026-01-10 11:53:07 +01:00
#results = model.val()
# Perform object detection on an image using the model
#results = model("bus.jpg", device='cpu')
# Export the model to ONNX format
#success = model.export(format="onnx")