YOLO26 and FastAPI: license plate detection tutorial

Learn to annotate plates, train YOLO26 on Ultralytics Platform, and connect its hosted endpoint to a FastAPI app running on localhost port 8000.

Player not loading? Watch on YouTube

This tutorial builds a license plate detector with YOLO26, Ultralytics Platform and a local FastAPI interface. The demonstrated app sends images to a hosted prediction endpoint and displays bounding boxes, confidence scores and API results. Its inference path depends on that endpoint rather than running offline.

The workflow starts with manual bounding box annotation and a discussion of SAM 2 smart annotation. For training, the presenter clones an existing dataset described as containing 2,000 images, selects the YOLO26 nano model and runs 100 epochs in the cloud. He reviews training curves and evaluation metrics, then tests uploaded images and camera captures before deploying an endpoint.

For deployment on your own hardware, the presenter also points out a local training command, downloadable PyTorch weights and exports such as ONNX, TensorRT and OpenVINO. He does not demonstrate those hardware deployment paths.

The final interface uses FastAPI after an initial Flask setup. It reads the API key and prediction URL from environment variables and runs on localhost port 8000. The demonstrated application locates plates without extracting their text. The camera example captures a car image displayed on a phone; it does not establish continuous video performance or accuracy across road conditions.