Add dataset card
Browse files
README.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
task_categories:
|
| 4 |
+
- image-to-text
|
| 5 |
+
- object-detection
|
| 6 |
+
- token-classification
|
| 7 |
+
language:
|
| 8 |
+
- id
|
| 9 |
+
- en
|
| 10 |
+
tags:
|
| 11 |
+
- receipt
|
| 12 |
+
- ocr
|
| 13 |
+
- information-extraction
|
| 14 |
+
- cord
|
| 15 |
+
- indonesian
|
| 16 |
+
size_categories:
|
| 17 |
+
- n<1K
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
# parlarlax/tiny-cord
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
CORD (Consolidated Receipt Dataset) is a dataset for receipt understanding tasks.
|
| 24 |
+
This dataset contains Indonesian restaurant receipts with structured annotations
|
| 25 |
+
for menu items, prices, and text extraction with bounding boxes.
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
## Dataset Details
|
| 29 |
+
|
| 30 |
+
### Dataset Description
|
| 31 |
+
|
| 32 |
+
The CORD dataset contains receipt images and their corresponding structured annotations.
|
| 33 |
+
Each example includes:
|
| 34 |
+
|
| 35 |
+
- **Receipt Image**: High-resolution image of Indonesian restaurant receipts
|
| 36 |
+
- **Menu Items**: Structured data with item names, quantities, and prices
|
| 37 |
+
- **Totals**: Subtotal, service charges, taxes, and final total
|
| 38 |
+
- **Text Annotations**: Detailed text extraction with bounding box coordinates
|
| 39 |
+
|
| 40 |
+
### Dataset Structure
|
| 41 |
+
|
| 42 |
+
```python
|
| 43 |
+
{
|
| 44 |
+
'image': PIL.Image,
|
| 45 |
+
'image_id': int,
|
| 46 |
+
'image_size': {'width': int, 'height': int},
|
| 47 |
+
'version': str,
|
| 48 |
+
'split': str,
|
| 49 |
+
'menu_items': [
|
| 50 |
+
{'nm': str, 'cnt': str, 'price': str}, ...
|
| 51 |
+
],
|
| 52 |
+
'totals': {
|
| 53 |
+
'subtotal_price': str,
|
| 54 |
+
'service_price': str,
|
| 55 |
+
'tax_price': str,
|
| 56 |
+
'etc': str,
|
| 57 |
+
'total_price': str
|
| 58 |
+
},
|
| 59 |
+
'text_annotations': [
|
| 60 |
+
{
|
| 61 |
+
'words': [{'text': str, 'bbox': [int, int, int, int], 'is_key': int}, ...],
|
| 62 |
+
'category': str,
|
| 63 |
+
'group_id': int,
|
| 64 |
+
'sub_group_id': int
|
| 65 |
+
}, ...
|
| 66 |
+
]
|
| 67 |
+
}
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
### Supported Tasks
|
| 71 |
+
|
| 72 |
+
- **Receipt Understanding**: Extract structured information from receipt images
|
| 73 |
+
- **OCR (Optical Character Recognition)**: Text extraction with spatial information
|
| 74 |
+
- **Information Extraction**: Named entity recognition for receipt components
|
| 75 |
+
- **Document Layout Analysis**: Understanding spatial relationships in receipts
|
| 76 |
+
|
| 77 |
+
### Languages
|
| 78 |
+
|
| 79 |
+
The receipts contain text in:
|
| 80 |
+
- Indonesian (primary language)
|
| 81 |
+
- English (some menu items and labels)
|
| 82 |
+
|
| 83 |
+
### Dataset Statistics
|
| 84 |
+
|
| 85 |
+
- Number of examples: Varies based on available receipt images
|
| 86 |
+
- Image dimensions: 864 x 1296 pixels
|
| 87 |
+
- Average menu items per receipt: ~20-25 items
|
| 88 |
+
- Text annotations include bounding boxes for precise localization
|
| 89 |
+
|
| 90 |
+
## Dataset Creation
|
| 91 |
+
|
| 92 |
+
This dataset was created from receipt images and corresponding JSON annotations
|
| 93 |
+
containing ground truth information about menu items, prices, and text locations.
|
| 94 |
+
|
| 95 |
+
### Source Data
|
| 96 |
+
|
| 97 |
+
The source receipts are from Indonesian restaurants, primarily from the Bali region.
|
| 98 |
+
All prices are in Indonesian Rupiah (IDR).
|
| 99 |
+
|
| 100 |
+
## Usage
|
| 101 |
+
|
| 102 |
+
```python
|
| 103 |
+
from datasets import load_dataset
|
| 104 |
+
|
| 105 |
+
# Load the dataset
|
| 106 |
+
dataset = load_dataset("parlarlax/tiny-cord")
|
| 107 |
+
|
| 108 |
+
# Access an example
|
| 109 |
+
example = dataset['train'][0]
|
| 110 |
+
image = example['image']
|
| 111 |
+
menu_items = example['menu_items']
|
| 112 |
+
total_price = example['totals']['total_price']
|
| 113 |
+
```
|
| 114 |
+
|
| 115 |
+
## Dataset Card Contact
|
| 116 |
+
|
| 117 |
+
For questions or issues regarding this dataset, please create an issue in the repository.
|