pierreguillou commited on
Commit
a1838db
·
1 Parent(s): 652ba38

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +111 -12
README.md CHANGED
@@ -1,41 +1,140 @@
1
  ---
2
- license: cc-by-nc-sa-4.0
 
 
 
 
 
 
3
  tags:
 
 
4
  - generated_from_trainer
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  metrics:
6
  - precision
7
  - recall
8
  - f1
9
  - accuracy
10
  model-index:
11
- - name: layout-xlm-base-finetuned-DocLayNet-base_paragraphs_ml512-v6
12
- results: []
 
 
 
 
 
 
 
13
  ---
14
 
15
- <!-- This model card has been generated automatically according to the information the Trainer had access to. You
16
- should probably proofread and complete it, then remove this comment. -->
17
 
18
- # layout-xlm-base-finetuned-DocLayNet-base_paragraphs_ml512-v6
19
-
20
- This model is a fine-tuned version of [microsoft/layoutxlm-base](https://huggingface.co/microsoft/layoutxlm-base) on the None dataset.
21
  It achieves the following results on the evaluation set:
 
22
  - Loss: 0.1796
23
  - Precision: 0.8062
24
  - Recall: 0.7441
25
  - F1: 0.7739
26
  - Accuracy: 0.9693
27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  ## Model description
29
 
30
- More information needed
 
 
31
 
32
- ## Intended uses & limitations
33
 
34
- More information needed
35
 
36
  ## Training and evaluation data
37
 
38
- More information needed
39
 
40
  ## Training procedure
41
 
 
1
  ---
2
+ language:
3
+ - multilingual
4
+ - en
5
+ - de
6
+ - fr
7
+ - ja
8
+ license: mit
9
  tags:
10
+ - object-detection
11
+ - vision
12
  - generated_from_trainer
13
+ - DocLayNet
14
+ - LayoutXLM
15
+ - COCO
16
+ - PDF
17
+ - IBM
18
+ - Financial-Reports
19
+ - Finance
20
+ - Manuals
21
+ - Scientific-Articles
22
+ - Science
23
+ - Laws
24
+ - Law
25
+ - Regulations
26
+ - Patents
27
+ - Government-Tenders
28
+ - object-detection
29
+ - image-segmentation
30
+ - token-classification
31
+ inference: false
32
+ datasets:
33
+ - pierreguillou/DocLayNet-base
34
  metrics:
35
  - precision
36
  - recall
37
  - f1
38
  - accuracy
39
  model-index:
40
+ - name: pierreguillou/layout-xlm-base-finetuned-with-DocLayNet-base-at-paragraphlevel-ml512
41
+ results:
42
+ - task:
43
+ name: Token Classification
44
+ type: token-classification
45
+ metrics:
46
+ - name: f1
47
+ type: f1
48
+ value: 0.7739
49
  ---
50
 
51
+ # Document Understanding model (finetuned LiLT base at paragraph level on DocLayNet base)
 
52
 
53
+ This model is a fine-tuned version of [microsoft/layoutxlm-base](https://huggingface.co/microsoft/layoutxlm-base) with the [DocLayNet base](https://huggingface.co/datasets/pierreguillou/DocLayNet-base) dataset.
 
 
54
  It achieves the following results on the evaluation set:
55
+
56
  - Loss: 0.1796
57
  - Precision: 0.8062
58
  - Recall: 0.7441
59
  - F1: 0.7739
60
  - Accuracy: 0.9693
61
 
62
+ ## References
63
+
64
+ ### Other models
65
+
66
+ - LayoutXLM base
67
+ - [Document Understanding model (at paragraph level)](https://huggingface.co/pierreguillou/layout-xlm-base-finetuned-with-DocLayNet-base-at-paragraphlevel-ml512)
68
+ - [Document Understanding model (at paragraph level)](https://huggingface.co/pierreguillou/layout-xlm-base-finetuned-with-DocLayNet-base-at-linelevel-ml384)
69
+ - LiLT base
70
+ - [Document Understanding model (at line level)](https://huggingface.co/pierreguillou/layout-xlm-base-finetuned-with-DocLayNet-base-at-linelevel-ml384)
71
+ - [Document Understanding model (at paragraph level)](https://huggingface.co/pierreguillou/lilt-xlm-roberta-base-finetuned-with-DocLayNet-base-at-paragraphlevel-ml512)
72
+ - [Document Understanding model (at line level)](https://huggingface.co/pierreguillou/lilt-xlm-roberta-base-finetuned-with-DocLayNet-base-at-linelevel-ml384)
73
+
74
+ ### Blog posts
75
+
76
+ - Layout XLM base
77
+ - (03/31/2023) [Document AI | Inference APP and fine-tuning notebook for Document Understanding at paragraph level with LayoutXLM base]()
78
+ - (03/25/2023) [Document AI | APP to compare the Document Understanding LiLT and LayoutXLM (base) models at line level](https://medium.com/@pierre_guillou/document-ai-app-to-compare-the-document-understanding-lilt-and-layoutxlm-base-models-at-line-1c53eb481a15)
79
+ - (03/05/2023) [Document AI | Inference APP and fine-tuning notebook for Document Understanding at line level with LayoutXLM base](https://medium.com/@pierre_guillou/document-ai-inference-app-and-fine-tuning-notebook-for-document-understanding-at-line-level-with-b08fdca5f4dc)
80
+ - LiLT base
81
+ - (02/16/2023) [Document AI | Inference APP and fine-tuning notebook for Document Understanding at paragraph level](https://medium.com/@pierre_guillou/document-ai-inference-app-and-fine-tuning-notebook-for-document-understanding-at-paragraph-level-c18d16e53cf8)
82
+ - (02/14/2023) [Document AI | Inference APP for Document Understanding at line level](https://medium.com/@pierre_guillou/document-ai-inference-app-for-document-understanding-at-line-level-a35bbfa98893)
83
+ - (02/10/2023) [Document AI | Document Understanding model at line level with LiLT, Tesseract and DocLayNet dataset](https://medium.com/@pierre_guillou/document-ai-document-understanding-model-at-line-level-with-lilt-tesseract-and-doclaynet-dataset-347107a643b8)
84
+ - (01/31/2023) [Document AI | DocLayNet image viewer APP](https://medium.com/@pierre_guillou/document-ai-doclaynet-image-viewer-app-3ac54c19956)
85
+ - (01/27/2023) [Document AI | Processing of DocLayNet dataset to be used by layout models of the Hugging Face hub (finetuning, inference)](https://medium.com/@pierre_guillou/document-ai-processing-of-doclaynet-dataset-to-be-used-by-layout-models-of-the-hugging-face-hub-308d8bd81cdb)
86
+
87
+ ### Notebooks (paragraph level)
88
+ - Layout XLM base
89
+ - LiLT base
90
+ - [Document AI | Inference APP at paragraph level with a Document Understanding model (LiLT fine-tuned on DocLayNet dataset)](https://github.com/piegu/language-models/blob/master/Gradio_inference_on_LiLT_model_finetuned_on_DocLayNet_base_in_any_language_at_levelparagraphs_ml512.ipynb)
91
+ - [Document AI | Inference at paragraph level with a Document Understanding model (LiLT fine-tuned on DocLayNet dataset)](https://github.com/piegu/language-models/blob/master/inference_on_LiLT_model_finetuned_on_DocLayNet_base_in_any_language_at_levelparagraphs_ml512.ipynb)
92
+ - [Document AI | Fine-tune LiLT on DocLayNet base in any language at paragraph level (chunk of 512 tokens with overlap)](https://github.com/piegu/language-models/blob/master/Fine_tune_LiLT_on_DocLayNet_base_in_any_language_at_paragraphlevel_ml_512.ipynb)
93
+
94
+ ### Notebooks (line level)
95
+ - Layout XLM base
96
+ - [Document AI | Inference APP at line level with 2 Document Understanding models (LiLT and LayoutXLM base fine-tuned on DocLayNet base dataset)](https://github.com/piegu/language-models/blob/master/Gradio_inference_on_LiLT_&_LayoutXLM_base_model_finetuned_on_DocLayNet_base_in_any_language_at_levellines_ml384.ipynb)
97
+ - [Document AI | Inference at line level with a Document Understanding model (LayoutXLM base fine-tuned on DocLayNet dataset)](https://github.com/piegu/language-models/blob/master/inference_on_LayoutXLM_base_model_finetuned_on_DocLayNet_base_in_any_language_at_levellines_ml384.ipynb)
98
+ - [Document AI | Inference APP at line level with a Document Understanding model (LayoutXLM base fine-tuned on DocLayNet base dataset)](https://github.com/piegu/language-models/blob/master/Gradio_inference_on_LayoutXLM_base_model_finetuned_on_DocLayNet_base_in_any_language_at_levellines_ml384.ipynb)
99
+ - [Document AI | Fine-tune LayoutXLM base on DocLayNet base in any language at line level (chunk of 384 tokens with overlap)](https://github.com/piegu/language-models/blob/master/Fine_tune_LayoutXLM_base_on_DocLayNet_base_in_any_language_at_linelevel_ml_384.ipynb)
100
+ - LiLT base
101
+ - [Document AI | Inference at line level with a Document Understanding model (LiLT fine-tuned on DocLayNet dataset)](https://github.com/piegu/language-models/blob/master/inference_on_LiLT_model_finetuned_on_DocLayNet_base_in_any_language_at_levellines_ml384.ipynb)
102
+ - [Document AI | Inference APP at line level with a Document Understanding model (LiLT fine-tuned on DocLayNet dataset)](https://github.com/piegu/language-models/blob/master/Gradio_inference_on_LiLT_model_finetuned_on_DocLayNet_base_in_any_language_at_levellines_ml384.ipynb)
103
+ - [Document AI | Fine-tune LiLT on DocLayNet base in any language at line level (chunk of 384 tokens with overlap)](https://github.com/piegu/language-models/blob/master/Fine_tune_LiLT_on_DocLayNet_base_in_any_language_at_linelevel_ml_384.ipynb)
104
+ - [DocLayNet image viewer APP](https://github.com/piegu/language-models/blob/master/DocLayNet_image_viewer_APP.ipynb)
105
+ - [Processing of DocLayNet dataset to be used by layout models of the Hugging Face hub (finetuning, inference)](processing_DocLayNet_dataset_to_be_used_by_layout_models_of_HF_hub.ipynb)
106
+
107
+ ## APP
108
+
109
+ You can test this model with this APP in Hugging Face Spaces: [Inference APP for Document Understanding at paragraph level (v2)](https://huggingface.co/spaces/pierreguillou/Inference-APP-Document-Understanding-at-paragraphlevel-v2).
110
+
111
+ ![Inference APP for Document Understanding at paragraph level (v2)](https://huggingface.co/pierreguillou/layout-xlm-base-finetuned-with-DocLayNet-base-at-paragraphlevel-ml512/resolve/main/app_lilt_document_understanding_AI_paragraphlevel_v2.png)
112
+
113
+ You can run as well the corresponding notebook: [Document AI | Inference APP at paragraph level with a Document Understanding model (LayoutXLM base fine-tuned on DocLayNet dataset)]()
114
+
115
+ ## DocLayNet dataset
116
+
117
+ [DocLayNet dataset](https://github.com/DS4SD/DocLayNet) (IBM) provides page-by-page layout segmentation ground-truth using bounding-boxes for 11 distinct class labels on 80863 unique pages from 6 document categories.
118
+
119
+ Until today, the dataset can be downloaded through direct links or as a dataset from Hugging Face datasets:
120
+ - direct links: [doclaynet_core.zip](https://codait-cos-dax.s3.us.cloud-object-storage.appdomain.cloud/dax-doclaynet/1.0.0/DocLayNet_core.zip) (28 GiB), [doclaynet_extra.zip](https://codait-cos-dax.s3.us.cloud-object-storage.appdomain.cloud/dax-doclaynet/1.0.0/DocLayNet_extra.zip) (7.5 GiB)
121
+ - Hugging Face dataset library: [dataset DocLayNet](https://huggingface.co/datasets/ds4sd/DocLayNet)
122
+
123
+ Paper: [DocLayNet: A Large Human-Annotated Dataset for Document-Layout Analysis](https://arxiv.org/abs/2206.01062) (06/02/2022)
124
+
125
  ## Model description
126
 
127
+ The model was finetuned at **paragraph level on chunk of 512 tokens with overlap of 128 tokens**. Thus, the model was trained with all layout and text data of all pages of the dataset.
128
+
129
+ At inference time, a calculation of best probabilities give the label to each paragraph bounding boxes.
130
 
131
+ ## Inference
132
 
133
+ See notebook: [Document AI | Inference at paragraph level with a Document Understanding model (LayoutXLM base fine-tuned on DocLayNet dataset)]()
134
 
135
  ## Training and evaluation data
136
 
137
+ See notebook: [Document AI | Fine-tune LayoutXLM base on DocLayNet base in any language at paragraph level (chunk of 512 tokens with overlap)]()
138
 
139
  ## Training procedure
140