Tutorial: Training YOLOX Models for Real-Time Object Detection in Pytorch

Last year, I made a tutorial for training YOLOX object detection models with the Icevision library to use in the Unity game engine.

In the time since, the IceVision library has not received any updates, and Google Colab no longer supports that tutorial’s dependencies. Therefore, I decided to redo my tutorial in pure PyTorch and leverage the bounding box transforms included with torchvision 0.15+.

I also moved the training datasets to Hugging Face Hub, so you don’t need to set up a Kaggle API key to run the tutorial code.

Currently, the tutorial series has posts for training the model, exporting the model to ONNX, and performing inference with ONNX Runtime.

I’ll also add another post covering how to use models in Unity with some helper packages I made. The demo project for that post is already available on GitHub.

Tutorial Series

GitHub Repositories

Hugging Face Hub Datasets