Upload v2 (36/36)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +4 -0
- README.md +164 -0
- data/test.csv +3 -0
- data/train.csv +3 -0
- data/validation.csv +3 -0
- scans/test.csv +0 -0
- scans/train.csv +3 -0
- scans/validation.csv +0 -0
- scans/work_order/0f9050ea96c971e6_p0_scan.jpg +3 -0
- scans/work_order/0fc6f90963ad5e18_p0_photo.jpg +3 -0
- scans/work_order/0fd0d3ea9200b08c_p0_scan.jpg +3 -0
- scans/work_order/1068cedc8bfdf6f9_p0_scan.jpg +3 -0
- scans/work_order/108e761e3592c364_p0_scan.jpg +3 -0
- scans/work_order/10bd87b12ee8525e_p0_scan.jpg +3 -0
- scans/work_order/110bc056827d7565_p0_scan.jpg +3 -0
- scans/work_order/116a67f3b9efee4f_p0_photo.jpg +3 -0
- scans/work_order/133572c8eca2e21e_p0_photo.jpg +3 -0
- scans/work_order/139a8088fab52d33_p0_scan.jpg +3 -0
- scans/work_order/140ad65ebb48649d_p0_photo.jpg +3 -0
- scans/work_order/140fff1ebbea1093_p0_scan.jpg +3 -0
- scans/work_order/147c4333a188f52a_p0_scan.jpg +3 -0
- scans/work_order/1497e086250d6aa0_p0_photo.jpg +3 -0
- scans/work_order/149892c0c43e1a56_p0_scan.jpg +3 -0
- scans/work_order/157b95bfba12e848_p0_photo.jpg +3 -0
- scans/work_order/158b6f45b5d03233_p0_photo.jpg +3 -0
- scans/work_order/158b6f45b5d03233_p1_scan.jpg +3 -0
- scans/work_order/15e386799591825b_p0_scan.jpg +3 -0
- scans/work_order/167badd119400e2f_p0_scan.jpg +3 -0
- scans/work_order/174eefd72bbf2131_p0_photo.jpg +3 -0
- scans/work_order/17652ced8e6ab8a8_p0_photo.jpg +3 -0
- scans/work_order/17c9e95522cfdbab_p0_scan.jpg +3 -0
- scans/work_order/17d837044748dfbf_p0_scan.jpg +3 -0
- scans/work_order/1827647efae2d4de_p0_photo.jpg +3 -0
- scans/work_order/1a0b6fe28840b601_p0_photo.jpg +3 -0
- scans/work_order/1a5c93a4dada14f8_p0_photo.jpg +3 -0
- scans/work_order/1ad76fed82da2796_p0_photo.jpg +3 -0
- scans/work_order/1aecae30deb8a312_p0_scan.jpg +3 -0
- scans/work_order/1b3152cb15128a94_p0_scan.jpg +3 -0
- scans/work_order/1bbd1e1605d76a50_p0_photo.jpg +3 -0
- scans/work_order/1bdb1f57f4658473_p0_photo.jpg +3 -0
- scans/work_order/1cc7ed230f5cb194_p0_scan.jpg +3 -0
- scans/work_order/1cec5bfefba4836a_p0_photo.jpg +3 -0
- scans/work_order/1cf74e9a8fe5b0b8_p0_scan.jpg +3 -0
- scans/work_order/1dc812083fe807aa_p0_scan.jpg +3 -0
- scans/work_order/1e3bdb1efed06ace_p0_scan.jpg +3 -0
- scans/work_order/1e50b4cb82302ff7_p0_scan.jpg +3 -0
- scans/work_order/1eec7c3fdb23392e_p0_photo.jpg +3 -0
- scans/work_order/1f527c598431fe67_p0_scan.jpg +3 -0
- scans/work_order/1fce04ca906a2887_p0_photo.jpg +3 -0
- scans/work_order/1fd615bc7d8a234a_p0_photo.jpg +3 -0
.gitattributes
CHANGED
|
@@ -58,3 +58,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
data/test.csv filter=lfs diff=lfs merge=lfs -text
|
| 62 |
+
data/train.csv filter=lfs diff=lfs merge=lfs -text
|
| 63 |
+
data/validation.csv filter=lfs diff=lfs merge=lfs -text
|
| 64 |
+
scans/train.csv filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,3 +1,167 @@
|
|
| 1 |
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
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
- fr
|
| 5 |
license: apache-2.0
|
| 6 |
+
size_categories:
|
| 7 |
+
- 10K<n<100K
|
| 8 |
+
task_categories:
|
| 9 |
+
- text-classification
|
| 10 |
+
- token-classification
|
| 11 |
+
- image-to-text
|
| 12 |
+
- feature-extraction
|
| 13 |
+
- text-generation
|
| 14 |
+
pretty_name: Company Documents v2
|
| 15 |
+
tags:
|
| 16 |
+
- finance
|
| 17 |
+
- document-ai
|
| 18 |
+
- synthetic
|
| 19 |
+
- invoices
|
| 20 |
+
- tabular
|
| 21 |
+
configs:
|
| 22 |
+
- config_name: default
|
| 23 |
+
default: true
|
| 24 |
+
data_files:
|
| 25 |
+
- split: test
|
| 26 |
+
path: data/test.csv
|
| 27 |
+
- split: train
|
| 28 |
+
path: data/train.csv
|
| 29 |
+
- split: validation
|
| 30 |
+
path: data/validation.csv
|
| 31 |
+
- config_name: scans
|
| 32 |
+
data_files:
|
| 33 |
+
- split: test
|
| 34 |
+
path: scans/test.csv
|
| 35 |
+
- split: train
|
| 36 |
+
path: scans/train.csv
|
| 37 |
+
- split: validation
|
| 38 |
+
path: scans/validation.csv
|
| 39 |
---
|
| 40 |
+
|
| 41 |
+
# Company Documents v2
|
| 42 |
+
|
| 43 |
+
Synthetic, born-digital business documents rendered from four open sample databases, with exact gold
|
| 44 |
+
labels. 25,957 documents (32,379 pages) of 13 types,
|
| 45 |
+
issued by 60 synthetic companies with their own letterheads.
|
| 46 |
+
|
| 47 |
+
## Splits
|
| 48 |
+
|
| 49 |
+
Splits are **by issuing company** (per sector): validation and test documents come from companies
|
| 50 |
+
whose letterhead, numbering and wording never appear in training.
|
| 51 |
+
|
| 52 |
+
| split | documents |
|
| 53 |
+
|---|---|
|
| 54 |
+
| train | 19,012 |
|
| 55 |
+
| test | 3,501 |
|
| 56 |
+
| validation | 3,444 |
|
| 57 |
+
|
| 58 |
+
## Document types
|
| 59 |
+
|
| 60 |
+
| type | documents |
|
| 61 |
+
|---|---|
|
| 62 |
+
| account_statement | 2,000 |
|
| 63 |
+
| credit_note | 2,000 |
|
| 64 |
+
| employment_certificate | 2,000 |
|
| 65 |
+
| goods_received_note | 2,000 |
|
| 66 |
+
| invoice | 2,000 |
|
| 67 |
+
| packing_slip | 2,000 |
|
| 68 |
+
| payslip | 2,000 |
|
| 69 |
+
| purchase_order | 2,000 |
|
| 70 |
+
| quote | 2,000 |
|
| 71 |
+
| receipt | 2,000 |
|
| 72 |
+
| shipping_order | 2,000 |
|
| 73 |
+
| work_order | 2,000 |
|
| 74 |
+
| inventory_report | 1,957 |
|
| 75 |
+
|
| 76 |
+
## Sources
|
| 77 |
+
|
| 78 |
+
| source | documents |
|
| 79 |
+
|---|---|
|
| 80 |
+
| adventureworks | 16,013 |
|
| 81 |
+
| northwind | 7,532 |
|
| 82 |
+
| sakila | 1,588 |
|
| 83 |
+
| chinook | 824 |
|
| 84 |
+
|
| 85 |
+
Northwind (food wholesale), AdventureWorks (bicycle manufacturer: sales, purchasing, production, HR),
|
| 86 |
+
Chinook (online music store), Sakila (video rental, dates shifted +19 years). Issuers are synthetic;
|
| 87 |
+
counterparties, products, quantities and prices come from the databases.
|
| 88 |
+
|
| 89 |
+
## Columns (`default`, CSV)
|
| 90 |
+
|
| 91 |
+
One row per PDF.
|
| 92 |
+
|
| 93 |
+
- `doc_id`, `split`, `document_type`, `source`, `variant`
|
| 94 |
+
- `file_name`: the PDF (`pdf/<type>/<doc_id>.pdf`); `json_file`: its gold JSON (`json/<type>/<doc_id>.json`)
|
| 95 |
+
- `company` (slug), `company_name`, `company_sector`, `company_country`, `company_city`, `company_tax_id`,
|
| 96 |
+
`company_locale`, `company_currency`: the issuing company
|
| 97 |
+
- `number`, `issue_date`, `currency`, `total`, `items_count`, `counterparty_role`, `counterparty_name`:
|
| 98 |
+
key gold values as plain columns
|
| 99 |
+
- `layout`, `theme`, `locale`, `pages`
|
| 100 |
+
- `extracted_data`: the gold fields (JSON), same content as `json_file`
|
| 101 |
+
- `file_content`: text extracted from the PDF (reading order)
|
| 102 |
+
|
| 103 |
+
## Columns (`scans`, CSV)
|
| 104 |
+
|
| 105 |
+
Degraded page images (profiles `scan` and `photo`: skew, blur, noise, paper tint, lighting, JPEG):
|
| 106 |
+
`image` is the path of the JPEG, `boxes` the gold-field boxes in image pixels. Join to `default` on `doc_id`.
|
| 107 |
+
|
| 108 |
+
## Guarantees
|
| 109 |
+
|
| 110 |
+
Every document passed a self-check: the checked gold values are present in the PDF text and the arithmetic
|
| 111 |
+
holds (line totals, tax, totals, running balances, aging, payroll, received vs accepted). Money is computed
|
| 112 |
+
with Decimal and half-up rounding; currencies are converted once from the source (USD).
|
| 113 |
+
|
| 114 |
+
## Licenses
|
| 115 |
+
|
| 116 |
+
Code and generated documents: Apache-2.0. Source data: Northwind (MIT), AdventureWorks (MIT),
|
| 117 |
+
Chinook (MIT), Sakila (BSD-2); see `licenses/`.
|
| 118 |
+
|
| 119 |
+
## Reproduce
|
| 120 |
+
|
| 121 |
+
```yaml
|
| 122 |
+
run_name: v2
|
| 123 |
+
seed: 42
|
| 124 |
+
sources: {}
|
| 125 |
+
date_shift: {}
|
| 126 |
+
out_dir: output/v2
|
| 127 |
+
workers: 8
|
| 128 |
+
companies_dir: /home/ayoub/Desktop/repos/Company-document/companies
|
| 129 |
+
textbank_dir: /home/ayoub/Desktop/repos/Company-document/data/textbank
|
| 130 |
+
fx:
|
| 131 |
+
USD: '1'
|
| 132 |
+
EUR: '0.92'
|
| 133 |
+
GBP: '0.79'
|
| 134 |
+
self_check: true
|
| 135 |
+
boxes: true
|
| 136 |
+
keep_html: false
|
| 137 |
+
resume: true
|
| 138 |
+
theme_dirs: []
|
| 139 |
+
locale_dirs: []
|
| 140 |
+
documents:
|
| 141 |
+
- type: account_statement
|
| 142 |
+
count: 2000
|
| 143 |
+
- type: credit_note
|
| 144 |
+
count: 2000
|
| 145 |
+
- type: employment_certificate
|
| 146 |
+
count: 2000
|
| 147 |
+
- type: goods_received_note
|
| 148 |
+
count: 2000
|
| 149 |
+
- type: inventory_report
|
| 150 |
+
count: 2000
|
| 151 |
+
- type: invoice
|
| 152 |
+
count: 2000
|
| 153 |
+
- type: packing_slip
|
| 154 |
+
count: 2000
|
| 155 |
+
- type: payslip
|
| 156 |
+
count: 2000
|
| 157 |
+
- type: purchase_order
|
| 158 |
+
count: 2000
|
| 159 |
+
- type: quote
|
| 160 |
+
count: 2000
|
| 161 |
+
- type: receipt
|
| 162 |
+
count: 2000
|
| 163 |
+
- type: shipping_order
|
| 164 |
+
count: 2000
|
| 165 |
+
- type: work_order
|
| 166 |
+
count: 2000
|
| 167 |
+
```
|
data/test.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4f2b3990abb1b57cd9b42f42d92cc3ff86f1ef56befa29b2721a0621eb882bf2
|
| 3 |
+
size 20596725
|
data/train.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:386e2f30590aca4dc36d75d154992067eb32edc3ff403d6b95e4fcb402476014
|
| 3 |
+
size 107613661
|
data/validation.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bfb5ba9daf294050389181e95f5adbd7b5698ebe5839f56948c6c32fb9a41573
|
| 3 |
+
size 18892434
|
scans/test.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
scans/train.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7b040765957844df605e3350e3260e0dd9891589916d364114751cec26b566e5
|
| 3 |
+
size 13181413
|
scans/validation.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
scans/work_order/0f9050ea96c971e6_p0_scan.jpg
ADDED
|
Git LFS Details
|
scans/work_order/0fc6f90963ad5e18_p0_photo.jpg
ADDED
|
Git LFS Details
|
scans/work_order/0fd0d3ea9200b08c_p0_scan.jpg
ADDED
|
Git LFS Details
|
scans/work_order/1068cedc8bfdf6f9_p0_scan.jpg
ADDED
|
Git LFS Details
|
scans/work_order/108e761e3592c364_p0_scan.jpg
ADDED
|
Git LFS Details
|
scans/work_order/10bd87b12ee8525e_p0_scan.jpg
ADDED
|
Git LFS Details
|
scans/work_order/110bc056827d7565_p0_scan.jpg
ADDED
|
Git LFS Details
|
scans/work_order/116a67f3b9efee4f_p0_photo.jpg
ADDED
|
Git LFS Details
|
scans/work_order/133572c8eca2e21e_p0_photo.jpg
ADDED
|
Git LFS Details
|
scans/work_order/139a8088fab52d33_p0_scan.jpg
ADDED
|
Git LFS Details
|
scans/work_order/140ad65ebb48649d_p0_photo.jpg
ADDED
|
Git LFS Details
|
scans/work_order/140fff1ebbea1093_p0_scan.jpg
ADDED
|
Git LFS Details
|
scans/work_order/147c4333a188f52a_p0_scan.jpg
ADDED
|
Git LFS Details
|
scans/work_order/1497e086250d6aa0_p0_photo.jpg
ADDED
|
Git LFS Details
|
scans/work_order/149892c0c43e1a56_p0_scan.jpg
ADDED
|
Git LFS Details
|
scans/work_order/157b95bfba12e848_p0_photo.jpg
ADDED
|
Git LFS Details
|
scans/work_order/158b6f45b5d03233_p0_photo.jpg
ADDED
|
Git LFS Details
|
scans/work_order/158b6f45b5d03233_p1_scan.jpg
ADDED
|
Git LFS Details
|
scans/work_order/15e386799591825b_p0_scan.jpg
ADDED
|
Git LFS Details
|
scans/work_order/167badd119400e2f_p0_scan.jpg
ADDED
|
Git LFS Details
|
scans/work_order/174eefd72bbf2131_p0_photo.jpg
ADDED
|
Git LFS Details
|
scans/work_order/17652ced8e6ab8a8_p0_photo.jpg
ADDED
|
Git LFS Details
|
scans/work_order/17c9e95522cfdbab_p0_scan.jpg
ADDED
|
Git LFS Details
|
scans/work_order/17d837044748dfbf_p0_scan.jpg
ADDED
|
Git LFS Details
|
scans/work_order/1827647efae2d4de_p0_photo.jpg
ADDED
|
Git LFS Details
|
scans/work_order/1a0b6fe28840b601_p0_photo.jpg
ADDED
|
Git LFS Details
|
scans/work_order/1a5c93a4dada14f8_p0_photo.jpg
ADDED
|
Git LFS Details
|
scans/work_order/1ad76fed82da2796_p0_photo.jpg
ADDED
|
Git LFS Details
|
scans/work_order/1aecae30deb8a312_p0_scan.jpg
ADDED
|
Git LFS Details
|
scans/work_order/1b3152cb15128a94_p0_scan.jpg
ADDED
|
Git LFS Details
|
scans/work_order/1bbd1e1605d76a50_p0_photo.jpg
ADDED
|
Git LFS Details
|
scans/work_order/1bdb1f57f4658473_p0_photo.jpg
ADDED
|
Git LFS Details
|
scans/work_order/1cc7ed230f5cb194_p0_scan.jpg
ADDED
|
Git LFS Details
|
scans/work_order/1cec5bfefba4836a_p0_photo.jpg
ADDED
|
Git LFS Details
|
scans/work_order/1cf74e9a8fe5b0b8_p0_scan.jpg
ADDED
|
Git LFS Details
|
scans/work_order/1dc812083fe807aa_p0_scan.jpg
ADDED
|
Git LFS Details
|
scans/work_order/1e3bdb1efed06ace_p0_scan.jpg
ADDED
|
Git LFS Details
|
scans/work_order/1e50b4cb82302ff7_p0_scan.jpg
ADDED
|
Git LFS Details
|
scans/work_order/1eec7c3fdb23392e_p0_photo.jpg
ADDED
|
Git LFS Details
|
scans/work_order/1f527c598431fe67_p0_scan.jpg
ADDED
|
Git LFS Details
|
scans/work_order/1fce04ca906a2887_p0_photo.jpg
ADDED
|
Git LFS Details
|
scans/work_order/1fd615bc7d8a234a_p0_photo.jpg
ADDED
|
Git LFS Details
|