Panhapich's picture
Update README.md
270567b verified
|
Raw
History Blame Contribute Delete
7.02 kB
---
license: mit
task_categories:
- object-detection
tags:
- image
- computer-vision
- document-analysis
- financial-documents
- table-detection
- yolo
- synthetic-data
pretty_name: Synthetic Bank Statement Table Detection Dataset
size_categories:
- n<10k
dataset_info:
features:
- name: image
dtype: image
- name: objects
struct:
- name: bbox
list:
list: float32
- name: category
list: int64
splits:
- name: train
num_bytes: 1855469904.4
num_examples: 8475
download_size: 1813512839
dataset_size: 1855469904.4
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
---
# Synthetic Bank Statement Table Detection Dataset
A synthetically generated collection of bank statement images with pixel-perfect, automatically generated bounding box annotations for **table detection**.
> 🔑 **In one sentence:** fake bank statements + auto-generated YOLO labels for table localization, designed for training document layout and table-detection models.
---
## At a Glance
| | |
|---|---|
| **Task** | Object Detection → Table Detection |
| **Format** | PNG images + YOLO-format `.txt` labels |
| **Classes** | 1 (`0` = Table) |
| **Total images** | 8475 |
| **Splits** | None yet — single unsplit set |
| **Source** | 100% synthetic, generated with Python + ReportLab |
| **Real data?** | ❌ No real bank statements, customers, or financial records |
| **License** | MIT |
---
## Why This Dataset Exists
Table detection is the first stage of many document AI pipelines. Before OCR, table structure recognition, or information extraction can begin, the document's table must first be accurately localized.
This dataset models **clean, digitally-generated bank statement PDFs** — the kind produced directly by a bank's own statement-generation system and downloaded as a native PDF (not a scanned paper document). Instead of manually drawing bounding boxes after generation, the table coordinates are captured directly from the ReportLab rendering engine as each document is created.
Because every annotation is produced during rendering, the resulting labels are pixel-perfect and free from manual annotation errors. The dataset is intended for pretraining, benchmarking, or augmenting table detection models before fine-tuning on real financial documents.
---
## What's Inside
Each sample consists of:
- A synthetic bank statement image
- One YOLO annotation file
- A bounding box surrounding the complete transaction table
### Layout diversity
The generator produces a wide variety of layouts, including:
- Portrait and landscape orientations
- Multiple banking templates
- Different table widths and positions
- Bordered, borderless, and zebra-striped tables
- Variable row counts
- Multi-page statements
- Randomized customer information and transaction histories
---
## Folder Structure
```text
table_detection/
├── images/
│ ├── anon_stmt_001_p1.png
│ ├── anon_stmt_001_p2.png
│ ├── anon_stmt_002_p1.png
│ └── ...
└── labels/
├── anon_stmt_001_p1.txt
├── anon_stmt_001_p2.txt
├── anon_stmt_002_p1.txt
└── ...
```
Each image has a matching YOLO label file with the same base filename.
**Filename convention:** `anon_stmt_<statement_id>_p<page_number>`
- `anon_` — synthetic/anonymized document
- `stmt_<statement_id>` — unique statement identifier
- `p<page_number>` — page number
Multi-page statements are stored as separate image/label pairs.
---
## Label Format
Standard YOLO object detection format:
```text
class_id center_x center_y width height
```
- `class_id`: `0` (Table)
- Coordinates are normalized to the image width and height.
| Class ID | Label | Description |
|:--------:|-------|-------------|
| `0` | Table | Bounding box surrounding the complete transaction table |
---
## Data Example
The examples below show raw statement images and the contents of their matching YOLO label files.
<table>
<tr>
<th>Image</th>
<th>Image</th>
</tr>
<tr>
<td>
![](images/anon_stmt_001_p1.png)
</td>
<td>
![](images/anon_stmt_002_p1.png)
</td>
</tr>
<tr>
<th>Label</th>
<th>Label</th>
</tr>
<tr>
<td>
```text
0 0.503 0.548 0.856 0.701
```
</td>
<td>
```text
0 0.498 0.541 0.842 0.688
```
</td>
</tr>
</table>
Each image typically contains one bounding box representing the entire transaction table.
---
<details>
<summary><strong>Load with the Hugging Face Hub</strong></summary>
```python
from huggingface_hub import snapshot_download
local_dir = snapshot_download(
repo_id="Panhapich/Panhapich/bank-statement-detection",
repo_type="dataset"
)
print(local_dir)
```
</details>
<details>
<summary><strong>Train with Ultralytics YOLO</strong></summary>
```yaml
path: ./table_detection
train: images
val: images
nc: 1
names:
- table
```
```python
from ultralytics import YOLO
model = YOLO("yolov8n.pt")
model.train(
data="data.yaml",
epochs=50,
imgsz=1024
)
```
</details>
---
## Annotation Methodology
Every annotation is generated automatically during document creation:
1. A synthetic bank statement is procedurally generated.
2. ReportLab renders the transaction table.
3. The exact table coordinates are captured during rendering.
4. The coordinates are converted into normalized YOLO format and written to the matching label file.
Because annotations originate directly from the rendering engine, they provide pixel-perfect ground truth with zero manual labeling.
---
## Compatible Models
- YOLOv5
- YOLOv8
- YOLOv9
- YOLOv10
- RT-DETR
- DETR
- Faster R-CNN
- Table Transformer (table localization stage)
- Other object detection architectures
---
## Intended Applications
- Table Detection
- Document Layout Analysis
- Intelligent Document Processing (IDP)
- OCR preprocessing
- Financial document understanding
- Table extraction pipelines
- Document AI benchmarking
---
## Limitations & Intended Use
- Models clean, digitally-generated bank statement PDFs only.
- Does not simulate scanned or photographed paper documents.
- Synthetic templates cannot fully represent the diversity of real bank statement layouts.
- Contains no real customer information or financial records.
- Single unsplit dataset.
**Best used for:** pretraining, benchmarking, or data augmentation before fine-tuning on real bank statement documents.
---
## Dataset Origin
This dataset is entirely synthetic. Every document was procedurally generated using Python and ReportLab. No real bank statements, customer information, financial records, proprietary templates, or institution-specific branding are included.
---
## Citation
```bibtex
@dataset{synthetic_bank_statement_table_detection,
title = {Synthetic Bank Statement Table Detection Dataset},
author = {Uk, Panhapich},
year = {2026},
note = {Synthetically generated for table detection research}
}
```
## License
Released under the **MIT License**.