haronbenfaida
commited on
Commit
•
d53cd36
1
Parent(s):
6d95936
layoutlmv3-finetuned-facturesv1
Browse files- README.md +59 -0
- config.json +72 -0
- merges.txt +0 -0
- model.safetensors +3 -0
- preprocessor_config.json +43 -0
- runs/Jul12_16-00-40_3cf3c36cf330/events.out.tfevents.1720800041.3cf3c36cf330.517.0 +3 -0
- runs/Jul12_16-37-52_3cf3c36cf330/events.out.tfevents.1720802277.3cf3c36cf330.517.1 +3 -0
- runs/Jul12_16-37-52_3cf3c36cf330/events.out.tfevents.1720803233.3cf3c36cf330.517.2 +3 -0
- runs/Jul12_16-55-25_3cf3c36cf330/events.out.tfevents.1720803331.3cf3c36cf330.517.3 +3 -0
- runs/Jul12_17-01-43_3cf3c36cf330/events.out.tfevents.1720803706.3cf3c36cf330.517.4 +3 -0
- runs/Jul12_17-11-57_3cf3c36cf330/events.out.tfevents.1720804320.3cf3c36cf330.517.5 +3 -0
- special_tokens_map.json +51 -0
- tokenizer.json +0 -0
- tokenizer_config.json +79 -0
- training_args.bin +3 -0
- vocab.json +0 -0
README.md
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: cc-by-nc-sa-4.0
|
3 |
+
base_model: microsoft/layoutlmv3-base
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
model-index:
|
7 |
+
- name: test
|
8 |
+
results: []
|
9 |
+
---
|
10 |
+
|
11 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
12 |
+
should probably proofread and complete it, then remove this comment. -->
|
13 |
+
|
14 |
+
# test
|
15 |
+
|
16 |
+
This model is a fine-tuned version of [microsoft/layoutlmv3-base](https://huggingface.co/microsoft/layoutlmv3-base) on an unknown dataset.
|
17 |
+
It achieves the following results on the evaluation set:
|
18 |
+
- eval_loss: 0.9442
|
19 |
+
- eval_precision: 0.8653
|
20 |
+
- eval_recall: 0.7740
|
21 |
+
- eval_f1: 0.8171
|
22 |
+
- eval_accuracy: 0.9284
|
23 |
+
- eval_runtime: 77.5017
|
24 |
+
- eval_samples_per_second: 18.064
|
25 |
+
- eval_steps_per_second: 4.516
|
26 |
+
- epoch: 1.7707
|
27 |
+
- step: 3807
|
28 |
+
|
29 |
+
## Model description
|
30 |
+
|
31 |
+
More information needed
|
32 |
+
|
33 |
+
## Intended uses & limitations
|
34 |
+
|
35 |
+
More information needed
|
36 |
+
|
37 |
+
## Training and evaluation data
|
38 |
+
|
39 |
+
More information needed
|
40 |
+
|
41 |
+
## Training procedure
|
42 |
+
|
43 |
+
### Training hyperparameters
|
44 |
+
|
45 |
+
The following hyperparameters were used during training:
|
46 |
+
- learning_rate: 5e-06
|
47 |
+
- train_batch_size: 4
|
48 |
+
- eval_batch_size: 4
|
49 |
+
- seed: 42
|
50 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
51 |
+
- lr_scheduler_type: linear
|
52 |
+
- training_steps: 25000
|
53 |
+
|
54 |
+
### Framework versions
|
55 |
+
|
56 |
+
- Transformers 4.41.2
|
57 |
+
- Pytorch 2.3.0+cu121
|
58 |
+
- Datasets 2.20.0
|
59 |
+
- Tokenizers 0.19.1
|
config.json
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "microsoft/layoutlmv3-base",
|
3 |
+
"architectures": [
|
4 |
+
"LayoutLMv3ForTokenClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"bos_token_id": 0,
|
8 |
+
"classifier_dropout": null,
|
9 |
+
"coordinate_size": 128,
|
10 |
+
"eos_token_id": 2,
|
11 |
+
"has_relative_attention_bias": true,
|
12 |
+
"has_spatial_attention_bias": true,
|
13 |
+
"hidden_act": "gelu",
|
14 |
+
"hidden_dropout_prob": 0.1,
|
15 |
+
"hidden_size": 768,
|
16 |
+
"id2label": {
|
17 |
+
"0": "$",
|
18 |
+
"1": "Total",
|
19 |
+
"2": "Total in Words",
|
20 |
+
"3": "Invoice Date",
|
21 |
+
"4": "Due Date",
|
22 |
+
"5": "Send_to",
|
23 |
+
"6": "Seller name",
|
24 |
+
"7": "7",
|
25 |
+
"8": "Buyer",
|
26 |
+
"9": "Tax",
|
27 |
+
"10": "Table",
|
28 |
+
"11": "Logo",
|
29 |
+
"12": "Invoice Number",
|
30 |
+
"13": "O"
|
31 |
+
},
|
32 |
+
"initializer_range": 0.02,
|
33 |
+
"input_size": 224,
|
34 |
+
"intermediate_size": 3072,
|
35 |
+
"label2id": {
|
36 |
+
"$": 0,
|
37 |
+
"7": 7,
|
38 |
+
"Buyer": 8,
|
39 |
+
"Due Date": 4,
|
40 |
+
"Invoice Date": 3,
|
41 |
+
"Invoice Number": 12,
|
42 |
+
"Logo": 11,
|
43 |
+
"O": 13,
|
44 |
+
"Seller name": 6,
|
45 |
+
"Send_to": 5,
|
46 |
+
"Table": 10,
|
47 |
+
"Tax": 9,
|
48 |
+
"Total": 1,
|
49 |
+
"Total in Words": 2
|
50 |
+
},
|
51 |
+
"layer_norm_eps": 1e-05,
|
52 |
+
"max_2d_position_embeddings": 1024,
|
53 |
+
"max_position_embeddings": 514,
|
54 |
+
"max_rel_2d_pos": 256,
|
55 |
+
"max_rel_pos": 128,
|
56 |
+
"model_type": "layoutlmv3",
|
57 |
+
"num_attention_heads": 12,
|
58 |
+
"num_channels": 3,
|
59 |
+
"num_hidden_layers": 12,
|
60 |
+
"pad_token_id": 1,
|
61 |
+
"patch_size": 16,
|
62 |
+
"rel_2d_pos_bins": 64,
|
63 |
+
"rel_pos_bins": 32,
|
64 |
+
"second_input_size": 112,
|
65 |
+
"shape_size": 128,
|
66 |
+
"text_embed": true,
|
67 |
+
"torch_dtype": "float32",
|
68 |
+
"transformers_version": "4.41.2",
|
69 |
+
"type_vocab_size": 1,
|
70 |
+
"visual_embed": true,
|
71 |
+
"vocab_size": 50265
|
72 |
+
}
|
merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:565994510dba98ee8aec88d7eaa0cf6bd651d107fe4caddb64a63f6263e6b04f
|
3 |
+
size 503739664
|
preprocessor_config.json
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_valid_processor_keys": [
|
3 |
+
"images",
|
4 |
+
"do_resize",
|
5 |
+
"size",
|
6 |
+
"resample",
|
7 |
+
"do_rescale",
|
8 |
+
"rescale_factor",
|
9 |
+
"do_normalize",
|
10 |
+
"image_mean",
|
11 |
+
"image_std",
|
12 |
+
"apply_ocr",
|
13 |
+
"ocr_lang",
|
14 |
+
"tesseract_config",
|
15 |
+
"return_tensors",
|
16 |
+
"data_format",
|
17 |
+
"input_data_format"
|
18 |
+
],
|
19 |
+
"apply_ocr": false,
|
20 |
+
"do_normalize": true,
|
21 |
+
"do_rescale": true,
|
22 |
+
"do_resize": true,
|
23 |
+
"image_mean": [
|
24 |
+
0.5,
|
25 |
+
0.5,
|
26 |
+
0.5
|
27 |
+
],
|
28 |
+
"image_processor_type": "LayoutLMv3ImageProcessor",
|
29 |
+
"image_std": [
|
30 |
+
0.5,
|
31 |
+
0.5,
|
32 |
+
0.5
|
33 |
+
],
|
34 |
+
"ocr_lang": null,
|
35 |
+
"processor_class": "LayoutLMv3Processor",
|
36 |
+
"resample": 2,
|
37 |
+
"rescale_factor": 0.00392156862745098,
|
38 |
+
"size": {
|
39 |
+
"height": 224,
|
40 |
+
"width": 224
|
41 |
+
},
|
42 |
+
"tesseract_config": ""
|
43 |
+
}
|
runs/Jul12_16-00-40_3cf3c36cf330/events.out.tfevents.1720800041.3cf3c36cf330.517.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:af8ef176e4ae1fe7eeedecc560ea9212e4899fd81199eb8ce691697f6e7b227a
|
3 |
+
size 14311
|
runs/Jul12_16-37-52_3cf3c36cf330/events.out.tfevents.1720802277.3cf3c36cf330.517.1
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:780ac3ad37303e5b584b635101248af8ec53c5fc03ea142a327a5e13e8486102
|
3 |
+
size 8642
|
runs/Jul12_16-37-52_3cf3c36cf330/events.out.tfevents.1720803233.3cf3c36cf330.517.2
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2791d4fcecc1b0385a55b7aa89ae21e4db741e26c907ef9b58c319dc0130b157
|
3 |
+
size 6198
|
runs/Jul12_16-55-25_3cf3c36cf330/events.out.tfevents.1720803331.3cf3c36cf330.517.3
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:97e53520cd1834a490503efa49aeb04346ca9cbbd5db148c3a6e4f783a048293
|
3 |
+
size 11827
|
runs/Jul12_17-01-43_3cf3c36cf330/events.out.tfevents.1720803706.3cf3c36cf330.517.4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0c0ab9e5894ac0bdc3c1446e625284e18ede64f078b1ea1fa649a8a8d8ab11f9
|
3 |
+
size 7135
|
runs/Jul12_17-11-57_3cf3c36cf330/events.out.tfevents.1720804320.3cf3c36cf330.517.5
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e9f463fadf488e1b7d60d70b0ac706403afec2278f09f70e3f5a06b27bfaf251
|
3 |
+
size 25604
|
special_tokens_map.json
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<s>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": true,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"cls_token": {
|
10 |
+
"content": "<s>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": true,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"eos_token": {
|
17 |
+
"content": "</s>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": true,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"mask_token": {
|
24 |
+
"content": "<mask>",
|
25 |
+
"lstrip": true,
|
26 |
+
"normalized": true,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
},
|
30 |
+
"pad_token": {
|
31 |
+
"content": "<pad>",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": true,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
},
|
37 |
+
"sep_token": {
|
38 |
+
"content": "</s>",
|
39 |
+
"lstrip": false,
|
40 |
+
"normalized": true,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false
|
43 |
+
},
|
44 |
+
"unk_token": {
|
45 |
+
"content": "<unk>",
|
46 |
+
"lstrip": false,
|
47 |
+
"normalized": true,
|
48 |
+
"rstrip": false,
|
49 |
+
"single_word": false
|
50 |
+
}
|
51 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_prefix_space": true,
|
3 |
+
"added_tokens_decoder": {
|
4 |
+
"0": {
|
5 |
+
"content": "<s>",
|
6 |
+
"lstrip": false,
|
7 |
+
"normalized": true,
|
8 |
+
"rstrip": false,
|
9 |
+
"single_word": false,
|
10 |
+
"special": true
|
11 |
+
},
|
12 |
+
"1": {
|
13 |
+
"content": "<pad>",
|
14 |
+
"lstrip": false,
|
15 |
+
"normalized": true,
|
16 |
+
"rstrip": false,
|
17 |
+
"single_word": false,
|
18 |
+
"special": true
|
19 |
+
},
|
20 |
+
"2": {
|
21 |
+
"content": "</s>",
|
22 |
+
"lstrip": false,
|
23 |
+
"normalized": true,
|
24 |
+
"rstrip": false,
|
25 |
+
"single_word": false,
|
26 |
+
"special": true
|
27 |
+
},
|
28 |
+
"3": {
|
29 |
+
"content": "<unk>",
|
30 |
+
"lstrip": false,
|
31 |
+
"normalized": true,
|
32 |
+
"rstrip": false,
|
33 |
+
"single_word": false,
|
34 |
+
"special": true
|
35 |
+
},
|
36 |
+
"50264": {
|
37 |
+
"content": "<mask>",
|
38 |
+
"lstrip": true,
|
39 |
+
"normalized": true,
|
40 |
+
"rstrip": false,
|
41 |
+
"single_word": false,
|
42 |
+
"special": true
|
43 |
+
}
|
44 |
+
},
|
45 |
+
"apply_ocr": false,
|
46 |
+
"bos_token": "<s>",
|
47 |
+
"clean_up_tokenization_spaces": true,
|
48 |
+
"cls_token": "<s>",
|
49 |
+
"cls_token_box": [
|
50 |
+
0,
|
51 |
+
0,
|
52 |
+
0,
|
53 |
+
0
|
54 |
+
],
|
55 |
+
"eos_token": "</s>",
|
56 |
+
"errors": "replace",
|
57 |
+
"mask_token": "<mask>",
|
58 |
+
"model_max_length": 512,
|
59 |
+
"only_label_first_subword": true,
|
60 |
+
"pad_token": "<pad>",
|
61 |
+
"pad_token_box": [
|
62 |
+
0,
|
63 |
+
0,
|
64 |
+
0,
|
65 |
+
0
|
66 |
+
],
|
67 |
+
"pad_token_label": -100,
|
68 |
+
"processor_class": "LayoutLMv3Processor",
|
69 |
+
"sep_token": "</s>",
|
70 |
+
"sep_token_box": [
|
71 |
+
0,
|
72 |
+
0,
|
73 |
+
0,
|
74 |
+
0
|
75 |
+
],
|
76 |
+
"tokenizer_class": "LayoutLMv3Tokenizer",
|
77 |
+
"trim_offsets": true,
|
78 |
+
"unk_token": "<unk>"
|
79 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:543b335cdcaf92f91409dd6256e38e3f40e44ec74cd99f155c1aa622d2e7dcdb
|
3 |
+
size 5048
|
vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|