Darayut/khmer-textline-dataset
Synthetic Khmer Document Text-Line Detection Dataset Synthetic dataset for single-class text-line detection on Cambodian (Khmer) official documents — press releases, ministry letters, formal memos. Generated with a procedural Pillow-based pipeline featuring: 8 layout templates (standard, letter, announcement, report, sparse, two-column, memo, plain) 12 page sizes from A5 to A4-landscape Variable margins, font sizes, line spacing, and indentation Photometric augmentations… See the full description on the dataset page: https://huggingface.co/datasets/Darayut/khmer-textline-dataset.
Synthetic Khmer Document Text-Line Detection Dataset
Synthetic dataset for single-class text-line detection on Cambodian (Khmer) official documents — press releases, ministry letters, formal memos.
Generated with a procedural Pillow-based pipeline featuring:
- 8 layout templates (standard, letter, announcement, report, sparse, two-column, memo, plain)
- 12 page sizes from A5 to A4-landscape
- Variable margins, font sizes, line spacing, and indentation
- Photometric augmentations (brightness, blur, noise, JPEG, shadow, vignette, fold/crease)
Class
Dataset statistics
Schema
{
"image": Image(),
"image_id": Value("string"), # e.g. "kh_doc_000042"
"split": Value("string"), # "train" | "val"
"width": Value("int32"),
"height": Value("int32"),
"annotations": Sequence({
"bbox": Sequence(Value("float32"), length=4), # [cx,cy,w,h] normalised
"cls_id": Value("int32"), # always 0
}),
}Load with HF Datasets
from datasets import load_dataset
ds = load_dataset("Darayut/khmer-textline-dataset")
sample = ds["train"][0]
print(sample["image"]) # PIL Image
print(sample["annotations"]) # dict of listsRaw YOLO files
data/yolo_raw.zip contains the native YOLO directory layout (images/, labels/, dataset.yaml) for direct Ultralytics training:
from huggingface_hub import hf_hub_download
import zipfile, pathlib
zip_path = hf_hub_download(
repo_id = "Darayut/khmer-textline-dataset",
filename = "data/yolo_raw.zip",
repo_type = "dataset",
)
with zipfile.ZipFile(zip_path) as zf:
zf.extractall("./khmer_doc_yolo")
# yolo train data=khmer_doc_yolo/dataset.yaml model=yolo11n.pt