JoheunKang
commited on
Commit
•
f2f1526
1
Parent(s):
990f35c
Upload folder using huggingface_hub
Browse files- .gitattributes +6 -0
- best_accuracy.pdopt +3 -0
- best_accuracy/metric.states +0 -0
- best_accuracy/model_config.json +45 -0
- best_accuracy/model_state.pdparams +3 -0
- best_model/model.pdopt +3 -0
- best_model/model_config.json +45 -0
- best_model/model_state.pdparams +3 -0
- config.yml +161 -0
- latest.pdopt +3 -0
- latest/metric.states +0 -0
- latest/model_config.json +45 -0
- latest/model_state.pdparams +3 -0
- train.log +0 -0
.gitattributes
CHANGED
@@ -33,3 +33,9 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
best_accuracy/model_state.pdparams filter=lfs diff=lfs merge=lfs -text
|
37 |
+
best_accuracy.pdopt filter=lfs diff=lfs merge=lfs -text
|
38 |
+
best_model/model.pdopt filter=lfs diff=lfs merge=lfs -text
|
39 |
+
best_model/model_state.pdparams filter=lfs diff=lfs merge=lfs -text
|
40 |
+
latest/model_state.pdparams filter=lfs diff=lfs merge=lfs -text
|
41 |
+
latest.pdopt filter=lfs diff=lfs merge=lfs -text
|
best_accuracy.pdopt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3e0d10ed58c0f46f4e5b76ff2648146636ce057ba838e95bd18a23d011da2ea0
|
3 |
+
size 2224406688
|
best_accuracy/metric.states
ADDED
Binary file (384 Bytes). View file
|
|
best_accuracy/model_config.json
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"num_classes": 79,
|
3 |
+
"dropout": null,
|
4 |
+
"init_args": [
|
5 |
+
{
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"bos_token_id": 0,
|
8 |
+
"coordinate_size": 128,
|
9 |
+
"eos_token_id": 2,
|
10 |
+
"fast_qkv": false,
|
11 |
+
"gradient_checkpointing": false,
|
12 |
+
"has_relative_attention_bias": false,
|
13 |
+
"has_spatial_attention_bias": false,
|
14 |
+
"has_visual_segment_embedding": true,
|
15 |
+
"use_visual_backbone": false,
|
16 |
+
"hidden_act": "gelu",
|
17 |
+
"hidden_dropout_prob": 0.1,
|
18 |
+
"hidden_size": 768,
|
19 |
+
"image_feature_pool_shape": [
|
20 |
+
7,
|
21 |
+
7,
|
22 |
+
256
|
23 |
+
],
|
24 |
+
"initializer_range": 0.02,
|
25 |
+
"intermediate_size": 3072,
|
26 |
+
"layer_norm_eps": 1e-05,
|
27 |
+
"max_2d_position_embeddings": 1024,
|
28 |
+
"max_position_embeddings": 514,
|
29 |
+
"max_rel_2d_pos": 256,
|
30 |
+
"max_rel_pos": 128,
|
31 |
+
"model_type": "layoutlmv2",
|
32 |
+
"num_attention_heads": 12,
|
33 |
+
"num_hidden_layers": 12,
|
34 |
+
"output_past": true,
|
35 |
+
"pad_token_id": 1,
|
36 |
+
"shape_size": 128,
|
37 |
+
"rel_2d_pos_bins": 64,
|
38 |
+
"rel_pos_bins": 32,
|
39 |
+
"type_vocab_size": 1,
|
40 |
+
"vocab_size": 250002,
|
41 |
+
"init_class": "LayoutXLMModel"
|
42 |
+
}
|
43 |
+
],
|
44 |
+
"init_class": "LayoutXLMForTokenClassification"
|
45 |
+
}
|
best_accuracy/model_state.pdparams
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bc2883904bf8874460c2771be1fd97a9d45950b770216d8ebf18a21a79da1832
|
3 |
+
size 1114551884
|
best_model/model.pdopt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3e0d10ed58c0f46f4e5b76ff2648146636ce057ba838e95bd18a23d011da2ea0
|
3 |
+
size 2224406688
|
best_model/model_config.json
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"num_classes": 79,
|
3 |
+
"dropout": null,
|
4 |
+
"init_args": [
|
5 |
+
{
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"bos_token_id": 0,
|
8 |
+
"coordinate_size": 128,
|
9 |
+
"eos_token_id": 2,
|
10 |
+
"fast_qkv": false,
|
11 |
+
"gradient_checkpointing": false,
|
12 |
+
"has_relative_attention_bias": false,
|
13 |
+
"has_spatial_attention_bias": false,
|
14 |
+
"has_visual_segment_embedding": true,
|
15 |
+
"use_visual_backbone": false,
|
16 |
+
"hidden_act": "gelu",
|
17 |
+
"hidden_dropout_prob": 0.1,
|
18 |
+
"hidden_size": 768,
|
19 |
+
"image_feature_pool_shape": [
|
20 |
+
7,
|
21 |
+
7,
|
22 |
+
256
|
23 |
+
],
|
24 |
+
"initializer_range": 0.02,
|
25 |
+
"intermediate_size": 3072,
|
26 |
+
"layer_norm_eps": 1e-05,
|
27 |
+
"max_2d_position_embeddings": 1024,
|
28 |
+
"max_position_embeddings": 514,
|
29 |
+
"max_rel_2d_pos": 256,
|
30 |
+
"max_rel_pos": 128,
|
31 |
+
"model_type": "layoutlmv2",
|
32 |
+
"num_attention_heads": 12,
|
33 |
+
"num_hidden_layers": 12,
|
34 |
+
"output_past": true,
|
35 |
+
"pad_token_id": 1,
|
36 |
+
"shape_size": 128,
|
37 |
+
"rel_2d_pos_bins": 64,
|
38 |
+
"rel_pos_bins": 32,
|
39 |
+
"type_vocab_size": 1,
|
40 |
+
"vocab_size": 250002,
|
41 |
+
"init_class": "LayoutXLMModel"
|
42 |
+
}
|
43 |
+
],
|
44 |
+
"init_class": "LayoutXLMForTokenClassification"
|
45 |
+
}
|
best_model/model_state.pdparams
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bc2883904bf8874460c2771be1fd97a9d45950b770216d8ebf18a21a79da1832
|
3 |
+
size 1114551884
|
config.yml
ADDED
@@ -0,0 +1,161 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Global:
|
2 |
+
use_gpu: true
|
3 |
+
epoch_num: 200
|
4 |
+
log_smooth_window: 10
|
5 |
+
print_batch_step: 10
|
6 |
+
save_model_dir: ./output/ser_vi_layoutxlm_xfund_zh
|
7 |
+
save_epoch_step: 2000
|
8 |
+
eval_batch_step:
|
9 |
+
- 0
|
10 |
+
- 19
|
11 |
+
cal_metric_during_train: false
|
12 |
+
save_inference_dir: null
|
13 |
+
use_visualdl: false
|
14 |
+
seed: 2022
|
15 |
+
infer_img: ppstructure/docs/kie/input/zh_val_42.jpg
|
16 |
+
d2s_train_image_shape:
|
17 |
+
- 3
|
18 |
+
- 224
|
19 |
+
- 224
|
20 |
+
save_res_path: /content/PaddleOCR/output/ser_layoutxlm_xfund_zh/res
|
21 |
+
kie_rec_model_dir: null
|
22 |
+
kie_det_model_dir: null
|
23 |
+
amp_custom_white_list:
|
24 |
+
- scale
|
25 |
+
- concat
|
26 |
+
- elementwise_add
|
27 |
+
Architecture:
|
28 |
+
model_type: kie
|
29 |
+
algorithm: LayoutXLM
|
30 |
+
Transform: null
|
31 |
+
Backbone:
|
32 |
+
name: LayoutXLMForSer
|
33 |
+
pretrained: true
|
34 |
+
checkpoints: null
|
35 |
+
mode: vi
|
36 |
+
num_classes: 79
|
37 |
+
Loss:
|
38 |
+
name: VQASerTokenLayoutLMLoss
|
39 |
+
num_classes: 79
|
40 |
+
key: backbone_out
|
41 |
+
Optimizer:
|
42 |
+
name: AdamW
|
43 |
+
beta1: 0.9
|
44 |
+
beta2: 0.999
|
45 |
+
lr:
|
46 |
+
name: Linear
|
47 |
+
learning_rate: 5.0e-05
|
48 |
+
epochs: 200
|
49 |
+
warmup_epoch: 2
|
50 |
+
regularizer:
|
51 |
+
name: L2
|
52 |
+
factor: 0.0
|
53 |
+
PostProcess:
|
54 |
+
name: VQASerTokenLayoutLMPostProcess
|
55 |
+
class_path: /content/PaddleOCR/dataset/class_list_jmfunsd.txt
|
56 |
+
Metric:
|
57 |
+
name: VQASerTokenMetric
|
58 |
+
main_indicator: hmean
|
59 |
+
Train:
|
60 |
+
dataset:
|
61 |
+
name: SimpleDataSet
|
62 |
+
data_dir: /content/PaddleOCR/dataset/training_data/images
|
63 |
+
label_file_list:
|
64 |
+
- /content/PaddleOCR/dataset/train.json
|
65 |
+
ratio_list:
|
66 |
+
- 1.0
|
67 |
+
transforms:
|
68 |
+
- DecodeImage:
|
69 |
+
img_mode: RGB
|
70 |
+
channel_first: false
|
71 |
+
- VQATokenLabelEncode:
|
72 |
+
contains_re: false
|
73 |
+
algorithm: LayoutXLM
|
74 |
+
class_path: /content/PaddleOCR/dataset/class_list_jmfunsd.txt
|
75 |
+
use_textline_bbox_info: true
|
76 |
+
order_method: tb-yx
|
77 |
+
- VQATokenPad:
|
78 |
+
max_seq_len: 512
|
79 |
+
return_attention_mask: true
|
80 |
+
- VQASerTokenChunk:
|
81 |
+
max_seq_len: 512
|
82 |
+
- Resize:
|
83 |
+
size:
|
84 |
+
- 224
|
85 |
+
- 224
|
86 |
+
- NormalizeImage:
|
87 |
+
scale: 1
|
88 |
+
mean:
|
89 |
+
- 123.675
|
90 |
+
- 116.28
|
91 |
+
- 103.53
|
92 |
+
std:
|
93 |
+
- 58.395
|
94 |
+
- 57.12
|
95 |
+
- 57.375
|
96 |
+
order: hwc
|
97 |
+
- ToCHWImage: null
|
98 |
+
- KeepKeys:
|
99 |
+
keep_keys:
|
100 |
+
- input_ids
|
101 |
+
- bbox
|
102 |
+
- attention_mask
|
103 |
+
- token_type_ids
|
104 |
+
- image
|
105 |
+
- labels
|
106 |
+
loader:
|
107 |
+
shuffle: true
|
108 |
+
drop_last: false
|
109 |
+
batch_size_per_card: 8
|
110 |
+
num_workers: 4
|
111 |
+
Eval:
|
112 |
+
dataset:
|
113 |
+
name: SimpleDataSet
|
114 |
+
data_dir: /content/PaddleOCR/dataset/testing_data/images
|
115 |
+
label_file_list:
|
116 |
+
- /content/PaddleOCR/dataset/test.json
|
117 |
+
transforms:
|
118 |
+
- DecodeImage:
|
119 |
+
img_mode: RGB
|
120 |
+
channel_first: false
|
121 |
+
- VQATokenLabelEncode:
|
122 |
+
contains_re: false
|
123 |
+
algorithm: LayoutXLM
|
124 |
+
class_path: /content/PaddleOCR/dataset/class_list_jmfunsd.txt
|
125 |
+
use_textline_bbox_info: true
|
126 |
+
order_method: tb-yx
|
127 |
+
- VQATokenPad:
|
128 |
+
max_seq_len: 512
|
129 |
+
return_attention_mask: true
|
130 |
+
- VQASerTokenChunk:
|
131 |
+
max_seq_len: 512
|
132 |
+
- Resize:
|
133 |
+
size:
|
134 |
+
- 224
|
135 |
+
- 224
|
136 |
+
- NormalizeImage:
|
137 |
+
scale: 1
|
138 |
+
mean:
|
139 |
+
- 123.675
|
140 |
+
- 116.28
|
141 |
+
- 103.53
|
142 |
+
std:
|
143 |
+
- 58.395
|
144 |
+
- 57.12
|
145 |
+
- 57.375
|
146 |
+
order: hwc
|
147 |
+
- ToCHWImage: null
|
148 |
+
- KeepKeys:
|
149 |
+
keep_keys:
|
150 |
+
- input_ids
|
151 |
+
- bbox
|
152 |
+
- attention_mask
|
153 |
+
- token_type_ids
|
154 |
+
- image
|
155 |
+
- labels
|
156 |
+
loader:
|
157 |
+
shuffle: false
|
158 |
+
drop_last: false
|
159 |
+
batch_size_per_card: 8
|
160 |
+
num_workers: 4
|
161 |
+
profiler_options: null
|
latest.pdopt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:521df5a5ebcf90aa3402b2370452cce35023c6381d7e92fed9b99e1942462e6a
|
3 |
+
size 2224406688
|
latest/metric.states
ADDED
Binary file (384 Bytes). View file
|
|
latest/model_config.json
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"num_classes": 79,
|
3 |
+
"dropout": null,
|
4 |
+
"init_args": [
|
5 |
+
{
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"bos_token_id": 0,
|
8 |
+
"coordinate_size": 128,
|
9 |
+
"eos_token_id": 2,
|
10 |
+
"fast_qkv": false,
|
11 |
+
"gradient_checkpointing": false,
|
12 |
+
"has_relative_attention_bias": false,
|
13 |
+
"has_spatial_attention_bias": false,
|
14 |
+
"has_visual_segment_embedding": true,
|
15 |
+
"use_visual_backbone": false,
|
16 |
+
"hidden_act": "gelu",
|
17 |
+
"hidden_dropout_prob": 0.1,
|
18 |
+
"hidden_size": 768,
|
19 |
+
"image_feature_pool_shape": [
|
20 |
+
7,
|
21 |
+
7,
|
22 |
+
256
|
23 |
+
],
|
24 |
+
"initializer_range": 0.02,
|
25 |
+
"intermediate_size": 3072,
|
26 |
+
"layer_norm_eps": 1e-05,
|
27 |
+
"max_2d_position_embeddings": 1024,
|
28 |
+
"max_position_embeddings": 514,
|
29 |
+
"max_rel_2d_pos": 256,
|
30 |
+
"max_rel_pos": 128,
|
31 |
+
"model_type": "layoutlmv2",
|
32 |
+
"num_attention_heads": 12,
|
33 |
+
"num_hidden_layers": 12,
|
34 |
+
"output_past": true,
|
35 |
+
"pad_token_id": 1,
|
36 |
+
"shape_size": 128,
|
37 |
+
"rel_2d_pos_bins": 64,
|
38 |
+
"rel_pos_bins": 32,
|
39 |
+
"type_vocab_size": 1,
|
40 |
+
"vocab_size": 250002,
|
41 |
+
"init_class": "LayoutXLMModel"
|
42 |
+
}
|
43 |
+
],
|
44 |
+
"init_class": "LayoutXLMForTokenClassification"
|
45 |
+
}
|
latest/model_state.pdparams
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:25a3c91294ea276505641f8f223f66e6006e8860ee50715b1d16d977bedb799c
|
3 |
+
size 1114551884
|
train.log
ADDED
The diff for this file is too large to render.
See raw diff
|
|