Chinese plate recognition with U-Net, OpenCV, and a time machine to 2019
A classic three-stage pipeline for locating, straightening, and reading Chinese license plates—frozen in TensorFlow 1.x amber.

What it does
Feed it a photo with a Chinese license plate somewhere in the frame. U-Net segments the image to find the plate region, OpenCV does edge detection and perspective correction to straighten it, and a CNN reads off the characters end-to-end. The author claims it handles tilted angles, harsh lighting, and even some cases where Baidu’s cloud API fails.
The interesting bit
The segmentation-first approach is the twist: instead of running a detector on raw pixels, it uses U-Net to produce a binary mask first, then lets classical CV do the geometric heavy lifting. It’s a hybrid of deep learning and old-school computer vision that predates the “just throw a big detector at it” era.
Key highlights
- Three-stage pipeline: U-Net segmentation → OpenCV correction → CNN OCR
- End-to-end character recognition without splitting into single-character classifiers
- Handles perspective distortion and poor lighting, per the README claims
- Includes test images showing tilted plates, night shots, and overexposed frames
- Pure Keras/TensorFlow implementation, no external recognition APIs needed
Caveats
- Locked to Python 3.6, TensorFlow 1.15.2, Keras 2.3.1 — a dependency stack that is increasingly archaeological
- README is sparse: no training data details, no accuracy numbers, no setup instructions beyond version pinning
- If your input is already a cropped plate, you must resize it to ≤240×80 or the locator gets confused and degrades recognition
Verdict
Worth a look if you’re studying classical CV/ML hybrids or need an offline Chinese plate reader you can dissect. Skip it if you want production-ready code with modern dependencies, or if you need training reproducibility — the CSDN blog link is your only deep dive.