pierreguillou commited on
Commit
8e15984
1 Parent(s): 74be049

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +87 -8
README.md CHANGED
@@ -1,41 +1,120 @@
1
  ---
 
 
 
 
 
 
2
  license: mit
3
  tags:
 
 
4
  - generated_from_trainer
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  metrics:
6
  - precision
7
  - recall
8
  - f1
9
  - accuracy
10
  model-index:
11
- - name: lilt-xlm-roberta-base-finetuned-DocLayNet-base_paragraphs_ml512-v5
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
- # lilt-xlm-roberta-base-finetuned-DocLayNet-base_paragraphs_ml512-v5
19
 
20
- This model is a fine-tuned version of [nielsr/lilt-xlm-roberta-base](https://huggingface.co/nielsr/lilt-xlm-roberta-base) on an unknown dataset.
21
  It achieves the following results on the evaluation set:
 
22
  - Loss: 0.4104
23
  - Precision: 0.8634
24
  - Recall: 0.8634
25
  - F1: 0.8634
26
  - Accuracy: 0.8634
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
+ - COCO
15
+ - PDF
16
+ - IBM
17
+ - Financial-Reports
18
+ - Finance
19
+ - Manuals
20
+ - Scientific-Articles
21
+ - Science
22
+ - Laws
23
+ - Law
24
+ - Regulations
25
+ - Patents
26
+ - Government-Tenders
27
+ - object-detection
28
+ - image-segmentation
29
+ - token-classification
30
+ datasets:
31
+ - pierreguillou/DocLayNet-base
32
  metrics:
33
  - precision
34
  - recall
35
  - f1
36
  - accuracy
37
  model-index:
38
+ - name: lilt-xlm-roberta-base-finetuned-with-DocLayNet-base-at-paragraphlevel-ml512
39
+ results:
40
+ - task:
41
+ name: Token Classification
42
+ type: token-classification
43
+ metrics:
44
+ - name: f1
45
+ type: f1
46
+ value: 0.8634
47
  ---
48
 
49
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
50
  should probably proofread and complete it, then remove this comment. -->
51
 
52
+ # Document Understanding model (at paragraph level)
53
 
54
+ This model is a fine-tuned version of [nielsr/lilt-xlm-roberta-base](https://huggingface.co/nielsr/lilt-xlm-roberta-base) with the [DocLayNet base](https://huggingface.co/datasets/pierreguillou/DocLayNet-base) dataset.
55
  It achieves the following results on the evaluation set:
56
+
57
  - Loss: 0.4104
58
  - Precision: 0.8634
59
  - Recall: 0.8634
60
  - F1: 0.8634
61
  - Accuracy: 0.8634
62
 
63
+ ## References
64
+
65
+ ### Blog posts
66
+
67
+ - (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)
68
+ - (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)
69
+ - (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)
70
+ - (01/31/2023) [Document AI | DocLayNet image viewer APP](https://medium.com/@pierre_guillou/document-ai-doclaynet-image-viewer-app-3ac54c19956)
71
+ - (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)
72
+
73
+ ### Notebooks (paragraph level)
74
+
75
+ - [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)
76
+ - [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)
77
+ - [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)
78
+
79
+ ### Notebooks (line level)
80
+
81
+ - [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)
82
+ - [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)
83
+ - [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)
84
+ - [DocLayNet image viewer APP](https://github.com/piegu/language-models/blob/master/DocLayNet_image_viewer_APP.ipynb)
85
+ - [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)
86
+
87
+ ## APP
88
+
89
+ You can test this model with this APP in Hugging Face Spaces: [Inference APP for Document Understanding at paragraph level (v1)](https://huggingface.co/spaces/pierreguillou/Inference-APP-Document-Understanding-at-paragraphlevel-v1).
90
+
91
+ ![Inference APP for Document Understanding at paragraph level (v1)](https://huggingface.co/pierreguillou/lilt-xlm-roberta-base-finetuned-with-DocLayNet-base-at-paragraphlevel-ml512/resolve/main/app_lilt_document_understanding_AI.png)
92
+
93
+ You can run as well the corresponding notebook: [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)
94
+
95
+ ## DocLayNet dataset
96
+
97
+ [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.
98
+
99
+ Until today, the dataset can be downloaded through direct links or as a dataset from Hugging Face datasets:
100
+ - 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)
101
+ - Hugging Face dataset library: [dataset DocLayNet](https://huggingface.co/datasets/ds4sd/DocLayNet)
102
+
103
+ Paper: [DocLayNet: A Large Human-Annotated Dataset for Document-Layout Analysis](https://arxiv.org/abs/2206.01062) (06/02/2022)
104
+
105
  ## Model description
106
 
107
+ 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.
108
+
109
+ At inference time, a calculation of best probabilities give the label to each paragraph bounding boxes.
110
 
111
+ ## Inference
112
 
113
+ See notebook: [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)
114
 
115
  ## Training and evaluation data
116
 
117
+ See notebook: [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)
118
 
119
  ## Training procedure
120