AvoCahDoe's picture
Update README with viewer schema and raw_export paths
f7a13e2 verified
|
Raw
History Blame
5.25 kB
metadata
license: apache-2.0
language:
  - en
  - de
tags:
  - object-detection
  - document-understanding
  - invoice
  - layout-analysis
  - bounding-box
  - ocr-prep
task_categories:
  - object-detection
size_categories:
  - n<1K
pretty_name: Invoice Layout Annotated BBox Dataset
dataset_info:
  features:
    - name: image
      dtype: image
    - name: image_id
      dtype: int64
    - name: document_id
      dtype: int64
    - name: document_filename
      dtype: string
    - name: page_number
      dtype: int64
    - name: width
      dtype: int64
    - name: height
      dtype: int64
    - name: objects
      struct:
        - name: id
          list: int64
        - name: area
          list: float64
        - name: bbox
          list:
            list: float32
            length: 4
        - name: category
          list:
            class_label:
              names:
                '0': invoice_metadata
                '1': vendor_block
                '2': customer_block
                '3': table_block
                '4': line_item
                '5': summary_block
                '6': payment_block
                '7': Column
  splits:
    - name: train
      num_bytes: 40359783
      num_examples: 76
  download_size: 36093604
  dataset_size: 40359783
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*

Manually annotated invoice page images exported from AnnotateEverything, with axis-aligned bounding boxes for 8 document-layout regions. Built for training object detectors (YOLO, DETR, etc.) on invoice macro-structure.

Dataset summary

Property Value
Pages 76
Documents 1
Source PDF train_images.pdf
Total annotations 771
Avg boxes / page 10.14
Image width range 425 – 2853 px
Image height range 570 – 4096 px
Export date 2026-06-22T19:27:38.375Z
Annotation tool AnnotateEverything
Project Invoices (id=2)

Classes

ID Name Description Color Count
0 invoice_metadata Invoice number, date, header metadata #f59e0b 83
1 vendor_block Seller / vendor address block #22c55e 73
2 customer_block Client / customer address block #ef4444 74
3 table_block Line items table region #ec4899 76
4 line_item Individual line item row #8b5cf6 257
5 summary_block Totals / summary section #3b82f6 78
6 payment_block Payment / IBAN block #06b6d4 55
7 Column Table column header row #64748b 75

Dataset Viewer schema

The train split uses COCO-style objects with [x, y, width, height] bboxes (top-left origin):

Column Type
image Image
image_id, document_id, page_number, width, height int
document_filename string
objects.bbox list of [x, y, w, h]
objects.category ClassLabel (8 layout regions)
objects.area, objects.id float / int

Raw export layout

The original AnnotateEverything export is preserved under raw_export/:

raw_export/
├── manifest.json
├── annotations.json
└── documents/.../pages/page_NNN/image.png

Sample pages

Page 1 (8 boxes)

Original Annotated
page 1 original page 1 annotated

Page 20 (13 boxes)

Original Annotated
page 20 original page 20 annotated

Page 39 (10 boxes)

Original Annotated
page 39 original page 39 annotated

Page 58 (4 boxes)

Original Annotated
page 58 original page 58 annotated

Page 76 (8 boxes)

Original Annotated
page 76 original page 76 annotated

Page 19 (14 boxes)

Original Annotated
page 19 original page 19 annotated

Label distribution

Label Count
line_item 257
invoice_metadata 83
summary_block 78
table_block 76
Column 75
customer_block (Receiver) 74
vendor_block (Sender) 73
payment_block 55

Usage

Load with Hugging Face Datasets (recommended)

from datasets import load_dataset

ds = load_dataset("AvoCahDoe/invoice-annotated-bbox")
example = ds["train"][0]
print(example["objects"])  # COCO-style bboxes + categories
example["image"].show()

Load raw AnnotateEverything export

import json
from huggingface_hub import hf_hub_download

ann_path = hf_hub_download("AvoCahDoe/invoice-annotated-bbox", "raw_export/annotations.json", repo_type="dataset")
with open(ann_path) as f:
    pages = json.load(f)

Convert to YOLO (invoice-extractor)

python scripts/prepare_annotated_dataset.py

License

Apache 2.0