fromultralyticsimportYOLOv10model=YOLOv10.from_pretrained('jameslahm/yolov10n')# Trainingmodel.train(...)# after training, one can push to the hubmodel.push_to_hub("your-hf-username/yolov10-finetuned")# Validationmodel.val(...)
Inference
Here's an end-to-end example showcasing inference on a cats image:
@article{wang2024yolov10,
title={YOLOv10: Real-Time End-to-End Object Detection},
author={Wang, Ao and Chen, Hui and Liu, Lihao and Chen, Kai and Lin, Zijia and Han, Jungong and Ding, Guiguang},
journal={arXiv preprint arXiv:2405.14458},
year={2024}
}