File size: 4,100 Bytes
5aa7ee3
 
 
 
 
 
 
fd63821
5aa7ee3
 
 
 
 
 
 
fd63821
5aa7ee3
 
fd63821
5aa7ee3
 
 
 
 
 
fd63821
 
 
 
 
 
 
 
5aa7ee3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fd63821
5aa7ee3
 
 
fd63821
5aa7ee3
 
 
 
 
 
 
 
 
 
 
 
fd63821
5aa7ee3
 
 
 
 
 
 
 
 
fd63821
5aa7ee3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fd63821
5aa7ee3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fd63821
5aa7ee3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fd63821
5aa7ee3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
---
license: apache-2.0
---
---

# πŸ“„ Invoice Image Dataset (N8N-Friendly Streaming Format)

This repository contains a large-scale collection of invoice data stored in a **simple, sequential, machine-friendly structure** designed specifically for workflow automation tools such as **n8n**, Airflow, Make.com, and other ETL/automation systems.

The dataset is formatted to allow **easy, reliable, and high-performance pulling of individual invoice files one-by-one**, without needing to download the entire dataset.

---

## πŸ“ Directory Structure

All invoice data are stored inside a single directory:

```
data_0001/
β”‚
β”œβ”€β”€ invoice_00000001.png
β”œβ”€β”€ invoice_00000002.png
β”œβ”€β”€ invoice_00000003.png
β”œβ”€β”€ invoice_00000004.png
└── ...
data_0002/
β”‚
β”œβ”€β”€ invoice_00010001.png
β”œβ”€β”€ invoice_00010002.png
β”œβ”€β”€ invoice_00010003.png
β”œβ”€β”€ invoice_00010004.png
└── ...
...
```

### βœ… Naming Format

Each invoice follows a **fixed-length 8-digit numbering scheme**:

```
invoice_00000000.format
```

* Zero-padded (`06d` or more) numbering supports **millions of invoices** without renaming.
* `format` can be `.png`, `.jpg`, `.jpeg`, `.webp`, depending on original source.
* Each file is **independent** and can be downloaded individually.

---

## 🎯 Purpose of This Dataset

This dataset acts as a **normalized, unified output repository** for invoice data collected and standardized from multiple sources:

* Other Hugging Face datasets
* GitHub repositories
* Parquet datasets containing embedded data
* Third-party OCR datasets
* Custom pipelines

Each invoice is extracted, normalized, renamed, and uploaded in a consistent structure.

---

## πŸ”Œ Why This Format Is Perfect for n8n Workflows

Most automation tools (including **n8n**) struggle with:

* datasets stored in large compressed files (ZIPs, JSONL, Parquet)
* datasets where data must be decoded from arrays/blobs
* datasets requiring full-dataset downloads

This repo is intentionally built to support **file-by-file streaming**, so n8n can:

### βœ” Pull one file at a time

Example URL:

```
https://huggingface.co/datasets/<USER>/<REPO>/resolve/main/data_0001/invoice_00000042.png
```

### βœ” Process invoices sequentially

You can loop:

1 β†’ 2 β†’ 3 β†’ 4 β†’ ...

As long as the file exists, n8n continues; when it fails (404), it stops β€” perfect for paginated workflows.

### βœ” Avoid handling large downloads

Each invoice is an independent file.

### βœ” Use lightweight logic

You only need a simple incrementing counter in n8n.

---

## 🧩 Example n8n Workflow Logic

1. Start with variable:

   ```
   index = 1
   ```

2. Construct file URL:

   ```
   url = https://huggingface.co/datasets/<USER>/<REPO>/resolve/main/<folder>/invoice_<index padded>.png
   ```

3. HTTP GET β†’ process invoice

4. Increment index

5. Repeat until HTTP GET returns 404

6. Stop workflow automatically

This allows n8n to **stream** invoices from Hugging Face like a controlled queue.

---

## πŸ“¦ What This Dataset Contains

* Only raw invoice data
* No labels
* No associated OCR text
* No metadata

This repository is intended specifically as an **output target** for standardized invoices β€” not as an annotated machine learning dataset.

---

## βš™οΈ How It Was Generated

A controlled pipeline:

1. Loads invoices from multiple formats (HF dataset, Parquet, GitHub, OCR outputs, etc.)
2. Extracts image data
3. Converts and normalizes to `.png` or `.jpg`
4. Saves to `folder/invoice_XXXXXXXX.format`
5. Uploads each file individually using the Hugging Face API
6. Logs progress so the job can resume at any index

Designed with:

* Kaggle execution compatibility
* Resume-safe operation
* Support for millions of invoices
* No Git requirements (uploads via HF API)

---

## πŸ“¬ Contact / Usage Notes

This dataset is meant for:

* ETL automation
* Synthetic invoice processing pipelines
* AI model pre-processing
* OCR experiments
* Workflow system testing (n8n, make.com)

If you use this dataset in your workflow, feel free to reference or credit the repo.

---