Indonesian License Plate Generator

AboutSeptember 2026

19· Machine Learning, Data EngineeringActively maintained·In progress

A synthetic-data generator that composites realistic Indonesian vehicle plates onto scenes and emits YOLO labels for the plate and every character, so a detector never has to wait on hand-photographed, hand-annotated data.

synthetic-datacomputer-vision

Source ↗

Plate variantsGeneration
Car and motorcycle plates across all four Indonesian background colors, white, black, yellow, and red, each composited from the same glyph set with the correct text color swapped in per variant.
Perspective-warped scenePlacement
A generated plate after perspective warp and background drop-in, with its detection bounding box drawn on top. The box comes straight from the same warp math that placed the plate, so it stays tight without a separate detection pass.
Annotation classesLabels
Per-character YOLO boxes (36 classes: 0-9, A-Z) plus a 37th whole-plate class, shown across the eight car/motorcycle × color combinations the generator currently produces.
Write-up

This exists because of a bottleneck the Smart Gate work ran straight into. A plate detector needs thousands of annotated plates, hand-photographing and hand-boxing them is slow, and the set you end up with only covers whatever region codes happened to drive past the camera. Generating them fixes both problems at once, and generating labelled data where collecting it is the real constraint is how most industrial computer vision gets its rare cases at all.

It ports the architecture of a well-known synthetic plate generator and reworks it for Indonesian plates end to end: a 37-class annotation scheme (digits, letters, plus a whole-plate class), a region-code table covering real province and city prefixes with population-weighted sampling so the distribution resembles actual traffic rather than being uniform, and four plate colour variants across car and motorcycle layouts.

Glyphs are baked once from a plate-specific TTF font, auto-detecting symbol-mapped versus Unicode encodings so swapping in a different font needs no code changes, into a reusable component library. They are then composited per plate, perspective-warped, optionally dirtied with noise and grime, and dropped onto a background. Everything a detector needs, the plate's bounding box and each individual character's box, is written out as YOLO labels alongside the image, so a set is trainable the moment it is generated. Character-level boxes are the part that matters most, since hand-annotating those on real photographs is the single most tedious step in building an OCR training set.

Background variety and OCR-oriented crop exports are still open items.

Things to underline
  • Ported a synthetic plate-generation pipeline and reworked it for Indonesian plates: real region-code prefixes, four color variants, and separate car and motorcycle layouts
  • Built a font-agnostic glyph baker that auto-detects symbol-mapped versus Unicode TTFs, so a new plate font drops in without touching the compositing code
  • Emits ready-to-train YOLO labels (37 classes: 0-9, A-Z, plate) directly from the same perspective-warp step that places the plate onto a scene
Built with
PythonOpenCVNumPyPillow
GitHubdarrellathaya/indonesian-license-plate-generator
  • Python 97.5%
  • Jsonnet 2.0%
  • Shell 0.5%
Commits
1
Status
Actively maintained