layoutlm-sroie / README.md
shaikhadil26's picture
Update README.md
ecef271 verified
|
raw
history blame
11.6 kB
metadata
library_name: transformers
license: mit
base_model: microsoft/layoutlm-base-uncased
tags:
  - generated_from_trainer
model-index:
  - name: layoutlm-sroie
    results: []

To Use The Model

from transformers import LayoutLMForTokenClassification, LayoutLMv2Processor

   from transformers import LayoutLMForTokenClassification, LayoutLMv2Processor

   model = LayoutLMForTokenClassification.from_pretrained("shaikhadil26/layoutlm-sroie")
   processor = LayoutLMv2Processor.from_pretrained("shaikhadil26/layoutlm-sroie")

layoutlm-sroie

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.0732
  • Address: {'precision': 0.9800577276305432, 'recall': 0.9813452443510247, 'f1': 0.9807010634107917, 'number': 3806}
  • Company: {'precision': 0.9241157556270096, 'recall': 0.9862731640356898, 'f1': 0.9541832669322708, 'number': 1457}
  • Date: {'precision': 0.9520383693045563, 'recall': 0.9706601466992665, 'f1': 0.9612590799031476, 'number': 409}
  • Total: {'precision': 0.6638888888888889, 'recall': 0.6675977653631285, 'f1': 0.6657381615598885, 'number': 358}
  • Overall Precision: 0.9455
  • Overall Recall: 0.9632
  • Overall F1: 0.9542
  • Overall Accuracy: 0.9863

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: 3e-05
  • train_batch_size: 16
  • eval_batch_size: 8
  • seed: 42
  • optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
  • lr_scheduler_type: linear
  • num_epochs: 15
  • mixed_precision_training: Native AMP

Training results

