thai-license-plate-ocr / README.en.md
morsechim's picture
add docs english version
0d0d74d

🇹🇭 ภาษาไทย

Thai License Plate OCR Dataset 🇹🇭

Language: Thai 🇹🇭
Task: Optical Character Recognition (OCR)

This is a Thai-language OCR dataset built specifically for use with the PaddleOCR-rec module. It is designed to train text recognition models that can read vehicle license plates in Thailand, including both license numbers and province names.

⚠️ This dataset is intended exclusively for use with PaddleOCR-rec. It does not include detection or classification annotations.


Dataset Structure

thai-license-ocr-dataset/
├── images/           # All images
├── train.txt         # Training data
├── val.txt           # Validation data
├── test.txt          # Test data
├── th_dict.txt       # Thai dictionary for PaddleOCR
└── README.md         # Dataset description

Each line in *.txt follows the format:

images/img_0001.jpg    <text label>

Dataset Details

The original data is a character-level object detection dataset for Thai license plates.
We restructured and converted it to a sequence-level OCR dataset suitable for PaddleOCR-rec, with the following steps:

  • Character bounding boxes were detected using a fine-tuned YOLOv11 detection model trained on the original dataset
  • Character boxes were sorted left-to-right and filtered to retain only relevant classes
  • Regex and province-code mappings were applied for verification
  • Line 1 and line 2 of each license plate were separated logically
  • Data was exported in <image_path> <label> format compatible with PaddleOCR-rec

🔗 Raw Detection Dataset

Roboflow: LPR Plate Thai (by billy-h0ini)


Usage Example (Training with PaddleOCR)

python tools/train.py \
  -c configs/rec_svtr_th.yml \
  -o Train.dataset.data_dir="./thai-license-ocr-dataset/" \
     Train.dataset.label_file_list=["train.txt"] \
     Global.character_dict_path="./thai-license-ocr-dataset/th_dict.txt"

👤 Attribution


🛡️ License

Creative Commons Attribution 4.0 International (CC BY 4.0)
You are free to use, modify, and redistribute this dataset for any purpose, including commercial use, provided that appropriate credit is given to the original authors.