Datasets:
image imagewidth (px) 64 64 | text stringclasses 32
values |
|---|---|
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α | |
α |
Khmer Character OCR Dataset
Published dataset: mormleapsovann/kscript-khmer-ocr
This dataset contains 12,800 labeled 64Γ64 PNG images for character-level Khmer OCR. It covers 32 Khmer characters with 400 images per character. Each example pairs one image with its UTF-8 text label.
Dataset structure
The source annotations in this project are in datasets/labels.csv with columns:
| Column | Type | Description |
|---|---|---|
filename |
string | Image filename under datasets/images/ |
text |
string | Khmer character transcription |
publish.py generates datasets/images/metadata.jsonl from the CSV. For Hub upload, it stages a root-level metadata.jsonl and shards the images into subdirectories so no directory exceeds the Hub's 10,000-file limit. Each manifest record contains file_name and text, which ImageFolder loads as image and text features.
Load the dataset
from datasets import load_dataset
dataset = load_dataset("mormleapsovann/kscript-khmer-ocr")
Install the reader with pip install datasets.
To load the files directly from a local checkout instead, use
load_dataset("imagefolder", data_dir="datasets/images").
Validate and publish
The preparation/publishing script uses only the Python standard library to validate the annotations and generate the manifest. It uploads only when --repo-id is provided.
# Validate files and prepare datasets/images/metadata.jsonl without uploading
python publish.py
# Install the upload dependency
python -m pip install huggingface_hub
# Create a new private dataset repository (default; existing visibility is unchanged)
python publish.py --repo-id mormleapsovann/kscript-khmer-ocr
# Explicitly publish to a public dataset repository
python publish.py --repo-id mormleapsovann/kscript-khmer-ocr --public
Authenticate with hf auth login or set HF_TOKEN before uploading. The token is read by the Hugging Face client; do not put it in this repository.
Dataset details
- Task: character-level image-to-text recognition
- Language: Khmer (
km) - Format: PNG images and UTF-8 character labels
- Label balance: 32 classes, 400 images per class
- Splits: no train/validation/test split is provided
The dataset does not define a split or claim coverage beyond the 32 included characters. Create evaluation splits that fit your use case and avoid treating images from the same source or writer as independent if they are correlated.
Source, privacy, and licensing
The repository currently declares the MIT license. Confirm that you have the right to redistribute all images and labels under that license before publishing. Document the data source and collection or generation process here. Review images for personal, sensitive, or otherwise restricted content before making the repository public.
- Downloads last month
- 81