Training Loss Epoch Step Validation Loss Address Company Date Total Overall Precision Overall Recall Overall F1 Overall Accuracy
0.4342 1.0 40 0.0876 {'precision': 0.974816369359916, 'recall': 0.976353126642144, 'f1': 0.9755841428196377, 'number': 3806} {'precision': 0.8865598027127004, 'recall': 0.9869595058339052, 'f1': 0.9340695030854174, 'number': 1457} {'precision': 0.8112449799196787, 'recall': 0.9877750611246944, 'f1': 0.8908489525909592, 'number': 409} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 358} 0.9370 0.9217 0.9293 0.9794
0.0586 2.0 80 0.0591 {'precision': 0.9761780104712042, 'recall': 0.9797687861271677, 'f1': 0.977970102281668, 'number': 3806} {'precision': 0.9187301587301587, 'recall': 0.9931365820178449, 'f1': 0.954485488126649, 'number': 1457} {'precision': 0.8975501113585747, 'recall': 0.9853300733496333, 'f1': 0.9393939393939394, 'number': 409} {'precision': 0.7073170731707317, 'recall': 0.40502793296089384, 'f1': 0.5150976909413854, 'number': 358} 0.9463 0.9493 0.9478 0.9844
0.039 3.0 120 0.0569 {'precision': 0.975006508721687, 'recall': 0.9839726747241198, 'f1': 0.9794690728390218, 'number': 3806} {'precision': 0.9282970550576184, 'recall': 0.9951956074124915, 'f1': 0.9605829744948658, 'number': 1457} {'precision': 0.9232558139534883, 'recall': 0.9706601466992665, 'f1': 0.9463647199046483, 'number': 409} {'precision': 0.6103542234332425, 'recall': 0.6256983240223464, 'f1': 0.6179310344827587, 'number': 358} 0.9381 0.9645 0.9511 0.9852
0.0312 4.0 160 0.0546 {'precision': 0.9765135699373695, 'recall': 0.9831844456121913, 'f1': 0.9798376538360828, 'number': 3806} {'precision': 0.9276105060858424, 'recall': 0.9938229238160604, 'f1': 0.9595758780649436, 'number': 1457} {'precision': 0.9473684210526315, 'recall': 0.9682151589242054, 'f1': 0.9576783555018137, 'number': 409} {'precision': 0.6116504854368932, 'recall': 0.7039106145251397, 'f1': 0.6545454545454545, 'number': 358} 0.9381 0.9682 0.9529 0.9858
0.0246 5.0 200 0.0555 {'precision': 0.9772430028773215, 'recall': 0.9816079873883342, 'f1': 0.9794206317997116, 'number': 3806} {'precision': 0.9298132646490663, 'recall': 0.9910775566231984, 'f1': 0.959468438538206, 'number': 1457} {'precision': 0.9537712895377128, 'recall': 0.9584352078239609, 'f1': 0.9560975609756097, 'number': 409} {'precision': 0.6434108527131783, 'recall': 0.6955307262569832, 'f1': 0.6684563758389261, 'number': 358} 0.9428 0.9653 0.9539 0.9861
0.0206 6.0 240 0.0531 {'precision': 0.9782893015956056, 'recall': 0.9826589595375722, 'f1': 0.9804692620264778, 'number': 3806} {'precision': 0.9414088215931534, 'recall': 0.9814687714481812, 'f1': 0.9610215053763441, 'number': 1457} {'precision': 0.9628712871287128, 'recall': 0.9511002444987775, 'f1': 0.956949569495695, 'number': 409} {'precision': 0.6811594202898551, 'recall': 0.6564245810055865, 'f1': 0.6685633001422475, 'number': 358} 0.9512 0.9609 0.9560 0.9868
0.0166 7.0 280 0.0579 {'precision': 0.9767987486965589, 'recall': 0.9844981607987389, 'f1': 0.9806333420570532, 'number': 3806} {'precision': 0.9272844272844273, 'recall': 0.9890185312285518, 'f1': 0.9571570906675522, 'number': 1457} {'precision': 0.9562043795620438, 'recall': 0.960880195599022, 'f1': 0.9585365853658536, 'number': 409} {'precision': 0.6685236768802229, 'recall': 0.6703910614525139, 'f1': 0.6694560669456067, 'number': 358} 0.9450 0.9653 0.9550 0.9865
0.014 8.0 320 0.0614 {'precision': 0.9785396493064643, 'recall': 0.9823962165002628, 'f1': 0.9804641405532976, 'number': 3806} {'precision': 0.9277885235332044, 'recall': 0.9876458476321208, 'f1': 0.9567819148936171, 'number': 1457} {'precision': 0.9585365853658536, 'recall': 0.960880195599022, 'f1': 0.9597069597069597, 'number': 409} {'precision': 0.6553524804177546, 'recall': 0.7011173184357542, 'f1': 0.6774628879892037, 'number': 358} 0.9444 0.9655 0.9548 0.9865
0.0115 9.0 360 0.0642 {'precision': 0.9800524934383202, 'recall': 0.9810825013137152, 'f1': 0.9805672268907565, 'number': 3806} {'precision': 0.9342875731945348, 'recall': 0.9855868222374743, 'f1': 0.9592518370073482, 'number': 1457} {'precision': 0.9527186761229315, 'recall': 0.9853300733496333, 'f1': 0.9687500000000001, 'number': 409} {'precision': 0.6483516483516484, 'recall': 0.659217877094972, 'f1': 0.6537396121883657, 'number': 358} 0.9470 0.9633 0.9551 0.9865
0.0103 10.0 400 0.0684 {'precision': 0.9808197582764057, 'recall': 0.9808197582764057, 'f1': 0.9808197582764057, 'number': 3806} {'precision': 0.9224358974358975, 'recall': 0.9876458476321208, 'f1': 0.9539277427908518, 'number': 1457} {'precision': 0.9519230769230769, 'recall': 0.9682151589242054, 'f1': 0.96, 'number': 409} {'precision': 0.6473684210526316, 'recall': 0.6871508379888268, 'f1': 0.6666666666666667, 'number': 358} 0.9435 0.9642 0.9537 0.9861
0.0084 11.0 440 0.0704 {'precision': 0.981325618095739, 'recall': 0.9802942722017867, 'f1': 0.9808096740273397, 'number': 3806} {'precision': 0.9265463917525774, 'recall': 0.9869595058339052, 'f1': 0.9557992688600864, 'number': 1457} {'precision': 0.9519230769230769, 'recall': 0.9682151589242054, 'f1': 0.96, 'number': 409} {'precision': 0.6497326203208557, 'recall': 0.6787709497206704, 'f1': 0.6639344262295083, 'number': 358} 0.9453 0.9632 0.9542 0.9863
0.0077 12.0 480 0.0704 {'precision': 0.9805672268907563, 'recall': 0.9810825013137152, 'f1': 0.9808247964276333, 'number': 3806} {'precision': 0.931950745301361, 'recall': 0.9869595058339052, 'f1': 0.9586666666666667, 'number': 1457} {'precision': 0.9544364508393285, 'recall': 0.9731051344743277, 'f1': 0.963680387409201, 'number': 409} {'precision': 0.6764705882352942, 'recall': 0.6424581005586593, 'f1': 0.6590257879656161, 'number': 358} 0.9496 0.9619 0.9557 0.9867
0.0075 13.0 520 0.0728 {'precision': 0.9792976939203354, 'recall': 0.9818707304256438, 'f1': 0.9805825242718447, 'number': 3806} {'precision': 0.9258542875564152, 'recall': 0.9855868222374743, 'f1': 0.9547872340425532, 'number': 1457} {'precision': 0.9538834951456311, 'recall': 0.960880195599022, 'f1': 0.9573690621193666, 'number': 409} {'precision': 0.6502732240437158, 'recall': 0.664804469273743, 'f1': 0.6574585635359116, 'number': 358} 0.9445 0.9625 0.9534 0.9861
0.0068 14.0 560 0.0732 {'precision': 0.9805723286951956, 'recall': 0.9813452443510247, 'f1': 0.9809586342744582, 'number': 3806} {'precision': 0.9229287090558767, 'recall': 0.9862731640356898, 'f1': 0.953550099535501, 'number': 1457} {'precision': 0.9520383693045563, 'recall': 0.9706601466992665, 'f1': 0.9612590799031476, 'number': 409} {'precision': 0.667590027700831, 'recall': 0.6731843575418994, 'f1': 0.6703755215577191, 'number': 358} 0.9456 0.9635 0.9545 0.9864
0.0066 15.0 600 0.0732 {'precision': 0.9800577276305432, 'recall': 0.9813452443510247, 'f1': 0.9807010634107917, 'number': 3806} {'precision': 0.9241157556270096, 'recall': 0.9862731640356898, 'f1': 0.9541832669322708, 'number': 1457} {'precision': 0.9520383693045563, 'recall': 0.9706601466992665, 'f1': 0.9612590799031476, 'number': 409} {'precision': 0.6638888888888889, 'recall': 0.6675977653631285, 'f1': 0.6657381615598885, 'number': 358} 0.9455 0.9632 0.9542 0.9863

Framework versions

  • Transformers 4.46.2
  • Pytorch 2.5.0+cu121
  • Datasets 3.1.0
  • Tokenizers 0.20.3