Ultralytics YOLO26 and EasyOCR: Python ANPR tutorial

Learn to detect and read number plates with YOLO26 and EasyOCR, using a Python pipeline with CUDA or CPU execution and annotated MP4 output.

Player not loading? Watch on YouTube

This tutorial builds a Python automatic number plate recognition (ANPR) pipeline with Ultralytics YOLO26 and EasyOCR. A YOLO model detects plates, and the code crops each bounding box before passing the image to OCR. The walkthrough requires a model trained for plate detection and explains where to supply its path. The initialization selects CUDA when available and otherwise uses the CPU.

The text extraction method uses NumPy slicing to crop the plate, converts it to grayscale, and sends it to an English-language OCR reader. The video method accepts a webcam or a source that OpenCV can open. It processes frames, handles multiple plates in one image, adds boxes and recognized text, and saves an annotated MP4.

Three video examples show both readable plates and less reliable results. The speaker reports correct readings in the clearer examples, while the second includes fluctuating text and a detected plate with no extracted characters. The demonstrated code runs predictions and OCR on every frame. The speaker proposes object tracking to retain recognized text by track ID and avoid repeated OCR, but does not demonstrate that implementation. A VLM is suggested as a potentially more accurate option at higher cost; the video does not test that comparison.