TrueWatch ANPR — fine-tuned Devanagari plate recogniser
A text-recognition model fine-tuned from the pretrained devanagari_PP-OCRv5_mobile_rec (Apache-2.0) recognition head, on a synthetically rendered corpus of Nepali (Devanagari-script) vehicle plates. It reads ONE rectified text line and returns its string: Nepali plates are two-line, so the pipeline (edge/anpr/rectify.py) splits each plate into its lines first and joins the results. It does not detect or locate plates in a full scene.
Training data
- 20,500 synthetically rendered plate images (
datasets/plates/gen_plates.py, seed 42) with the generator's own train/validation split; training used per-line crops cut by the same line-splitting code the pipeline runs at inference. Later rounds add plates rendered in 44 open-licence Devanagari fonts (fonts that draw Devanagari digits with Latin shapes are rejected automatically) and in the layouts photographed plates actually use: red two-line plates with zone, lot and class on the top line, one-line plates, and two- and three-line province plates. Plates that did not split were skipped, never mislabelled. - Real photographs: line crops of hand-transcribed plates (each read independently where possible) and of repeat views of those plates matched to their verified text, from the Kaggle dataset
ishworsubedii/vehicle-number-plate-datasetnepal(Apache-2.0) and a training subset of the Hugging Face datasetmukulboro/nepali-private-license-plates(CC BY 4.0, Kathmandu University parking-lot photographs). Real test plates were never trained on; training plates whose text matched a test plate were removed. - Real photographs from three Roboflow Universe datasets, each CC BY 4.0:
sushant-kvyez/license-plate-s8svk(v11),prajwal-ghimire-tngts/nepali-characters-detection(v8) andcollege-fyp-ewmvi/license-plate-detection-system-nktef(v4). Their character boxes were turned into line transcriptions, kept only when they parse as a valid Nepali registration, and de-duplicated by image hash (3,239 lines from 1,853 plates); plates with ambiguous embossed-series characters were excluded. - Inline-header province plates (a small province header above the registration) rendered synthetically, plus crops of those headers, so the header is read on its own.
- Synthetic plates follow a documented specification. The corpus's composition (zone codes, vehicle-class letters, colour series) follows a documented specification with several fields explicitly marked unverified against a primary source — see this model's source repository, https://github.com/0XSreekar/True-Watch-AI,
datasets/plates/plates.yamlandDATASET_SPEC.md.
Metrics
Measured with the source repository's edge/anpr/evaluate.py (the full pipeline: line splitting, levelling, grammar routing). Exact-match and CER are never blended across synthetic and real data. Sample counts are small; treat differences of a few points as noise.
Synthetic validation split (2,076 images, same split for every row)
| Exact-match | Mean CER | |
|---|---|---|
Pretrained baseline (devanagari_PP-OCRv5_mobile_rec, no fine-tune) | 41.38% | 0.3783 |
| This model | 88.01% | 0.0517 |
| Latin-only OCR baseline, same images | 0.00% | 1.0061 |
Real photographs (held out)
Strict and extended: distinct vehicles from mukulboro/nepali-private-license-plates (CC BY 4.0), each transcribed independently twice; strict keeps plates both readings agreed on exactly and confidently, extended keeps every exact agreement; one crop per vehicle; none of these plate texts occurs in the training data. Roboflow held-out: the test splits of the three Roboflow sets, restricted to the 114 plates whose registration text does not occur anywhere in the training lines (94 of the 208 test photographs show a vehicle that also appears in training, and are excluded here).
| Real, strict (57) | Real, extended (147) | Roboflow held-out (114) | |
|---|---|---|---|
| Previous published model (revision 5e35fd9) | 42.11% / 0.304 | 27.89% / 0.351 | 59.65% / 0.125 |
| This model | 52.63% / 0.262 | 38.78% / 0.304 | 72.81% / 0.105 |
(exact-match / mean CER). A sibling checkpoint trained without the province-header data scored 49.12% / 34.01% / 78.07% on the same three sets; this one was published because it is better on both fully independent sets.
Real-world accuracy is far below the synthetic figure and below the 85% target the project set itself: this is not yet a reliable reader of real plates, and the synthetic number above must not be read as one.
Intended use
Recognition-only stage of an automatic number-plate reading pipeline for Devanagari-script plates, run after a separate plate-detection and rectification step (this model does not locate plates in an image). Built for the TrueWatch border-post monitoring project.
License
Apache-2.0, inherited from the base model devanagari_PP-OCRv5_mobile_rec (PaddleOCR, Apache-2.0). This repository contains only the fine-tuned weights and inference config, no code beyond the standard PaddleOCR inference format.
Source
Training and evaluation code: https://github.com/0XSreekar/True-Watch-AI, edge/anpr/.