craneset commited on
Commit
cb455f4
Β·
verified Β·
1 Parent(s): 6fbe56b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +141 -3
README.md CHANGED
@@ -1,3 +1,141 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - ar
5
+ tags:
6
+ - ocr
7
+ - arabic-ocr
8
+ - 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
+ ![OCR Sample](sample/showpage.png)
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
+