Szczotar93 commited on
Commit
bb3d050
1 Parent(s): 8e8d392

End of training

Browse files
README.md ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ base_model: microsoft/layoutlm-base-uncased
4
+ tags:
5
+ - generated_from_trainer
6
+ datasets:
7
+ - layoutlmv3
8
+ model-index:
9
+ - name: LayoutLM_Invoice6
10
+ results: []
11
+ ---
12
+
13
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
14
+ should probably proofread and complete it, then remove this comment. -->
15
+
16
+ # LayoutLM_Invoice6
17
+
18
+ This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on the layoutlmv3 dataset.
19
+ It achieves the following results on the evaluation set:
20
+ - Loss: 0.0219
21
+ - Ax Amount: {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 11}
22
+ - Endor Name: {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 11}
23
+ - Nvoice Number: {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 11}
24
+ - Otal Amount: {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 11}
25
+ - Ustomer Address: {'precision': 0.9090909090909091, 'recall': 0.9090909090909091, 'f1': 0.9090909090909091, 'number': 11}
26
+ - Ustomer Name: {'precision': 1.0, 'recall': 0.9090909090909091, 'f1': 0.9523809523809523, 'number': 11}
27
+ - Overall Precision: 0.9846
28
+ - Overall Recall: 0.9697
29
+ - Overall F1: 0.9771
30
+ - Overall Accuracy: 0.9939
31
+
32
+ ## Model description
33
+
34
+ More information needed
35
+
36
+ ## Intended uses & limitations
37
+
38
+ More information needed
39
+
40
+ ## Training and evaluation data
41
+
42
+ More information needed
43
+
44
+ ## Training procedure
45
+
46
+ ### Training hyperparameters
47
+
48
+ The following hyperparameters were used during training:
49
+ - learning_rate: 1e-05
50
+ - train_batch_size: 6
51
+ - eval_batch_size: 3
52
+ - seed: 42
53
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
54
+ - lr_scheduler_type: linear
55
+ - training_steps: 300
56
+
57
+ ### Training results
58
+
59
+ | Training Loss | Epoch | Step | Validation Loss | Ax Amount | Endor Name | Nvoice Number | Otal Amount | Ustomer Address | Ustomer Name | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
60
+ |:-------------:|:-----:|:----:|:---------------:|:----------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:|
61
+ | 0.8763 | 6.25 | 50 | 0.2290 | {'precision': 1.0, 'recall': 0.5454545454545454, 'f1': 0.7058823529411764, 'number': 11} | {'precision': 0.8181818181818182, 'recall': 0.8181818181818182, 'f1': 0.8181818181818182, 'number': 11} | {'precision': 1.0, 'recall': 0.8181818181818182, 'f1': 0.9, 'number': 11} | {'precision': 0.5454545454545454, 'recall': 0.5454545454545454, 'f1': 0.5454545454545454, 'number': 11} | {'precision': 0.7692307692307693, 'recall': 0.9090909090909091, 'f1': 0.8333333333333333, 'number': 11} | {'precision': 0.75, 'recall': 0.8181818181818182, 'f1': 0.7826086956521738, 'number': 11} | 0.7903 | 0.7424 | 0.7656 | 0.9666 |
62
+ | 0.1315 | 12.5 | 100 | 0.0312 | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 11} | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 11} | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 11} | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 11} | {'precision': 0.9166666666666666, 'recall': 1.0, 'f1': 0.9565217391304348, 'number': 11} | {'precision': 0.9090909090909091, 'recall': 0.9090909090909091, 'f1': 0.9090909090909091, 'number': 11} | 0.9701 | 0.9848 | 0.9774 | 0.9970 |
63
+ | 0.0239 | 18.75 | 150 | 0.0371 | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 11} | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 11} | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 11} | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 11} | {'precision': 0.9090909090909091, 'recall': 0.9090909090909091, 'f1': 0.9090909090909091, 'number': 11} | {'precision': 1.0, 'recall': 0.9090909090909091, 'f1': 0.9523809523809523, 'number': 11} | 0.9846 | 0.9697 | 0.9771 | 0.9939 |
64
+ | 0.0098 | 25.0 | 200 | 0.0450 | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 11} | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 11} | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 11} | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 11} | {'precision': 0.9090909090909091, 'recall': 0.9090909090909091, 'f1': 0.9090909090909091, 'number': 11} | {'precision': 1.0, 'recall': 0.9090909090909091, 'f1': 0.9523809523809523, 'number': 11} | 0.9846 | 0.9697 | 0.9771 | 0.9939 |
65
+ | 0.0085 | 31.25 | 250 | 0.0360 | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 11} | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 11} | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 11} | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 11} | {'precision': 0.9090909090909091, 'recall': 0.9090909090909091, 'f1': 0.9090909090909091, 'number': 11} | {'precision': 1.0, 'recall': 0.9090909090909091, 'f1': 0.9523809523809523, 'number': 11} | 0.9846 | 0.9697 | 0.9771 | 0.9939 |
66
+ | 0.0065 | 37.5 | 300 | 0.0219 | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 11} | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 11} | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 11} | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 11} | {'precision': 0.9090909090909091, 'recall': 0.9090909090909091, 'f1': 0.9090909090909091, 'number': 11} | {'precision': 1.0, 'recall': 0.9090909090909091, 'f1': 0.9523809523809523, 'number': 11} | 0.9846 | 0.9697 | 0.9771 | 0.9939 |
67
+
68
+
69
+ ### Framework versions
70
+
71
+ - Transformers 4.32.1
72
+ - Pytorch 2.2.0+cpu
73
+ - Datasets 2.12.0
74
+ - Tokenizers 0.13.2
config.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "microsoft/layoutlm-base-uncased",
3
+ "architectures": [
4
+ "LayoutLMForTokenClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "hidden_act": "gelu",
8
+ "hidden_dropout_prob": 0.1,
9
+ "hidden_size": 768,
10
+ "id2label": {
11
+ "0": "Invoice_Number",
12
+ "1": "Vendor_Name",
13
+ "2": "Customer_Name",
14
+ "3": "Customer_Address",
15
+ "4": "Total_Amount",
16
+ "5": "Tax_Amount"
17
+ },
18
+ "initializer_range": 0.02,
19
+ "intermediate_size": 3072,
20
+ "label2id": {
21
+ "Customer_Address": 3,
22
+ "Customer_Name": 2,
23
+ "Invoice_Number": 0,
24
+ "Tax_Amount": 5,
25
+ "Total_Amount": 4,
26
+ "Vendor_Name": 1
27
+ },
28
+ "layer_norm_eps": 1e-12,
29
+ "max_2d_position_embeddings": 1024,
30
+ "max_position_embeddings": 512,
31
+ "model_type": "layoutlm",
32
+ "num_attention_heads": 12,
33
+ "num_hidden_layers": 12,
34
+ "output_past": true,
35
+ "pad_token_id": 0,
36
+ "position_embedding_type": "absolute",
37
+ "torch_dtype": "float32",
38
+ "transformers_version": "4.32.1",
39
+ "type_vocab_size": 2,
40
+ "use_cache": true,
41
+ "vocab_size": 30522
42
+ }
preprocessor_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "apply_ocr": true,
3
+ "do_resize": true,
4
+ "feature_extractor_type": "LayoutLMv2FeatureExtractor",
5
+ "image_processor_type": "LayoutLMv2ImageProcessor",
6
+ "ocr_lang": null,
7
+ "processor_class": "LayoutLMv2Processor",
8
+ "resample": 2,
9
+ "size": {
10
+ "height": 224,
11
+ "width": 224
12
+ },
13
+ "tesseract_config": ""
14
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8cbe2f592da8be0e969ac9b7abc85768249c8ab2172d6b2ce41ffdc59bb0e208
3
+ size 450598462
special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "[SEP]",
6
+ "unk_token": "[UNK]"
7
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": null,
3
+ "apply_ocr": false,
4
+ "clean_up_tokenization_spaces": true,
5
+ "cls_token": "[CLS]",
6
+ "cls_token_box": [
7
+ 0,
8
+ 0,
9
+ 0,
10
+ 0
11
+ ],
12
+ "do_basic_tokenize": true,
13
+ "do_lower_case": true,
14
+ "mask_token": "[MASK]",
15
+ "model_max_length": 512,
16
+ "never_split": null,
17
+ "only_label_first_subword": true,
18
+ "pad_token": "[PAD]",
19
+ "pad_token_box": [
20
+ 0,
21
+ 0,
22
+ 0,
23
+ 0
24
+ ],
25
+ "pad_token_label": -100,
26
+ "processor_class": "LayoutLMv2Processor",
27
+ "sep_token": "[SEP]",
28
+ "sep_token_box": [
29
+ 1000,
30
+ 1000,
31
+ 1000,
32
+ 1000
33
+ ],
34
+ "strip_accents": null,
35
+ "tokenize_chinese_chars": true,
36
+ "tokenizer_class": "LayoutLMv2Tokenizer",
37
+ "unk_token": "[UNK]"
38
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c3ab2634191155fb4c1e86e3b3db1e213d77473c2beb3b8d57b8d631606f4d20
3
+ size 4536
vocab.txt ADDED
The diff for this file is too large to render. See raw diff