--- dataset_info: features: - name: text dtype: string - name: image dtype: image - name: font_path dtype: string - name: bg_color list: int64 - name: font_color dtype: string - name: font_size dtype: int64 - name: image_width dtype: int64 - name: image_height dtype: int64 - name: image_dpi dtype: int64 - name: text_vertical_alignment dtype: string - name: text_horizontal_alignment dtype: string splits: - name: train num_bytes: 1618863509 num_examples: 64261 - name: test num_bytes: 202367385 num_examples: 8033 - name: validation num_bytes: 202367385 num_examples: 8033 download_size: 1958221906 dataset_size: 2023598279 configs: - config_name: default data_files: - split: train path: data/train-* - split: test path: data/test-* - split: validation path: data/validation-* license: apache-2.0 task_categories: - image-to-text language: - is size_categories: - n<1K tags: - ocr - synthetic-data - icelandic --- # Icelandic Synthetic OCR Dataset ## Dataset Description This dataset contains synthetically generated images of Icelandic text for Optical Character Recognition (OCR) tasks. It was created to address the lack of publicly available, large-scale OCR datasets for the Icelandic language. The images are generated from a corpus of Icelandic text, rendered with various settings to create a diverse set of training examples. The key feature of this dataset is its focus on Icelandic, including all special characters such as `ð, þ, æ, ö, á, é, í, ó, ú`. ## Project Status: Work in Progress This is an ongoing project. The dataset is currently under development, and future versions may include more variety in: * Fonts and text styles * Backgrounds and textures * Real-world augmentations (e.g., noise, blur, perspective distortion) Feedback and contributions are welcome. ## How to Use You can load the dataset from the Hugging Face Hub like this: ```python from datasets import load_dataset dataset = load_dataset("Sigurdur/isl_synthetic_ocr") ``` ## Dataset Structure ### Data Instances A typical data instance consists of an image and its corresponding ground truth text. ``` { 'image': , 'text': 'Íslenskur texti' } ``` ### Data Fields - `image`: A PIL image object containing the rendered text. - `text`: A string containing the ground truth text corresponding to the image. ### Data Splits This dataset does not have pre-defined train/validation/test splits. It is provided as a single collection of generated examples. Users are encouraged to create their own splits as needed for their specific use case. This is subject for change later in the development process. ## Dataset Creation ### Curation Rationale The primary motivation for creating this dataset was the scarcity of dedicated OCR training data for Icelandic. By synthetically generating images from a large text corpus, we can create a virtually unlimited amount of labeled data, which is crucial for training robust deep learning models for OCR. ### Source Data The text used for generating the images is sourced from the `arnastofnun/IGC-2024` dataset, specifically the `wiki` subset, which contains a large collection of Icelandic text. I chose the `wiki` subset because it contains many domain specific words. ### Generation Process The images were generated using a Python script leveraging the Pillow library. The script takes text from the source corpus and renders it onto a blank image. The generation process is configurable, allowing for variations in: - Image dimensions (`width`, `height`, `dpi`) - Font type, size, and color - Text alignment (horizontal and vertical) - Background color The code used for generation is available in the dataset repository. ## Limitations and Bias - **Synthetic Nature**: The images are "clean" and do not feature real-world distortions like noise, blur, perspective shifts, or varied lighting conditions. Fine-tuning on real-world data may be necessary for robust performance. - **Font Variety**: The dataset was generated using a limited set of fonts (e.g., Arial). OCR models trained on this data may not generalize well to documents with different or more stylized fonts. - **Text Corpus Bias**: The dataset inherits any biases present in the source `arnastofnun/IGC-2024`. The content is primarily from news and web text, and may not represent all styles of written Icelandic. ## Citation If you use this dataset in your research, please consider citing it: ```bibtex @misc{isl_synthetic_ocr, author = {Sigurdur Haukur Birgisson}, title = {Icelandic Synthetic OCR Dataset}, year = {2025}, publisher = {Hugging Face}, journal = {Hugging Face repository}, howpublished = {\url{https://huggingface.co/datasets/Sigurdur/isl_synthetic_ocr}} } ```