Datasets:
annotations_creators:
- manual
language:
- pt
- en
license: mit
multilinguality: monolingual
pretty_name: Portuguese OCR Dataset Full
size_categories:
- 1K<n<10K
task_categories:
- image-to-text
tags:
- ocr
- Portuguese
Portugues OCR Dataset
Overview
The portugues_ocr_dataset_full
is a dataset designed for Optical Character Recognition (OCR) tasks. It contains images of text from the Portuguese literary work Os Lusíadas by Luís Vaz de Camões, as well as the corresponding ground truth text labels. This dataset can be used for training and evaluating OCR models for Portuguese text recognition.
Dataset Description
The dataset consists of:
- Images: Each image is a cropped portion of the text, rendered in Portuguese.
- Labels: Each image has an associated text file that contains the corresponding text of the image.
The dataset contains a total of 10,000 samples, each consisting of:
- An image of the text
- A text label in a
.txt
file
The text is a subset of Os Lusíadas, and each image corresponds to a single line or fragment from the poem.
Data Structure
The dataset is organized as follows:
portugues_ocr_dataset_full/
│
├── images/ # Directory containing all the image files.
│ └── sample_0.png # Example image file
│ └── sample_1.png # Example image file
│ └── ...
│
└── labels/ # Directory containing all the label text files.
└── sample_0.txt # Example label file for sample_0.png
└── sample_1.txt # Example label file for sample_1.png
└── ...
Image Details
- Size: 1200 x 100 pixels per image
- Color: RGB (white background with black text)
- Font: The text is rendered using a font that supports Portuguese characters. The default font is NotoSerif-Regular.ttf, which can be replaced with other fonts if needed.
Text Details
- Language: Portuguese
- Content: The text consists of lines from Os Lusíadas by Luís Vaz de Camões.
- Length: The lines in the dataset have lengths between 30 and 46 characters.
Usage
You can use this dataset for training OCR models or for other tasks related to text recognition and language processing. The dataset provides both the images and the corresponding text, making it suitable for supervised learning tasks.
Loading the Dataset
You can easily load the dataset by using the provided loading script, or if you are using the Hugging Face Datasets library, you can directly load it using the following command:
from datasets import load_dataset
dataset = load_dataset('path/to/portugues_ocr_dataset_full')
Make sure the dataset is available on your local machine or properly uploaded to a data hub for remote access.
License
This dataset is derived from the text of Os Lusíadas, which is in the public domain. The images and data are also made available under an open license for research purposes.
Citation
If you use this dataset in your research, please cite the original work:
- Luís Vaz de Camões, Os Lusíadas, 1556.