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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"activation_dropout": 0.0,
|
| 3 |
+
"activation_function": "silu",
|
| 4 |
+
"anchor_image_size": null,
|
| 5 |
+
"architectures": [
|
| 6 |
+
"PPDocLayoutV2ForObjectDetection"
|
| 7 |
+
],
|
| 8 |
+
"attention_dropout": 0.0,
|
| 9 |
+
"backbone": null,
|
| 10 |
+
"backbone_config": {
|
| 11 |
+
"model_type": "hgnet_v2",
|
| 12 |
+
"arch": "L",
|
| 13 |
+
"return_idx": [1, 2, 3],
|
| 14 |
+
"freeze_stem_only": true,
|
| 15 |
+
"freeze_at": 0,
|
| 16 |
+
"freeze_norm": true,
|
| 17 |
+
"lr_mult_list": [0, 0.05, 0.05, 0.05, 0.05],
|
| 18 |
+
"out_features": ["stage2", "stage3", "stage4"]
|
| 19 |
+
},
|
| 20 |
+
"backbone_kwargs": null,
|
| 21 |
+
"batch_norm_eps": 1e-05,
|
| 22 |
+
"box_noise_scale": 1.0,
|
| 23 |
+
"d_model": 256,
|
| 24 |
+
"decoder_activation_function": "relu",
|
| 25 |
+
"decoder_attention_heads": 8,
|
| 26 |
+
"decoder_ffn_dim": 1024,
|
| 27 |
+
"decoder_in_channels": [
|
| 28 |
+
256,
|
| 29 |
+
256,
|
| 30 |
+
256
|
| 31 |
+
],
|
| 32 |
+
"decoder_layers": 6,
|
| 33 |
+
"decoder_n_points": 4,
|
| 34 |
+
"disable_custom_kernels": true,
|
| 35 |
+
"dropout": 0.0,
|
| 36 |
+
"encode_proj_layers": [
|
| 37 |
+
2
|
| 38 |
+
],
|
| 39 |
+
"encoder_activation_function": "gelu",
|
| 40 |
+
"encoder_attention_heads": 8,
|
| 41 |
+
"encoder_ffn_dim": 1024,
|
| 42 |
+
"encoder_hidden_dim": 256,
|
| 43 |
+
"encoder_in_channels": [
|
| 44 |
+
512,
|
| 45 |
+
1024,
|
| 46 |
+
2048
|
| 47 |
+
],
|
| 48 |
+
"encoder_layers": 1,
|
| 49 |
+
"eos_coefficient": 0.0001,
|
| 50 |
+
"eval_size": null,
|
| 51 |
+
"feat_strides": [
|
| 52 |
+
8,
|
| 53 |
+
16,
|
| 54 |
+
32
|
| 55 |
+
],
|
| 56 |
+
"hidden_expansion": 1.0,
|
| 57 |
+
"id2label": {
|
| 58 |
+
"0": "abstract",
|
| 59 |
+
"1": "algorithm",
|
| 60 |
+
"2": "aside_text",
|
| 61 |
+
"3": "chart",
|
| 62 |
+
"4": "content",
|
| 63 |
+
"5": "formula",
|
| 64 |
+
"6": "doc_title",
|
| 65 |
+
"7": "figure_title",
|
| 66 |
+
"8": "footer",
|
| 67 |
+
"9": "footer",
|
| 68 |
+
"10": "footnote",
|
| 69 |
+
"11": "formula_number",
|
| 70 |
+
"12": "header",
|
| 71 |
+
"13": "header",
|
| 72 |
+
"14": "image",
|
| 73 |
+
"15": "formula",
|
| 74 |
+
"16": "number",
|
| 75 |
+
"17": "paragraph_title",
|
| 76 |
+
"18": "reference",
|
| 77 |
+
"19": "reference_content",
|
| 78 |
+
"20": "seal",
|
| 79 |
+
"21": "table",
|
| 80 |
+
"22": "text",
|
| 81 |
+
"23": "text",
|
| 82 |
+
"24": "vision_footnote"
|
| 83 |
+
},
|
| 84 |
+
"initializer_range": 0.01,
|
| 85 |
+
"is_encoder_decoder": true,
|
| 86 |
+
"label2id": {},
|
| 87 |
+
"label_noise_ratio": 0.5,
|
| 88 |
+
"layer_norm_eps": 1e-05,
|
| 89 |
+
"learn_initial_query": false,
|
| 90 |
+
"matcher_alpha": 0.25,
|
| 91 |
+
"matcher_bbox_cost": 5.0,
|
| 92 |
+
"matcher_class_cost": 2.0,
|
| 93 |
+
"matcher_gamma": 2.0,
|
| 94 |
+
"matcher_giou_cost": 2.0,
|
| 95 |
+
"model_type": "pp_doclayout_v2",
|
| 96 |
+
"normalize_before": false,
|
| 97 |
+
"num_denoising": 100,
|
| 98 |
+
"num_feature_levels": 3,
|
| 99 |
+
"num_queries": 300,
|
| 100 |
+
"positional_encoding_temperature": 10000,
|
| 101 |
+
"torch_dtype": "float32",
|
| 102 |
+
"use_pretrained_backbone": false,
|
| 103 |
+
"use_timm_backbone": false,
|
| 104 |
+
"reading_oreder": {
|
| 105 |
+
"hidden_size": 512,
|
| 106 |
+
"num_attention_heads": 8,
|
| 107 |
+
"attention_probs_dropout_prob": 0.1,
|
| 108 |
+
"has_relative_attention_bias": false,
|
| 109 |
+
"has_spatial_attention_bias": true,
|
| 110 |
+
"layer_norm_eps": 1e-5,
|
| 111 |
+
"hidden_dropout_prob": 0.1,
|
| 112 |
+
"intermediate_size": 2048,
|
| 113 |
+
"hidden_act": "gelu",
|
| 114 |
+
"num_hidden_layers": 6,
|
| 115 |
+
"rel_pos_bins": 32,
|
| 116 |
+
"max_rel_pos": 128,
|
| 117 |
+
"rel_2d_pos_bins": 64,
|
| 118 |
+
"max_rel_2d_pos": 256,
|
| 119 |
+
"num_labels": 510,
|
| 120 |
+
"max_position_embeddings": 514,
|
| 121 |
+
"max_2d_position_embeddings": 1024,
|
| 122 |
+
"type_vocab_size": 1,
|
| 123 |
+
"vocab_size": 4,
|
| 124 |
+
"start_token_id": 0,
|
| 125 |
+
"pad_token_id": 1,
|
| 126 |
+
"end_token_id": 2,
|
| 127 |
+
"pred_token_id": 3,
|
| 128 |
+
"coordinate_size": 171,
|
| 129 |
+
"shape_size": 170,
|
| 130 |
+
"num_classes": 20,
|
| 131 |
+
"rel_bias_embed_dim": 16,
|
| 132 |
+
"rel_bias_temperature": 10000,
|
| 133 |
+
"rel_bias_scale": 100,
|
| 134 |
+
"relative_head_num": 1,
|
| 135 |
+
"relative_head_size": 64,
|
| 136 |
+
"tril_mask": true
|
| 137 |
+
},
|
| 138 |
+
"threshold_mapping": {
|
| 139 |
+
"abstract": 0.50,
|
| 140 |
+
"algorithm": 0.50,
|
| 141 |
+
"aside_text": 0.50,
|
| 142 |
+
"chart": 0.50,
|
| 143 |
+
"content": 0.50,
|
| 144 |
+
"formula": 0.40,
|
| 145 |
+
"doc_title": 0.40,
|
| 146 |
+
"figure_title": 0.50,
|
| 147 |
+
"footer": 0.50,
|
| 148 |
+
"footnote": 0.50,
|
| 149 |
+
"formula_number": 0.50,
|
| 150 |
+
"header": 0.50,
|
| 151 |
+
"image": 0.50,
|
| 152 |
+
"number": 0.50,
|
| 153 |
+
"paragraph_title": 0.40,
|
| 154 |
+
"reference": 0.50,
|
| 155 |
+
"reference_content": 0.50,
|
| 156 |
+
"seal": 0.45,
|
| 157 |
+
"table": 0.50,
|
| 158 |
+
"text": 0.40,
|
| 159 |
+
"vision_footnote": 0.50
|
| 160 |
+
},
|
| 161 |
+
"order_map": {
|
| 162 |
+
"abstract": 4,
|
| 163 |
+
"algorithm": 2,
|
| 164 |
+
"aside_text": 14,
|
| 165 |
+
"chart": 1,
|
| 166 |
+
"content": 5,
|
| 167 |
+
"display_formula": 7,
|
| 168 |
+
"doc_title": 8,
|
| 169 |
+
"figure_title": 6,
|
| 170 |
+
"footer": 11,
|
| 171 |
+
"footer_image": 11,
|
| 172 |
+
"footnote": 9,
|
| 173 |
+
"formula_number": 13,
|
| 174 |
+
"header": 10,
|
| 175 |
+
"header_image": 10,
|
| 176 |
+
"image": 1,
|
| 177 |
+
"inline_formula": 2,
|
| 178 |
+
"number": 3,
|
| 179 |
+
"paragraph_title": 0,
|
| 180 |
+
"reference": 2,
|
| 181 |
+
"reference_content": 2,
|
| 182 |
+
"seal": 12,
|
| 183 |
+
"table": 1,
|
| 184 |
+
"text": 2,
|
| 185 |
+
"vertical_text": 15,
|
| 186 |
+
"vision_footnote": 6
|
| 187 |
+
}
|
| 188 |
+
}
|
| 189 |
+
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a4ecb953cc68bd6e419f4df046cec9ba90815af605658b6ea392e985c4fe173d
|
| 3 |
+
size 214798572
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_valid_processor_keys": [
|
| 3 |
+
"images",
|
| 4 |
+
"do_resize",
|
| 5 |
+
"size",
|
| 6 |
+
"resample",
|
| 7 |
+
"do_rescale",
|
| 8 |
+
"rescale_factor",
|
| 9 |
+
"do_normalize",
|
| 10 |
+
"image_mean",
|
| 11 |
+
"image_std",
|
| 12 |
+
"return_tensors",
|
| 13 |
+
"data_format",
|
| 14 |
+
"input_data_format"
|
| 15 |
+
],
|
| 16 |
+
"do_normalize": true,
|
| 17 |
+
"do_rescale": true,
|
| 18 |
+
"do_resize": true,
|
| 19 |
+
"image_mean": [
|
| 20 |
+
0,
|
| 21 |
+
0,
|
| 22 |
+
0
|
| 23 |
+
],
|
| 24 |
+
"image_processor_type": "PPDocLayoutV2ImageProcessor",
|
| 25 |
+
"image_std": [
|
| 26 |
+
1,
|
| 27 |
+
1,
|
| 28 |
+
1
|
| 29 |
+
],
|
| 30 |
+
"resample": 3,
|
| 31 |
+
"rescale_factor": 0.00392156862745098,
|
| 32 |
+
"size": {
|
| 33 |
+
"height": 800,
|
| 34 |
+
"width": 800
|
| 35 |
+
}
|
| 36 |
+
}
|