abdoelsayed commited on
Commit
c3c4b97
·
verified ·
1 Parent(s): ddba782

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +255 -49
README.md CHANGED
@@ -10,56 +10,262 @@ language:
10
  size_categories:
11
  - 10K<n<100K
12
  ---
13
- # [CORU: Comprehensive Post-OCR Parsing and Receipt Understanding Dataset]()
14
-
15
- In the fields of Optical Character Recognition (OCR) and Natural Language Processing (NLP), integrating multilingual capabilities remains a critical challenge, especially when considering languages with complex scripts such as Arabic. This paper introduces the Comprehensive Post-OCR Parsing and Receipt Understanding Dataset (CORU), a novel dataset specifically designed to enhance OCR and information extraction from receipts in multilingual contexts involving Arabic and English. CORU consists of over 20,000 annotated receipts from diverse retail settings in Egypt, including supermarkets and clothing stores, alongside 30,000 annotated images for OCR that were utilized to recognize each detected line, and 10,000 items annotated for detailed information extraction. These annotations capture essential details such as merchant names, item descriptions, total prices, receipt numbers, and dates. They are structured to support three primary computational tasks: object detection, OCR, and information extraction. We establish the baseline performance for a range of models on CORU to evaluate the effectiveness of traditional methods, like Tesseract OCR, and more advanced neural network-based approaches. These baselines are crucial for processing the complex and noisy document layouts typical of real-world receipts and for advancing the state of automated multilingual document processing.
16
- ## Dataset Overview
17
-
18
- CORU is divided into Three challenges:
19
-
20
- - **Key Information Detection.**
21
- - **Large-Scale OCR Dataset**
22
- - **Item Information Extraction**
23
- ### Dataset Statistics
24
-
25
- | Category | Training | Validation | Test |
26
- |----------------------|----------|------------|-------|
27
- | Object Detection | 12,600 | 3700 | 3700 |
28
- | OCR | 21,000 | 4,500 | 4,500 |
29
- | IE | 7000 | 1500 | 1500 |
30
- ## Sample Images from the Dataset
31
-
32
- Here are five examples from the dataset, showcasing the variety of receipts included:
33
-
34
- <img src="images/1.jpg" alt="Sample Image 1" width="200" height="300" align="left">
35
- <img src="images/2.jpg" alt="Sample Image 2" width="200" height="300" align="left">
36
- <img src="images/3.jpg" alt="Sample Image 3" width="200" height="300" align="left">
37
- <br clear="left">
38
-
39
- ## Download Links
40
- ### Key Information Detection
41
- - **Training Set**: [Download](https://huggingface.co/datasets/abdoelsayed/CORU/resolve/main/Receipt/train.zip?download=true)
42
- - **Validation Set**: [Download](https://huggingface.co/datasets/abdoelsayed/CORU/resolve/main/Receipt/val.zip?download=true)
43
- - **Test Set**: [Download](https://huggingface.co/datasets/abdoelsayed/CORU/resolve/main/Receipt/test.zip?download=true)
44
- ### OCR Dataset
45
- - **Training Set**: [Download](https://huggingface.co/datasets/abdoelsayed/CORU/resolve/main/OCR/train.zip?download=true)
46
- - **Validation Set**: [Download](https://huggingface.co/datasets/abdoelsayed/CORU/resolve/main/OCR/val.zip?download=true)
47
- - **Test Set**: [Download](https://huggingface.co/datasets/abdoelsayed/CORU/resolve/main/OCR/test.zip?download=true)
48
- ### Item Information Extraction
49
- - **Training Set**: [Download](https://huggingface.co/datasets/abdoelsayed/CORU/resolve/main/IE/train.csv?download=true)
50
- - **Validation Set**: [Download](https://huggingface.co/datasets/abdoelsayed/CORU/resolve/main/IE/val.csv?download=true)
51
- - **Test Set**: [Download](https://huggingface.co/datasets/abdoelsayed/CORU/resolve/main/IE/test.csv?download=true)
52
- ## Citation
53
-
54
- If you find these codes or data useful, please consider citing our paper as:
55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  ```
57
- @misc{abdallah2024coru,
58
- title={CORU: Comprehensive Post-OCR Parsing and Receipt Understanding Dataset},
59
- author={Abdelrahman Abdallah and Mahmoud Abdalla and Mahmoud SalahEldin Kasem and Mohamed Mahmoud and Ibrahim Abdelhalim and Mohamed Elkasaby and Yasser ElBendary and Adam Jatowt},
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  year={2024},
61
- eprint={2406.04493},
62
- archivePrefix={arXiv},
63
- primaryClass={cs.CV}
64
  }
65
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  size_categories:
11
  - 10K<n<100K
12
  ---
13
+ # ReceiptSense: Beyond Traditional OCR - A Dataset for Receipt Understanding
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
+ [![Paper](https://img.shields.io/badge/Paper-arXiv-red)](https://arxiv.org/abs/2406.04493)
16
+ [![Dataset](https://img.shields.io/badge/Dataset-HuggingFace-yellow)](https://huggingface.co/datasets/abdoelsayed/CORU)
17
+ [![License](https://img.shields.io/badge/License-MIT-blue)]()
18
+
19
+ ## 🔥 News
20
+ - **[2024]** ReceiptSense dataset is now publicly available!
21
+ - **[2024]** Paper accepted and published
22
+
23
+ ## 📖 Abstract
24
+
25
+ Multilingual OCR and information extraction from receipts remains challenging, particularly for complex scripts like Arabic. We introduce **ReceiptSense**, a comprehensive dataset designed for Arabic-English receipt understanding comprising:
26
+
27
+ - **20,000** annotated receipts from diverse retail settings
28
+ - **30,000** OCR-annotated images
29
+ - **10,000** item-level annotations
30
+ - **1,265** receipt images with **40 question-answer pairs each** for Receipt QA
31
+
32
+ The dataset captures merchant names, item descriptions, prices, receipt numbers, and dates to support object detection, OCR, information extraction, and question-answering tasks. We establish baseline performance using traditional methods (Tesseract OCR) and advanced neural networks, demonstrating the dataset's effectiveness for processing complex, noisy real-world receipt layouts.
33
+
34
+ ## 🎯 Key Features
35
+
36
+ ### ✨ **Multilingual Support**
37
+ - **Arabic-English** bilingual receipts
38
+ - Real-world mixed-language content
39
+ - Complex script handling for Arabic text
40
+
41
+ ### 📊 **Comprehensive Annotations**
42
+ - **Object Detection**: Bounding boxes for key receipt elements
43
+ - **OCR**: Character and word-level text recognition
44
+ - **Information Extraction**: Structured data extraction
45
+ - **Receipt QA**: Question-answering capabilities
46
+
47
+ ### 🏪 **Diverse Retail Environments**
48
+ - Supermarkets and grocery stores
49
+ - Restaurants and cafes
50
+ - Clothing and retail shops
51
+ - Various geographical regions
52
+
53
+ ### 🔧 **Real-world Challenges**
54
+ - Noisy and degraded image quality
55
+ - Complex receipt layouts
56
+ - Mixed fonts and orientations
57
+ - Authentic retail scenarios
58
+
59
+ ## 📈 Dataset Statistics
60
+
61
+ | Component | Training | Validation | Test | Total |
62
+ |-----------|----------|------------|------|-------|
63
+ | **Key Information Detection** | 12,600 | 3,700 | 3,700 | **20,000** |
64
+ | **OCR Dataset** | 21,000 | 4,500 | 4,500 | **30,000** |
65
+ | **Item Information Extraction** | 7,000 | 1,500 | 1,500 | **10,000** |
66
+ | **Receipt QA** | - | - | 1,265 | **1,265** |
67
+
68
+ ### Language Distribution
69
+ - **Arabic**: 53.6%
70
+ - **English**: 26.2%
71
+ - **Mixed Language**: 20.3%
72
+
73
+ ### Receipt QA Coverage
74
+ - **Merchant/Payment/Date Metadata**: 30%
75
+ - **Item-level Information**: 50%
76
+ - **Tax/Total/Payment Details**: 20%
77
+
78
+ ## 🖼️ Sample Images
79
+
80
+ <div align="center">
81
+
82
+ | Sample 1 | Sample 2 | Sample 3 | Sample 4 | Sample 5 |
83
+ |----------|----------|----------|----------|----------|
84
+ | <img src="images/0cf392e3-e6bf-4bd7-85d5-7f91c73cdcaf.jpg" width="150" height="200"> | <img src="images/0dccefa6-6928-499e-8aae-15c04d18cc94.jpg" width="150" height="200"> | <img src="images/0dd4ada2-681e-42e7-b398-e093bc8b81c3.jpg" width="150" height="200"> | <img src="images/0ef51dc7-4a0a-47e6-bc59-41f609d1c98d.jpg" width="150" height="200"> | <img src="images/0f369dc1-1c5b-41b1-97bc-c9b94d53cd40.jpg" width="150" height="200"> |
85
+
86
+ *Examples of annotated receipt images showcasing the variety of formats, languages, and complex text layouts*
87
+
88
+ </div>
89
+
90
+ ## 🎯 Supported Tasks
91
+
92
+ ### 1. 🎯 **Key Information Detection**
93
+ Extract essential receipt information including:
94
+ - Merchant names
95
+ - Transaction dates
96
+ - Receipt numbers
97
+ - Item lists and descriptions
98
+ - Total amounts
99
+
100
+ ### 2. 🔍 **OCR (Optical Character Recognition)**
101
+ Box-level text annotations for:
102
+ - Multilingual text recognition
103
+ - Complex layout understanding
104
+ - Noisy image processing
105
+
106
+ ### 3. 📝 **Information Extraction**
107
+ Detailed item-level analysis:
108
+ - Item names and descriptions
109
+ - Prices and quantities
110
+ - Categories and classifications
111
+ - Brands and packaging information
112
+
113
+ ### 4. ❓ **Receipt Question Answering**
114
+ Comprehensive QA capabilities covering:
115
+ - Receipt metadata queries
116
+ - Item-specific questions
117
+ - Transaction summary questions
118
+ - Payment and tax information
119
+
120
+ ## 📥 Download Links
121
+
122
+ ### 🎯 Key Information Detection
123
+ - **Training Set**: [Download (12.6K images)](https://huggingface.co/datasets/abdoelsayed/CORU/resolve/main/Receipt/train.zip?download=true)
124
+ - **Validation Set**: [Download (3.7K images)](https://huggingface.co/datasets/abdoelsayed/CORU/resolve/main/Receipt/val.zip?download=true)
125
+ - **Test Set**: [Download (3.7K images)](https://huggingface.co/datasets/abdoelsayed/CORU/resolve/main/Receipt/test.zip?download=true)
126
+
127
+ ### 🔍 OCR Dataset
128
+ - **Training Set**: [Download (21K images)](https://huggingface.co/datasets/abdoelsayed/CORU/resolve/main/OCR/train.zip?download=true)
129
+ - **Validation Set**: [Download (4.5K images)](https://huggingface.co/datasets/abdoelsayed/CORU/resolve/main/OCR/val.zip?download=true)
130
+ - **Test Set**: [Download (4.5K images)](https://huggingface.co/datasets/abdoelsayed/CORU/resolve/main/OCR/test.zip?download=true)
131
+
132
+ ### 📝 Item Information Extraction
133
+ - **Training Set**: [Download (7K items)](https://huggingface.co/datasets/abdoelsayed/CORU/resolve/main/IE/train.csv?download=true)
134
+ - **Validation Set**: [Download (1.5K items)](https://huggingface.co/datasets/abdoelsayed/CORU/resolve/main/IE/val.csv?download=true)
135
+ - **Test Set**: [Download (1.5K items)](https://huggingface.co/datasets/abdoelsayed/CORU/resolve/main/IE/test.csv?download=true)
136
+
137
+ ### ❓ Receipt Question Answering
138
+ - **Test Set**: [Download (1,265 receipts with 50.6K QA pairs)](https://huggingface.co/datasets/abdoelsayed/CORU/resolve/main/QA/test.zip?download=true)
139
+
140
+ > ⚠️ **Note**: All receipt datasets have been updated to include PII-redacted versions for privacy protection.
141
+
142
+ ## 🏆 Baseline Results
143
+
144
+ ### Object Detection Performance
145
+ | Model | Backbone | Precision | Recall | mAP50 | mAP50-95 |
146
+ |-------|----------|-----------|--------|-------|----------|
147
+ | **YOLOv7** | - | **76.0%** | **85.6%** | **79.2%** | 43.7% |
148
+ | YOLOv8 | - | 74.6% | 81.0% | 76.1% | 45.3% |
149
+ | YOLOv9 | - | 75.7% | 83.4% | 77.9% | **46.7%** |
150
+ | DINO | Swin-T | - | - | - | **32.2%** (Avg IoU) |
151
+
152
+ ### OCR Performance
153
+ | Model | CER ↓ | WER ↓ |
154
+ |-------|-------|-------|
155
+ | Tesseract | 15.56% | 30.78% |
156
+ | Attention-Gated CNN-BiGRU | 14.85% | 27.22% |
157
+ | Our OCR Model | 7.83% | 27.24% |
158
+ | **Azura OCR** | **6.39%** | **25.97%** |
159
+
160
+ ### Receipt QA Performance
161
+ | Model | Precision | Recall | Exact Match | Contains |
162
+ |-------|-----------|--------|-------------|----------|
163
+ | **GPT-4o** | **37.7%** | **36.4%** | **35.0%** | **29.1%** |
164
+ | Llama3.2 (11B) | 32.6% | 31.3% | 31.6% | 25.9% |
165
+ | Phi3.5 | 28.4% | 29.1% | 28.8% | 23.7% |
166
+ | Internvl2 (8B) | 24.2% | 23.8% | 23.1% | 19.4% |
167
+
168
+ ## 🚀 Getting Started
169
+
170
+ ### Quick Start
171
+ ```python
172
+ # Install required packages
173
+ pip install datasets transformers torch
174
+
175
+ # Load the dataset
176
+ from datasets import load_dataset
177
+
178
+ # Load Receipt QA dataset
179
+ qa_dataset = load_dataset("abdoelsayed/CORU", "qa")
180
+
181
+ # Load OCR dataset
182
+ ocr_dataset = load_dataset("abdoelsayed/CORU", "ocr")
183
+
184
+ # Load Information Extraction dataset
185
+ ie_dataset = load_dataset("abdoelsayed/CORU", "ie")
186
+ ```
187
+
188
+ ### Dataset Structure
189
  ```
190
+ ReceiptSense/
191
+ ├── Receipt/ # Key Information Detection
192
+ │ ├── images/ # Receipt images
193
+ │ └── annotations/ # YOLO/COCO format annotations
194
+ ├── OCR/ # OCR Dataset
195
+ │ ├── images/ # Text line images
196
+ │ └── labels/ # Character annotations
197
+ ├── IE/ # Information Extraction
198
+ │ └── data.csv # Structured item data
199
+ └── QA/ # Receipt Question Anshwering
200
+ ├── images/ # Receipt images
201
+ └── qa_pairs.json # Question-answer pairs
202
+ ```
203
+
204
+ ## 🔬 Applications
205
+
206
+ - **💳 Expense Management**: Automated expense tracking and categorization
207
+ - **📦 Inventory Management**: Real-time inventory updates from receipt data
208
+ - **🏪 Retail Analytics**: Customer behavior and purchasing pattern analysis
209
+ - **🤖 Document AI**: Multilingual document understanding systems
210
+ - **📱 Mobile Apps**: Receipt scanning and digitization applications
211
+
212
+ ## 🤝 Comparison with Existing Datasets
213
+
214
+ | Dataset | Images | Categories | Languages | Item IE | Receipt QA | Year |
215
+ |---------|--------|------------|-----------|---------|------------|------|
216
+ | SROIE | 1,000 | 4 | English | ✓ | ✗ | 2019 |
217
+ | CORD | 1,000 | 8 | English | ✓ | ✗ | 2019 |
218
+ | MC-OCR | 2,436 | 4 | EN + Vietnamese | ✓ | ✗ | 2021 |
219
+ | UIT | 2,147 | 4 | EN + Vietnamese | ✓ | ✗ | 2022 |
220
+ | **ReceiptSense** | **20,000** | **5** | **Arabic + English** | **✓** | **✓** | **2024** |
221
+
222
+ ## 🏛️ Ethics and Privacy
223
+
224
+ - All receipts collected with explicit user consent through the DISCO application
225
+ - Comprehensive 4-step PII redaction process implemented
226
+ - Privacy protocols strictly followed during data collection
227
+ - Independent verification and cross-checking procedures
228
+
229
+ ## 👥 Authors
230
+
231
+ **Abdelrahman Abdallah¹**, **Mahmoud Abdalla²**, **Mahmoud SalahEldin Kasem²**, **Mohamed Mahmoud²**, **Ibrahim Abdelhalim³**, **Mohamed Elkasaby⁴**, **Yasser Elbendary⁴**, **Adam Jatowt¹**
232
+
233
+ ¹University of Innsbruck, Innsbruck, Tyrol, Austria
234
+ ²Chungbuk National University, Cheongju, Republic of Korea
235
+ ³University of Louisville, Louisville, USA
236
+ ⁴DISCO, Cairo, Egypt
237
+
238
+ ## 📚 Citation
239
+
240
+ If you find ReceiptSense useful for your research, please consider citing our paper:
241
+
242
+ ```bibtex
243
+ @article{abdallah2024receiptsense,
244
+ title={ReceiptSense: Beyond Traditional OCR - A Dataset for Receipt Understanding},
245
+ author={Abdelrahman Abdallah and Mahmoud Abdalla and Mahmoud SalahEldin Kasem and Mohamed Mahmoud and Ibrahim Abdelhalim and Mohamed Elkasaby and Yasser Elbendary and Adam Jatowt},
246
  year={2024},
247
+ journal={ACM Conference Proceedings},
248
+ note={Comprehensive multilingual receipt understanding dataset}
 
249
  }
250
+ ```
251
+
252
+ ## 📄 License
253
+
254
+ This dataset is released under the MIT License. See [LICENSE](LICENSE) file for details.
255
+
256
+ ## 🔗 Links
257
+
258
+ - 📄 **Paper**: [arXiv:2406.04493](https://arxiv.org/abs/2406.04493)
259
+ - 🤗 **HuggingFace**: [abdoelsayed/CORU](https://huggingface.co/datasets/abdoelsayed/CORU)
260
+ - 💼 **DISCO App**: [https://discoapp.ai/](https://discoapp.ai/)
261
+ - 📧 **Contact**: [[email protected]](mailto:[email protected])
262
+
263
+ ---
264
+
265
+ <div align="center">
266
+
267
+ **🌟 Star this repository if you find it helpful! 🌟**
268
+
269
+ ![Visitors](https://api.visitorbadge.io/api/visitors?path=https%3A%2F%2Fgithub.com%2FUpdate-For-Integrated-Business-AI%2FCORU&countColor=%23263759)
270
+
271
+ </div>