Datasets:
File size: 3,735 Bytes
cb455f4 9c3e667 cb455f4 bac2ef7 cb455f4 ffadc71 cb455f4 c7df81c cb455f4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | ---
license: mit
language:
- ar
tags:
- ocr
- arabic-ocr
- word-level-ocr
- large-dataset
pretty_name: Alshams, Large Arabic OCR dataset at word level.
---
# ocr-data
Alshams, The largest Arabic OCR dataset at the word level.
This dataset is specifically designed for **fine-grained word-level OCR tasks**, providing **precise word-level bounding box annotations** for each image.
Each word is annotated with **pixel-accurate localization**, enabling tasks such as text detection, text recognition, and end-to-end OCR.
This repository currently provides an **Arabic OCR dataset**.

---
## π¦ Available Datasets
The technical specifications of each dataset are listed in the table below.
| Language | Version | Link | Pages Count | Unique Words | Fonts Count | Full Dataset Link |
|----------|-----------------|----------------------|--------------|--------------|--------------|-------------------|
| 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: craneset[at]outlook.com [not free] |
| 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: craneset[at]outlook.com [not free] |
*The total dataset in Arabic is over 1M pages and 6 separate fonts.<br>
*See the sample folder for examples of each font.<br>
*The count of unique words after removing numbers and punctuation has been calculated.
---
## π Dataset Structure
The dataset is organized into three main directories at the root level:
```
ocr-data/
βββ images/
βββ labels/
βββ texts/
```
---
### π· images/
- Contains OCR images in **PNG** format.
- Each image has a corresponding **JSON annotation file** with the same base filename.
- The JSON file precisely defines the location of each word in the image.
### π· labels/
- Contains **JSON annotation files** corresponding to the images.
- Each JSON file shares the same base filename as its related image.
- These files define **word-level annotations** with exact bounding box coordinates.
- The annotation structure is identical to the JSON format described in the `images/` section.
JSON Annotation Format (per image)
```python
import json
with open(path_image_label, 'r', encoding='utf-8') as f:
data = json.load(f)
```
```json
{
"0": {
"word": "ΩΩΩ
Ψ©",
"location": {
"x": 3927,
"y": 481,
"w": 397,
"h": 170
}
},
"1": {
"word": "ΨΉΨ±Ψ¨ΩΨ©",
"location": {
"x": 3544,
"y": 481,
"w": 355,
"h": 170
}
}
}
```
- `word`: The recognized word in the image.
- `location`: Bounding box of the word:
- `x`, `y`: Top-left corner coordinates
- `w`, `h`: Width and height of the bounding box
---
### π texts/
- Contains **TXT** files.
- Each text file corresponds to an image.
- Stores the **continuous (full) text** related to the image content.
---
## π Roadmap
- [x] Arabic OCR Dataset
- [ ] English OCR Dataset
- [ ] German OCR Dataset
- [ ] Italian OCR Dataset
- [ ] Spanish OCR Dataset
---
## π License
Please check the `LICENSE` file for usage terms and conditions.
---
## π€ Contributing
Contributions, issues, and feature requests are welcome. Feel free to open an issue or submit a pull request.
---
## π¬ Contact
For access requests or questions, please open an issue in this repository.
|