Running YOLOv10 in Coretex

Duško Mirković
13.6.2024
Computer Vision
YOLOv10, the latest iteration in the YOLO series, offers faster inference times, lower latency, fewer parameters, and improved accuracy compared to previous versions. Implementing YOLOv10 in Coretex involved updating the existing YOLOv8 task, implementing logic for downloading weights, using a script to convert a Kaggle car detection dataset to Coretex annotation format, as well as orchestrating the training on Coretex.

YOLOv10 is finally here (paper: https://arxiv.org/abs/2405.14458). YOLOv10 offers faster inference times, lower latency, less parameters, and better accuracy when compared to the models of previous generations.

Updating predefined YOLOv8 Coretex Task to work with YOLOv10

Running YOLOv10 in Coretex was easy as YOLOv8 (https://docs.coretex.ai/v1/getting-started/demo-experiments/hand-and-finger-tracking) was already available as a Coretex Task and making some updates to it allows you to use v10. Here’s an overview of those changes:

Since the official Ultralytics python package does not support v10 yet, a fork which supports it was used https://github.com/THU-MIG/yolov10.

There were a couple of differences compared to original Ultralytics python package:

  • Automatic weights download
  • v10 has additional metrics compared to v8, and some metric names were changed for v10.

You can review the full source code of the predefined YOLOv10 Coretex Task here. Additionally, you can view the complete diff compared to the v8 version here.

Downloading weights

Since v10 weights are not automatically downloaded like v8 weights are, functionality to manually download selected v10 weights for training was implemented.

Finding a good training Dataset

YOLOv10 can be trained on any kind of object detection dataset, but for this example one of the most popular datasets from Kaggle was picked: “Car Object Detection” (https://www.kaggle.com/datasets/sshikamaru/car-object-detection).

A simple script to convert that dataset into Coretex annotation format was written as that is what updated v10 Coretex Task expects:

Training and evaluating the model

After the dataset was successfully uploaded it was time to train the model. Coretex was used for dataset management, experiment scheduling, and experiment tracking. The model weights “YOLOv10 S” were trained using default hyper-parameters on 100 epochs and with image size of 640. Accuracy of the model on validation data after training was 95.09%.

Here’s how the model performs on testing part of the dataset:

Conclusion

The combined simplicity of Ultralytics python package and Coretex as a platform allows you to easily integrate latest versions of state-of-the-art models and see the results of their training and inference in real-time.

If you have any questions or want to chat about ML, feel free to join the Coretex AI Discord server.

Duško Mirković
June 13, 2024