Datasets:
Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
annotations_creators:
|
3 |
+
- manual
|
4 |
+
language:
|
5 |
+
- pt
|
6 |
+
- en
|
7 |
+
license: mit
|
8 |
+
multilinguality: monolingual
|
9 |
+
pretty_name: Portuguese OCR Dataset Full
|
10 |
+
size_categories:
|
11 |
+
- 1K<n<10K
|
12 |
+
task_categories:
|
13 |
+
- image-to-text
|
14 |
+
tags:
|
15 |
+
- ocr
|
16 |
+
- Portuguese
|
17 |
+
---
|
18 |
+
# Portugues OCR Dataset
|
19 |
+
|
20 |
+
## Overview
|
21 |
+
|
22 |
+
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.
|
23 |
+
|
24 |
+
## Dataset Description
|
25 |
+
|
26 |
+
The dataset consists of:
|
27 |
+
|
28 |
+
- **Images**: Each image is a cropped portion of the text, rendered in Portuguese.
|
29 |
+
- **Labels**: Each image has an associated text file that contains the corresponding text of the image.
|
30 |
+
|
31 |
+
The dataset contains a total of **10,000 samples**, each consisting of:
|
32 |
+
|
33 |
+
- An image of the text
|
34 |
+
- A text label in a `.txt` file
|
35 |
+
|
36 |
+
The text is a subset of *Os Lusíadas*, and each image corresponds to a single line or fragment from the poem.
|
37 |
+
|
38 |
+
## Data Structure
|
39 |
+
|
40 |
+
The dataset is organized as follows:
|
41 |
+
|
42 |
+
```
|
43 |
+
portugues_ocr_dataset_full/
|
44 |
+
│
|
45 |
+
├── images/ # Directory containing all the image files.
|
46 |
+
│ └── sample_0.png # Example image file
|
47 |
+
│ └── sample_1.png # Example image file
|
48 |
+
│ └── ...
|
49 |
+
│
|
50 |
+
└── labels/ # Directory containing all the label text files.
|
51 |
+
└── sample_0.txt # Example label file for sample_0.png
|
52 |
+
└── sample_1.txt # Example label file for sample_1.png
|
53 |
+
└── ...
|
54 |
+
```
|
55 |
+
|
56 |
+
### Image Details
|
57 |
+
|
58 |
+
- **Size**: 1200 x 100 pixels per image
|
59 |
+
- **Color**: RGB (white background with black text)
|
60 |
+
- **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.
|
61 |
+
|
62 |
+
### Text Details
|
63 |
+
|
64 |
+
- **Language**: Portuguese
|
65 |
+
- **Content**: The text consists of lines from *Os Lusíadas* by Luís Vaz de Camões.
|
66 |
+
- **Length**: The lines in the dataset have lengths between 30 and 46 characters.
|
67 |
+
|
68 |
+
## Usage
|
69 |
+
|
70 |
+
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.
|
71 |
+
|
72 |
+
### Loading the Dataset
|
73 |
+
|
74 |
+
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:
|
75 |
+
|
76 |
+
```python
|
77 |
+
from datasets import load_dataset
|
78 |
+
|
79 |
+
dataset = load_dataset('path/to/portugues_ocr_dataset_full')
|
80 |
+
```
|
81 |
+
|
82 |
+
Make sure the dataset is available on your local machine or properly uploaded to a data hub for remote access.
|
83 |
+
|
84 |
+
## License
|
85 |
+
|
86 |
+
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.
|
87 |
+
|
88 |
+
## Citation
|
89 |
+
|
90 |
+
If you use this dataset in your research, please cite the original work:
|
91 |
+
|
92 |
+
- Luís Vaz de Camões, *Os Lusíadas*, 1556.
|