File size: 3,299 Bytes
afbf4c8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8e05ba5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
afbf4c8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: mit
task_categories:
- image-to-text
- object-detection
- token-classification
language:
- id
- en
tags:
- receipt
- ocr
- information-extraction
- cord
- indonesian
size_categories:
- n<1K
dataset_info:
  features:
  - name: image
    dtype: image
  - name: ground_truth
    dtype: string
  splits:
  - name: train
    num_bytes: 7311152.0
    num_examples: 5
  download_size: 7282064
  dataset_size: 7311152.0
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
---

# parlarlax/tiny-cord


CORD (Consolidated Receipt Dataset) is a dataset for receipt understanding tasks.
This dataset contains Indonesian restaurant receipts with structured annotations
for menu items, prices, and text extraction with bounding boxes.


## Dataset Details

### Dataset Description

The CORD dataset contains receipt images and their corresponding structured annotations.
Each example includes:

- **Receipt Image**: High-resolution image of Indonesian restaurant receipts
- **Menu Items**: Structured data with item names, quantities, and prices  
- **Totals**: Subtotal, service charges, taxes, and final total
- **Text Annotations**: Detailed text extraction with bounding box coordinates

### Dataset Structure

```python
{
    'image': PIL.Image,
    'image_id': int,
    'image_size': {'width': int, 'height': int},
    'version': str,
    'split': str,
    'menu_items': [
        {'nm': str, 'cnt': str, 'price': str}, ...
    ],
    'totals': {
        'subtotal_price': str,
        'service_price': str, 
        'tax_price': str,
        'etc': str,
        'total_price': str
    },
    'text_annotations': [
        {
            'words': [{'text': str, 'bbox': [int, int, int, int], 'is_key': int}, ...],
            'category': str,
            'group_id': int,
            'sub_group_id': int
        }, ...
    ]
}
```

### Supported Tasks

- **Receipt Understanding**: Extract structured information from receipt images
- **OCR (Optical Character Recognition)**: Text extraction with spatial information
- **Information Extraction**: Named entity recognition for receipt components
- **Document Layout Analysis**: Understanding spatial relationships in receipts

### Languages

The receipts contain text in:
- Indonesian (primary language)
- English (some menu items and labels)

### Dataset Statistics

- Number of examples: Varies based on available receipt images
- Image dimensions: 864 x 1296 pixels
- Average menu items per receipt: ~20-25 items
- Text annotations include bounding boxes for precise localization

## Dataset Creation

This dataset was created from receipt images and corresponding JSON annotations
containing ground truth information about menu items, prices, and text locations.

### Source Data

The source receipts are from Indonesian restaurants, primarily from the Bali region.
All prices are in Indonesian Rupiah (IDR).

## Usage

```python
from datasets import load_dataset

# Load the dataset
dataset = load_dataset("parlarlax/tiny-cord")

# Access an example
example = dataset['train'][0]
image = example['image']
menu_items = example['menu_items']
total_price = example['totals']['total_price']
```

## Dataset Card Contact

For questions or issues regarding this dataset, please create an issue in the repository.