layoutlm-base-uncased-finetuned-invoices-0
This model is a fine-tuned version of microsoft/layoutlm-base-uncased on the None dataset. It achieves the following results on the evaluation set:
- Loss: 0.0534
- B-adress: {'precision': 0.9215044971381848, 'recall': 0.9383846794338052, 'f1': 0.92986798679868, 'number': 1201}
- B-name: {'precision': 0.9705014749262537, 'recall': 0.94, 'f1': 0.9550072568940493, 'number': 350}
- Gst no: {'precision': 0.9841269841269841, 'recall': 0.9841269841269841, 'f1': 0.9841269841269841, 'number': 126}
- Invoice no: {'precision': 0.9459459459459459, 'recall': 0.9813084112149533, 'f1': 0.963302752293578, 'number': 107}
- Order date: {'precision': 0.991869918699187, 'recall': 0.976, 'f1': 0.9838709677419355, 'number': 125}
- Order id: {'precision': 0.9770992366412213, 'recall': 0.9922480620155039, 'f1': 0.9846153846153846, 'number': 129}
- S-adress: {'precision': 0.9926739926739927, 'recall': 0.9906005221932115, 'f1': 0.9916361735493988, 'number': 1915}
- S-name: {'precision': 0.9940711462450593, 'recall': 0.998015873015873, 'f1': 0.996039603960396, 'number': 504}
- Total gross: {'precision': 0.94, 'recall': 0.94, 'f1': 0.94, 'number': 50}
- Total net: {'precision': 0.9481481481481482, 'recall': 0.9922480620155039, 'f1': 0.9696969696969696, 'number': 129}
- Overall Precision: 0.9689
- Overall Recall: 0.9728
- Overall F1: 0.9708
- Overall Accuracy: 0.9901
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 16
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 10
- num_epochs: 15
Training results
Training Loss | Epoch | Step | Validation Loss | B-adress | B-name | Gst no | Invoice no | Order date | Order id | S-adress | S-name | Total gross | Total net | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1.1784 | 1.0 | 19 | 0.5692 | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 1201} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 350} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 126} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 107} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 125} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 129} | {'precision': 0.7254901960784313, 'recall': 0.09660574412532637, 'f1': 0.1705069124423963, 'number': 1915} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 504} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 50} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 129} | 0.7255 | 0.0399 | 0.0756 | 0.8268 |
0.4628 | 2.0 | 38 | 0.3395 | {'precision': 0.6043689320388349, 'recall': 0.2073272273105745, 'f1': 0.3087414755114693, 'number': 1201} | {'precision': 0.9555555555555556, 'recall': 0.12285714285714286, 'f1': 0.21772151898734177, 'number': 350} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 126} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 107} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 125} | {'precision': 1.0, 'recall': 0.2713178294573643, 'f1': 0.42682926829268286, 'number': 129} | {'precision': 0.9046610169491526, 'recall': 0.8919060052219321, 'f1': 0.898238232973968, 'number': 1915} | {'precision': 0.8640552995391705, 'recall': 0.7440476190476191, 'f1': 0.7995735607675907, 'number': 504} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 50} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 129} | 0.8564 | 0.5198 | 0.6470 | 0.9073 |
0.2792 | 3.0 | 57 | 0.2106 | {'precision': 0.723175965665236, 'recall': 0.5611990008326395, 'f1': 0.6319737458977965, 'number': 1201} | {'precision': 0.6372745490981964, 'recall': 0.9085714285714286, 'f1': 0.7491166077738516, 'number': 350} | {'precision': 0.8275862068965517, 'recall': 0.7619047619047619, 'f1': 0.7933884297520662, 'number': 126} | {'precision': 0.8823529411764706, 'recall': 0.7009345794392523, 'f1': 0.78125, 'number': 107} | {'precision': 0.9176470588235294, 'recall': 0.624, 'f1': 0.7428571428571429, 'number': 125} | {'precision': 0.8785046728971962, 'recall': 0.7286821705426356, 'f1': 0.7966101694915255, 'number': 129} | {'precision': 0.9512700881285641, 'recall': 0.95822454308094, 'f1': 0.9547346514047867, 'number': 1915} | {'precision': 0.9428007889546351, 'recall': 0.9484126984126984, 'f1': 0.9455984174085064, 'number': 504} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 50} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 129} | 0.8563 | 0.7869 | 0.8201 | 0.9428 |
0.1846 | 4.0 | 76 | 0.1557 | {'precision': 0.7737104825291181, 'recall': 0.7743547044129891, 'f1': 0.7740324594257177, 'number': 1201} | {'precision': 0.8319088319088319, 'recall': 0.8342857142857143, 'f1': 0.833095577746077, 'number': 350} | {'precision': 0.856, 'recall': 0.8492063492063492, 'f1': 0.8525896414342629, 'number': 126} | {'precision': 0.8829787234042553, 'recall': 0.7757009345794392, 'f1': 0.8258706467661693, 'number': 107} | {'precision': 0.9431818181818182, 'recall': 0.664, 'f1': 0.7793427230046949, 'number': 125} | {'precision': 0.9306930693069307, 'recall': 0.7286821705426356, 'f1': 0.8173913043478261, 'number': 129} | {'precision': 0.9833064081852451, 'recall': 0.9535248041775457, 'f1': 0.968186638388123, 'number': 1915} | {'precision': 0.9777777777777777, 'recall': 0.9603174603174603, 'f1': 0.9689689689689689, 'number': 504} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 50} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 129} | 0.9040 | 0.8410 | 0.8714 | 0.9587 |
0.1324 | 5.0 | 95 | 0.1174 | {'precision': 0.8217115689381933, 'recall': 0.8634471273938384, 'f1': 0.8420625253755581, 'number': 1201} | {'precision': 0.8812154696132597, 'recall': 0.9114285714285715, 'f1': 0.8960674157303371, 'number': 350} | {'precision': 0.9396551724137931, 'recall': 0.8650793650793651, 'f1': 0.9008264462809918, 'number': 126} | {'precision': 0.8942307692307693, 'recall': 0.8691588785046729, 'f1': 0.881516587677725, 'number': 107} | {'precision': 0.956989247311828, 'recall': 0.712, 'f1': 0.81651376146789, 'number': 125} | {'precision': 0.9494949494949495, 'recall': 0.7286821705426356, 'f1': 0.8245614035087719, 'number': 129} | {'precision': 0.987220447284345, 'recall': 0.9681462140992168, 'f1': 0.9775902979172159, 'number': 1915} | {'precision': 0.9839034205231388, 'recall': 0.9702380952380952, 'f1': 0.977022977022977, 'number': 504} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 50} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 129} | 0.9259 | 0.8809 | 0.9028 | 0.9678 |
0.0965 | 6.0 | 114 | 0.0911 | {'precision': 0.8446676970633694, 'recall': 0.9100749375520399, 'f1': 0.8761523046092183, 'number': 1201} | {'precision': 0.9269662921348315, 'recall': 0.9428571428571428, 'f1': 0.934844192634561, 'number': 350} | {'precision': 0.9666666666666667, 'recall': 0.9206349206349206, 'f1': 0.943089430894309, 'number': 126} | {'precision': 0.9230769230769231, 'recall': 0.897196261682243, 'f1': 0.9099526066350712, 'number': 107} | {'precision': 0.98, 'recall': 0.784, 'f1': 0.8711111111111111, 'number': 125} | {'precision': 0.96, 'recall': 0.7441860465116279, 'f1': 0.8384279475982533, 'number': 129} | {'precision': 0.9797927461139896, 'recall': 0.9874673629242819, 'f1': 0.9836150845253576, 'number': 1915} | {'precision': 0.9879518072289156, 'recall': 0.9761904761904762, 'f1': 0.9820359281437125, 'number': 504} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 50} | {'precision': 0.8035714285714286, 'recall': 0.3488372093023256, 'f1': 0.48648648648648657, 'number': 129} | 0.9340 | 0.9182 | 0.9260 | 0.9751 |
0.0662 | 7.0 | 133 | 0.0735 | {'precision': 0.8793242156074015, 'recall': 0.9100749375520399, 'f1': 0.8944353518821604, 'number': 1201} | {'precision': 0.9646017699115044, 'recall': 0.9342857142857143, 'f1': 0.9492017416545718, 'number': 350} | {'precision': 0.9836065573770492, 'recall': 0.9523809523809523, 'f1': 0.9677419354838709, 'number': 126} | {'precision': 0.9238095238095239, 'recall': 0.9065420560747663, 'f1': 0.9150943396226416, 'number': 107} | {'precision': 1.0, 'recall': 0.776, 'f1': 0.8738738738738739, 'number': 125} | {'precision': 0.9603960396039604, 'recall': 0.751937984496124, 'f1': 0.8434782608695651, 'number': 129} | {'precision': 0.9727225939269172, 'recall': 0.9869451697127938, 'f1': 0.9797822706065319, 'number': 1915} | {'precision': 0.9880952380952381, 'recall': 0.9880952380952381, 'f1': 0.9880952380952381, 'number': 504} | {'precision': 1.0, 'recall': 0.04, 'f1': 0.07692307692307693, 'number': 50} | {'precision': 0.6598639455782312, 'recall': 0.751937984496124, 'f1': 0.7028985507246376, 'number': 129} | 0.9381 | 0.9314 | 0.9347 | 0.9792 |
0.0493 | 8.0 | 152 | 0.0681 | {'precision': 0.9353146853146853, 'recall': 0.890924229808493, 'f1': 0.9125799573560768, 'number': 1201} | {'precision': 0.9702380952380952, 'recall': 0.9314285714285714, 'f1': 0.9504373177842566, 'number': 350} | {'precision': 0.984, 'recall': 0.9761904761904762, 'f1': 0.9800796812749003, 'number': 126} | {'precision': 0.9428571428571428, 'recall': 0.9252336448598131, 'f1': 0.9339622641509434, 'number': 107} | {'precision': 0.9911504424778761, 'recall': 0.896, 'f1': 0.9411764705882352, 'number': 125} | {'precision': 0.9658119658119658, 'recall': 0.875968992248062, 'f1': 0.9186991869918699, 'number': 129} | {'precision': 0.9854545454545455, 'recall': 0.9906005221932115, 'f1': 0.9880208333333333, 'number': 1915} | {'precision': 0.9979757085020243, 'recall': 0.9781746031746031, 'f1': 0.9879759519038076, 'number': 504} | {'precision': 0.9230769230769231, 'recall': 0.48, 'f1': 0.631578947368421, 'number': 50} | {'precision': 0.5989847715736041, 'recall': 0.9147286821705426, 'f1': 0.7239263803680982, 'number': 129} | 0.9548 | 0.9437 | 0.9492 | 0.9842 |
0.039 | 9.0 | 171 | 0.0564 | {'precision': 0.9024979854955681, 'recall': 0.93255620316403, 'f1': 0.9172809172809173, 'number': 1201} | {'precision': 0.9648093841642229, 'recall': 0.94, 'f1': 0.9522431259044862, 'number': 350} | {'precision': 0.9841269841269841, 'recall': 0.9841269841269841, 'f1': 0.9841269841269841, 'number': 126} | {'precision': 0.9375, 'recall': 0.9813084112149533, 'f1': 0.958904109589041, 'number': 107} | {'precision': 0.991869918699187, 'recall': 0.976, 'f1': 0.9838709677419355, 'number': 125} | {'precision': 0.9552238805970149, 'recall': 0.9922480620155039, 'f1': 0.9733840304182508, 'number': 129} | {'precision': 0.9915922228060956, 'recall': 0.985378590078329, 'f1': 0.9884756416972237, 'number': 1915} | {'precision': 0.9901185770750988, 'recall': 0.9940476190476191, 'f1': 0.9920792079207922, 'number': 504} | {'precision': 0.8979591836734694, 'recall': 0.88, 'f1': 0.888888888888889, 'number': 50} | {'precision': 0.8053691275167785, 'recall': 0.9302325581395349, 'f1': 0.8633093525179855, 'number': 129} | 0.9564 | 0.9664 | 0.9614 | 0.9872 |
0.0303 | 10.0 | 190 | 0.0542 | {'precision': 0.8982649842271293, 'recall': 0.948376353039134, 'f1': 0.9226407452409883, 'number': 1201} | {'precision': 0.973293768545994, 'recall': 0.9371428571428572, 'f1': 0.9548762736535662, 'number': 350} | {'precision': 0.9763779527559056, 'recall': 0.9841269841269841, 'f1': 0.9802371541501976, 'number': 126} | {'precision': 0.9375, 'recall': 0.9813084112149533, 'f1': 0.958904109589041, 'number': 107} | {'precision': 0.991869918699187, 'recall': 0.976, 'f1': 0.9838709677419355, 'number': 125} | {'precision': 0.9481481481481482, 'recall': 0.9922480620155039, 'f1': 0.9696969696969696, 'number': 129} | {'precision': 0.989567031820553, 'recall': 0.9906005221932115, 'f1': 0.9900835073068893, 'number': 1915} | {'precision': 0.9920634920634921, 'recall': 0.9920634920634921, 'f1': 0.9920634920634921, 'number': 504} | {'precision': 0.94, 'recall': 0.94, 'f1': 0.94, 'number': 50} | {'precision': 0.7961783439490446, 'recall': 0.9689922480620154, 'f1': 0.8741258741258742, 'number': 129} | 0.9545 | 0.9739 | 0.9641 | 0.9878 |
0.026 | 11.0 | 209 | 0.0534 | {'precision': 0.9242928452579035, 'recall': 0.9250624479600333, 'f1': 0.9246774864752393, 'number': 1201} | {'precision': 0.9676470588235294, 'recall': 0.94, 'f1': 0.953623188405797, 'number': 350} | {'precision': 0.9763779527559056, 'recall': 0.9841269841269841, 'f1': 0.9802371541501976, 'number': 126} | {'precision': 0.9292035398230089, 'recall': 0.9813084112149533, 'f1': 0.9545454545454545, 'number': 107} | {'precision': 0.991869918699187, 'recall': 0.976, 'f1': 0.9838709677419355, 'number': 125} | {'precision': 0.9481481481481482, 'recall': 0.9922480620155039, 'f1': 0.9696969696969696, 'number': 129} | {'precision': 0.9890568004168838, 'recall': 0.9911227154046998, 'f1': 0.9900886802295253, 'number': 1915} | {'precision': 0.998, 'recall': 0.9900793650793651, 'f1': 0.9940239043824701, 'number': 504} | {'precision': 0.94, 'recall': 0.94, 'f1': 0.94, 'number': 50} | {'precision': 0.900709219858156, 'recall': 0.9844961240310077, 'f1': 0.9407407407407407, 'number': 129} | 0.9656 | 0.9685 | 0.9670 | 0.9890 |
0.0227 | 12.0 | 228 | 0.0554 | {'precision': 0.911361804995971, 'recall': 0.9417152373022482, 'f1': 0.9262899262899263, 'number': 1201} | {'precision': 0.9676470588235294, 'recall': 0.94, 'f1': 0.953623188405797, 'number': 350} | {'precision': 0.9763779527559056, 'recall': 0.9841269841269841, 'f1': 0.9802371541501976, 'number': 126} | {'precision': 0.9292035398230089, 'recall': 0.9813084112149533, 'f1': 0.9545454545454545, 'number': 107} | {'precision': 0.9606299212598425, 'recall': 0.976, 'f1': 0.9682539682539683, 'number': 125} | {'precision': 0.9142857142857143, 'recall': 0.9922480620155039, 'f1': 0.9516728624535317, 'number': 129} | {'precision': 0.9916492693110647, 'recall': 0.9921671018276762, 'f1': 0.9919081179848602, 'number': 1915} | {'precision': 0.9921104536489151, 'recall': 0.998015873015873, 'f1': 0.9950544015825915, 'number': 504} | {'precision': 0.94, 'recall': 0.94, 'f1': 0.94, 'number': 50} | {'precision': 0.7852760736196319, 'recall': 0.9922480620155039, 'f1': 0.8767123287671234, 'number': 129} | 0.9562 | 0.9743 | 0.9652 | 0.9880 |
0.0214 | 13.0 | 247 | 0.0528 | {'precision': 0.9331662489557226, 'recall': 0.9300582847626978, 'f1': 0.9316096747289409, 'number': 1201} | {'precision': 0.9705014749262537, 'recall': 0.94, 'f1': 0.9550072568940493, 'number': 350} | {'precision': 0.9841269841269841, 'recall': 0.9841269841269841, 'f1': 0.9841269841269841, 'number': 126} | {'precision': 0.9454545454545454, 'recall': 0.9719626168224299, 'f1': 0.9585253456221198, 'number': 107} | {'precision': 0.976, 'recall': 0.976, 'f1': 0.976, 'number': 125} | {'precision': 0.9411764705882353, 'recall': 0.9922480620155039, 'f1': 0.9660377358490566, 'number': 129} | {'precision': 0.9901144640998959, 'recall': 0.993733681462141, 'f1': 0.9919207714360178, 'number': 1915} | {'precision': 0.9940711462450593, 'recall': 0.998015873015873, 'f1': 0.996039603960396, 'number': 504} | {'precision': 0.94, 'recall': 0.94, 'f1': 0.94, 'number': 50} | {'precision': 0.9142857142857143, 'recall': 0.9922480620155039, 'f1': 0.9516728624535317, 'number': 129} | 0.9686 | 0.9717 | 0.9702 | 0.9897 |
0.0201 | 14.0 | 266 | 0.0536 | {'precision': 0.9261410788381743, 'recall': 0.929225645295587, 'f1': 0.9276807980049875, 'number': 1201} | {'precision': 0.9676470588235294, 'recall': 0.94, 'f1': 0.953623188405797, 'number': 350} | {'precision': 0.9841269841269841, 'recall': 0.9841269841269841, 'f1': 0.9841269841269841, 'number': 126} | {'precision': 0.9459459459459459, 'recall': 0.9813084112149533, 'f1': 0.963302752293578, 'number': 107} | {'precision': 0.991869918699187, 'recall': 0.976, 'f1': 0.9838709677419355, 'number': 125} | {'precision': 0.9770992366412213, 'recall': 0.9922480620155039, 'f1': 0.9846153846153846, 'number': 129} | {'precision': 0.9926624737945493, 'recall': 0.9890339425587468, 'f1': 0.9908448862150143, 'number': 1915} | {'precision': 0.996039603960396, 'recall': 0.998015873015873, 'f1': 0.9970267591674925, 'number': 504} | {'precision': 0.94, 'recall': 0.94, 'f1': 0.94, 'number': 50} | {'precision': 0.9343065693430657, 'recall': 0.9922480620155039, 'f1': 0.9624060150375939, 'number': 129} | 0.9698 | 0.9698 | 0.9698 | 0.9898 |
0.0189 | 15.0 | 285 | 0.0534 | {'precision': 0.9215044971381848, 'recall': 0.9383846794338052, 'f1': 0.92986798679868, 'number': 1201} | {'precision': 0.9705014749262537, 'recall': 0.94, 'f1': 0.9550072568940493, 'number': 350} | {'precision': 0.9841269841269841, 'recall': 0.9841269841269841, 'f1': 0.9841269841269841, 'number': 126} | {'precision': 0.9459459459459459, 'recall': 0.9813084112149533, 'f1': 0.963302752293578, 'number': 107} | {'precision': 0.991869918699187, 'recall': 0.976, 'f1': 0.9838709677419355, 'number': 125} | {'precision': 0.9770992366412213, 'recall': 0.9922480620155039, 'f1': 0.9846153846153846, 'number': 129} | {'precision': 0.9926739926739927, 'recall': 0.9906005221932115, 'f1': 0.9916361735493988, 'number': 1915} | {'precision': 0.9940711462450593, 'recall': 0.998015873015873, 'f1': 0.996039603960396, 'number': 504} | {'precision': 0.94, 'recall': 0.94, 'f1': 0.94, 'number': 50} | {'precision': 0.9481481481481482, 'recall': 0.9922480620155039, 'f1': 0.9696969696969696, 'number': 129} | 0.9689 | 0.9728 | 0.9708 | 0.9901 |
Framework versions
- Transformers 4.44.2
- Pytorch 2.4.0+cu121
- Datasets 3.0.0
- Tokenizers 0.19.1
- Downloads last month
- 7
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.