Ultralytics YOLO26 OBB training and Python inference

Learn to train YOLO26 nano for rotated vehicle detection, export the model, and use Python for inference and tracking in a CPU demo.

Player not loading? Watch on YouTube

This tutorial uses Ultralytics YOLO26 nano to detect vehicles with oriented bounding boxes (OBB). Rotated boxes follow vehicle orientation more closely than horizontal rectangles in the examples, which include aerial traffic footage and potential parking occupancy applications.

The workflow starts with the annotated Vehicles-OBB dataset in Ultralytics Platform. The presenter selects the nano model and 50 training epochs, runs cloud training, then exports the weights into a project directory. He reports that training took around an hour. The training image count varies in the narration, so it should not be treated as an exact dataset specification.

The Python walkthrough covers rotated labels with OpenCV, video capture, model loading, confidence thresholds and output settings. It extracts box corner coordinates, classes and track IDs, with a place to add application logic for each detection. The script can display results and save annotated video.

The presenter then runs detection and tracking on several traffic clips and reports real-time inference on his CPU. He does not specify the CPU or provide a measured frame rate, so the demo does not establish performance on other hardware. Training uses the cloud platform; the exported model runs in the presenter's own Python application.