Downloads · 30 days
19
4% of all-time downloads
doc2txt/layoutlmv2_cord
layoutlmv2_cord is a token classification model from doc2txt. Use it when you need labels on individual words, such as names. It is set up for transformers. The card lists the license as cc-by-nc-sa-4.0.
should probably proofread and complete it, then remove this comment. -- I use this colab: https://colab.research.google.com/drive/1AXh3G3-VmbMWlwbSvesVIurzNlcezTce?usp=sharing
Downloads · 30 days
19
4% of all-time downloads
All-time downloads
510
Public
Parameters
201M
1.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors802 MB · 100%
From the Hugging Face model README
I use this colab: https://colab.research.google.com/drive/1AXh3G3-VmbMWlwbSvesVIurzNlcezTce?usp=sharing
to Fine tuning LayoutLMv2ForTokenClassification on CORD dataset
here is the result: https://huggingface.co/doc2txt/layoutlmv2-finetuned-cord
and indeed the result are pretty amazing when running on the test set, however when running on any other receipt (printed or pdf) the result are completely off
So from some reason the model is overfitting to the cord dataset, even though I use similar images for testing.
I don't think that there is a Data leakage unless the cord DS is not clean (which I assume it is clean)
What could be the reason for this? Is it some inherent property of LayoutLM? The LayoutLM models are somewhat old, and it seems deserted...
I don't have much experience so I would appreciate any info Thanks
here is an example code of how to run this model on a specific img folder: https://huggingface.co/doc2txt/layoutlmv2-finetuned-cord/blob/main/LayoutLMv2Main_cord2_gOcr_folder.py
This model is a fine-tuned version of microsoft/layoutlmv2-base-uncased on the cord dataset. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy |
|---|---|---|---|---|---|---|---|
| No log | 1.0 | 400 | 1.2752 | 0.8527 | 0.8382 | 0.8454 | 0.8481 |
| 1.9583 | 2.0 | 800 | 0.6372 | 0.8799 | 0.8948 | 0.8873 | 0.9021 |
| 0.7097 | 3.0 | 1200 | 0.4255 | 0.9241 | 0.9264 | 0.9253 | 0.9414 |
| 0.3845 | 4.0 | 1600 | 0.3021 | 0.9414 | 0.9482 | 0.9448 | 0.9611 |
| 0.2699 | 5.0 | 2000 | 0.2819 | 0.9653 | 0.9676 | 0.9665 | 0.9703 |