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|
+
- word-level-ocr
|
| 9 |
+
- large-dataset
|
| 10 |
+
pretty_name: alshams
|
| 11 |
+
---
|
| 12 |
+
# ocr-data
|
| 13 |
+
|
| 14 |
+
Al-Shams is a 1M pages word-level OCR dataset.
|
| 15 |
+
|
| 16 |
+
This dataset is specifically designed for **fine-grained word-level OCR tasks**, providing **precise word-level bounding box annotations** for each image.
|
| 17 |
+
|
| 18 |
+
Each word is annotated with **pixel-accurate localization**, enabling tasks such as text detection, text recognition, and end-to-end OCR.
|
| 19 |
+
|
| 20 |
+
This repository currently provides an **Arabic OCR dataset**.
|
| 21 |
+
|
| 22 |
+

|
| 23 |
+
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+
## π¦ Available Datasets
|
| 27 |
+
|
| 28 |
+
The technical specifications of each dataset are listed in the table below.
|
| 29 |
+
|
| 30 |
+
| Language | Version | Link | Pages Count | Unique Words | Fonts Count | Full Dataset Link |
|
| 31 |
+
|----------|-----------------|----------------------|--------------|--------------|--------------|-------------------|
|
| 32 |
+
| Arabic | v1.0 | [Gdrive (only 25k pages) ](https://drive.google.com/file/d/1PZ2VmHQBOPTrMpBf8ZFKSBjQFmcqPu1f/view?usp=drive_link) | ~521K | 3012869 | 1 | To obtain the full dataset, please contact us at: deepcolab01[at]gmail.com [not free] |
|
| 33 |
+
| Arabic | v2.0 | [Gdrive (only 13k pages) ](https://drive.google.com/file/d/11YzGrGmAjJTFY-hX2KGQJktK2peQhhbd/view?usp=drive_link) | ~534K | 2502545 | 5 | To obtain the full dataset, please contact us at: deepcolab01[at]gmail.com [not free] |
|
| 34 |
+
|
| 35 |
+
*The total dataset in Arabic is over 1M pages and 6 separate fonts.<br>
|
| 36 |
+
*See the sample folder for examples of each font.<br>
|
| 37 |
+
*The count of unique words after removing numbers and punctuation has been calculated.
|
| 38 |
+
|
| 39 |
+
---
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
## π Dataset Structure
|
| 43 |
+
|
| 44 |
+
The dataset is organized into three main directories at the root level:
|
| 45 |
+
|
| 46 |
+
```
|
| 47 |
+
ocr-data/
|
| 48 |
+
βββ images/
|
| 49 |
+
βββ labels/
|
| 50 |
+
βββ texts/
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
---
|
| 54 |
+
|
| 55 |
+
### π· images/
|
| 56 |
+
|
| 57 |
+
- Contains OCR images in **PNG** format.
|
| 58 |
+
- Each image has a corresponding **JSON annotation file** with the same base filename.
|
| 59 |
+
- The JSON file precisely defines the location of each word in the image.
|
| 60 |
+
|
| 61 |
+
### π· labels/
|
| 62 |
+
|
| 63 |
+
- Contains **JSON annotation files** corresponding to the images.
|
| 64 |
+
- Each JSON file shares the same base filename as its related image.
|
| 65 |
+
- These files define **word-level annotations** with exact bounding box coordinates.
|
| 66 |
+
- The annotation structure is identical to the JSON format described in the `images/` section.
|
| 67 |
+
|
| 68 |
+
JSON Annotation Format (per image)
|
| 69 |
+
|
| 70 |
+
```python
|
| 71 |
+
import json
|
| 72 |
+
with open(path_image_label, 'r', encoding='utf-8') as f:
|
| 73 |
+
data = json.load(f)
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
```json
|
| 77 |
+
{
|
| 78 |
+
"0": {
|
| 79 |
+
"word": "ΩΩΩ
Ψ©",
|
| 80 |
+
"location": {
|
| 81 |
+
"x": 3927,
|
| 82 |
+
"y": 481,
|
| 83 |
+
"w": 397,
|
| 84 |
+
"h": 170
|
| 85 |
+
}
|
| 86 |
+
},
|
| 87 |
+
"1": {
|
| 88 |
+
"word": "ΨΉΨ±Ψ¨ΩΨ©",
|
| 89 |
+
"location": {
|
| 90 |
+
"x": 3544,
|
| 91 |
+
"y": 481,
|
| 92 |
+
"w": 355,
|
| 93 |
+
"h": 170
|
| 94 |
+
}
|
| 95 |
+
}
|
| 96 |
+
}
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
- `word`: The recognized word in the image.
|
| 100 |
+
- `location`: Bounding box of the word:
|
| 101 |
+
- `x`, `y`: Top-left corner coordinates
|
| 102 |
+
- `w`, `h`: Width and height of the bounding box
|
| 103 |
+
|
| 104 |
+
---
|
| 105 |
+
|
| 106 |
+
|
| 107 |
+
### π texts/
|
| 108 |
+
|
| 109 |
+
- Contains **TXT** files.
|
| 110 |
+
- Each text file corresponds to an image.
|
| 111 |
+
- Stores the **continuous (full) text** related to the image content.
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
---
|
| 115 |
+
|
| 116 |
+
## π Roadmap
|
| 117 |
+
|
| 118 |
+
- [x] Arabic OCR Dataset
|
| 119 |
+
- [ ] English OCR Dataset
|
| 120 |
+
- [ ] German OCR Dataset
|
| 121 |
+
- [ ] Italian OCR Dataset
|
| 122 |
+
- [ ] Spanish OCR Dataset
|
| 123 |
+
|
| 124 |
+
---
|
| 125 |
+
|
| 126 |
+
## π License
|
| 127 |
+
|
| 128 |
+
Please check the `LICENSE` file for usage terms and conditions.
|
| 129 |
+
|
| 130 |
+
---
|
| 131 |
+
|
| 132 |
+
## π€ Contributing
|
| 133 |
+
|
| 134 |
+
Contributions, issues, and feature requests are welcome. Feel free to open an issue or submit a pull request.
|
| 135 |
+
|
| 136 |
+
---
|
| 137 |
+
|
| 138 |
+
## π¬ Contact
|
| 139 |
+
|
| 140 |
+
For access requests or questions, please open an issue in this repository.
|
| 141 |
+
|