Datasets:
Dataset Preview
The dataset viewer should be available soon. Please retry later.
image image |
|---|
End of preview.
Devanagari OCR Grapheme Dataset
This repository hosts a grapheme‑level OCR dataset for the Devanagari script. Each data point consists of an image of a single grapheme and its corresponding Unicode text.
Dataset Structure
.
├── data/ # Directory containing all PNG images (e.g., 00000.png, 00001.png, ...)
├── devanagari_ocr_graphemes.json # ShareGPT‑formatted JSON file
└── README.md # This file
data/– Images are stored in PNG format. The file name (e.g.,00000.png) uniquely identifies each grapheme.devanagari_ocr_graphemes.json– The dataset is provided in the ShareGPT format required by LLaMA‑Factory for multimodal supervised fine‑tuning.
ShareGPT Format
Each entry in devanagari_ocr_graphemes.json follows this schema:
[
{
"messages": [
{
"role": "user",
"content": "<image>OCR:"
},
{
"role": "assistant",
"content": "<grapheme text>"
}
],
"images": [
"data/00000.png"
]
},
...
]
- The
<image>tag in the user message signals that the subsequent image (listed underimages) should be used as input. - The assistant message contains the ground‑truth Unicode grapheme text.
- The number of
<image>tags must exactly match the number of entries in theimageslist.
Usage
- Clone the repository and install the required tools (e.g.,
huggingface_hub). - Load the dataset in your training script (e.g., with LLaMA‑Factory) by pointing to
devanagari_ocr_graphemes.jsonand ensuring thedata/folder is accessible. - Fine‑tune a multimodal model using the ShareGPT format; the model will learn to map the image of a Devanagari grapheme to its corresponding text.
License
The dataset is released under the CC‑BY‑4.0 license. Feel free to use, share, and adapt it, provided proper attribution is given.
Citation
If you use this dataset in a publication, please cite:
@dataset{devanagari_ocr_graphemes,
author = {Shubham Karampure et al.},
title = {Devanagari Grapheme OCR Dataset},
year = {2024},
url = {https://www.kaggle.com/datasets/shubhamkarampure/sanskrit-devanagari-graphemes},
license = {CC BY 4.0}
}
Enjoy training! 🎉
- Downloads last month
- 86