License Plate Detection & Recognition with DeGirum PySDK

We’re excited to introduce DeGirum-trained models for end-to-end license plate recognition, now available through PySDK.

This solution combines two models into a single compound model pipeline:

  • Detection model: Finds and crops license plates in images.

  • Recognition model: Reads plate numbers, supporting up to 7 alphanumeric characters commonly seen in global license plate formats.

With PySDK, you don’t need to manually stitch stages together — just one call gives you the detection boxes and recognized plate numbers.


:small_blue_diamond: Example Usage

import degirum as dg, degirum_tools

# Connection settings
hw_location = "@local"
model_zoo_url = "degirum/hailo"
token = ''

# Model names
lp_det_model_name = "yolov8n_relu6_global_lp_det--640x640_quant_hailort_multidevice_1"
lp_ocr_model_name = "yolov8s_relu6_lp_ocr_7ch--256x128_quant_hailort_multidevice_1"

# Load license plate detection and OCR models
lp_det_model = dg.load_model(
    model_name=lp_det_model_name,
    inference_host_address=hw_location,
    zoo_url=model_zoo_url,
    token=token,
)
lp_ocr_model = dg.load_model(
    model_name=lp_ocr_model_name,
    inference_host_address=hw_location,
    zoo_url=model_zoo_url,
    token=token,
)

# Create a compound cropping model
crop_model = degirum_tools.CroppingAndClassifyingCompoundModel(
    lp_det_model,
    lp_ocr_model
)

# Input image
image_path = "../assets/car_lp_sample_01.jpg"

# Run inference
inference_result = crop_model(image_path)

# Display results
with degirum_tools.Display("License Plates") as display:
    display.show_image(inference_result)


You can find code example at: hailo_examples/examples/026_license_plate_recognition_pipelined.ipynb at main · DeGirum/hailo_examples