9 lines
185 B
Python
9 lines
185 B
Python
|
|
from ultralytics import YOLO
|
||
|
|
|
||
|
|
# Load a model
|
||
|
|
model = YOLO('weights/yolov8n.pt') # load an official model
|
||
|
|
|
||
|
|
model.train(data='datasets/safehat_2m/safehat.yaml', epochs=100)
|
||
|
|
|
||
|
|
model.val()
|