tiny-cord / README.md
parlarlax's picture
Add CORD dataset
8e05ba5 verified
---
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.