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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"dataset": {
|
3 |
+
"type": "PTN_prepared",
|
4 |
+
"name": "PubTabNet_300_100_512",
|
5 |
+
"raw_data_dir": "./tests/test_data/ccs_api/model/",
|
6 |
+
"load_cells": true,
|
7 |
+
"bbox_format": "5plet",
|
8 |
+
"resized_image": 448,
|
9 |
+
"keep_AR": false,
|
10 |
+
"up_scaling_enabled": true,
|
11 |
+
"down_scaling_enabled": true,
|
12 |
+
"padding_mode": "null",
|
13 |
+
"padding_color": [
|
14 |
+
0,
|
15 |
+
0,
|
16 |
+
0
|
17 |
+
],
|
18 |
+
"image_normalization": {
|
19 |
+
"state": true,
|
20 |
+
"mean": [
|
21 |
+
0.94247851,
|
22 |
+
0.94254675,
|
23 |
+
0.94292611
|
24 |
+
],
|
25 |
+
"std": [
|
26 |
+
0.17910956,
|
27 |
+
0.17940403,
|
28 |
+
0.17931663
|
29 |
+
]
|
30 |
+
},
|
31 |
+
"color_jitter": true,
|
32 |
+
"rand_crop": true,
|
33 |
+
"rand_pad": true,
|
34 |
+
"image_grayscale": false
|
35 |
+
},
|
36 |
+
"model": {
|
37 |
+
"type": "TableModel04_rs",
|
38 |
+
"name": "14_128_256_4_true",
|
39 |
+
"backbone": "resnet18",
|
40 |
+
"enc_image_size": 28,
|
41 |
+
"tag_embed_dim": 16,
|
42 |
+
"hidden_dim": 512,
|
43 |
+
"tag_decoder_dim": 512,
|
44 |
+
"bbox_embed_dim": 256,
|
45 |
+
"tag_attention_dim": 256,
|
46 |
+
"bbox_attention_dim": 512,
|
47 |
+
"enc_layers": 6,
|
48 |
+
"dec_layers": 6,
|
49 |
+
"nheads": 8,
|
50 |
+
"dropout": 0.1,
|
51 |
+
"bbox_classes": 2
|
52 |
+
},
|
53 |
+
"train": {
|
54 |
+
"bbox": true
|
55 |
+
},
|
56 |
+
"predict": {
|
57 |
+
"max_steps": 1024,
|
58 |
+
"beam_size": 5,
|
59 |
+
"bbox": true,
|
60 |
+
"pdf_cell_iou_thres": 0.05,
|
61 |
+
"padding": false,
|
62 |
+
"padding_size": 50,
|
63 |
+
"disable_post_process": false,
|
64 |
+
"profiling": false,
|
65 |
+
"device_mode": "auto"
|
66 |
+
},
|
67 |
+
"debug": {
|
68 |
+
"save_debug_images": false
|
69 |
+
},
|
70 |
+
"dataset_wordmap": {
|
71 |
+
"word_map_tag": {
|
72 |
+
"<pad>": 0,
|
73 |
+
"<unk>": 1,
|
74 |
+
"<start>": 2,
|
75 |
+
"<end>": 3,
|
76 |
+
"ecel": 4,
|
77 |
+
"fcel": 5,
|
78 |
+
"lcel": 6,
|
79 |
+
"ucel": 7,
|
80 |
+
"xcel": 8,
|
81 |
+
"nl": 9,
|
82 |
+
"ched": 10,
|
83 |
+
"rhed": 11,
|
84 |
+
"srow": 12
|
85 |
+
},
|
86 |
+
"word_map_cell": {
|
87 |
+
" ": 13,
|
88 |
+
"!": 179,
|
89 |
+
"\"": 126,
|
90 |
+
"#": 101,
|
91 |
+
"$": 119,
|
92 |
+
"%": 18,
|
93 |
+
"&": 114,
|
94 |
+
"'": 108,
|
95 |
+
"(": 29,
|
96 |
+
")": 32,
|
97 |
+
"*": 26,
|
98 |
+
"+": 97,
|
99 |
+
",": 71,
|
100 |
+
"-": 63,
|
101 |
+
".": 34,
|
102 |
+
"/": 66,
|
103 |
+
"0": 33,
|
104 |
+
"1": 36,
|
105 |
+
"2": 43,
|
106 |
+
"3": 41,
|
107 |
+
"4": 45,
|
108 |
+
"5": 17,
|
109 |
+
"6": 37,
|
110 |
+
"7": 35,
|
111 |
+
"8": 40,
|
112 |
+
"9": 16,
|
113 |
+
":": 88,
|
114 |
+
";": 92,
|
115 |
+
"<": 73,
|
116 |
+
"</b>": 9,
|
117 |
+
"</i>": 23,
|
118 |
+
"</overline>": 219,
|
119 |
+
"</strike>": 233,
|
120 |
+
"</sub>": 94,
|
121 |
+
"</sup>": 77,
|
122 |
+
"</underline>": 151,
|
123 |
+
"<b>": 1,
|
124 |
+
"<end>": 280,
|
125 |
+
"<i>": 21,
|
126 |
+
"<overline>": 218,
|
127 |
+
"<pad>": 0,
|
128 |
+
"<start>": 279,
|
129 |
+
"<strike>": 232,
|
130 |
+
"<sub>": 93,
|
131 |
+
"<sup>": 75,
|
132 |
+
"<underline>": 150,
|
133 |
+
"<unk>": 278,
|
134 |
+
"=": 99,
|
135 |
+
">": 39,
|
136 |
+
"?": 96,
|
137 |
+
"@": 125,
|
138 |
+
"A": 27,
|
139 |
+
"B": 86,
|
140 |
+
"C": 19,
|
141 |
+
"D": 57,
|
142 |
+
"E": 64,
|
143 |
+
"F": 47,
|
144 |
+
"G": 44,
|
145 |
+
"H": 10,
|
146 |
+
"I": 20,
|
147 |
+
"J": 80,
|
148 |
+
"K": 81,
|
149 |
+
"L": 52,
|
150 |
+
"M": 46,
|
151 |
+
"N": 69,
|
152 |
+
"O": 65,
|
153 |
+
"P": 62,
|
154 |
+
"Q": 59,
|
155 |
+
"R": 60,
|
156 |
+
"S": 58,
|
157 |
+
"T": 48,
|
158 |
+
"U": 55,
|
159 |
+
"V": 2,
|
160 |
+
"W": 83,
|
161 |
+
"X": 104,
|
162 |
+
"Y": 89,
|
163 |
+
"Z": 113,
|
164 |
+
"[": 70,
|
165 |
+
"\\": 165,
|
166 |
+
"]": 72,
|
167 |
+
"^": 132,
|
168 |
+
"_": 84,
|
169 |
+
"`": 196,
|
170 |
+
"a": 3,
|
171 |
+
"b": 6,
|
172 |
+
"c": 54,
|
173 |
+
"d": 12,
|
174 |
+
"e": 8,
|
175 |
+
"f": 50,
|
176 |
+
"g": 28,
|
177 |
+
"h": 56,
|
178 |
+
"i": 5,
|
179 |
+
"j": 82,
|
180 |
+
"k": 95,
|
181 |
+
"l": 7,
|
182 |
+
"m": 30,
|
183 |
+
"n": 31,
|
184 |
+
"o": 15,
|
185 |
+
"p": 22,
|
186 |
+
"q": 67,
|
187 |
+
"r": 4,
|
188 |
+
"s": 51,
|
189 |
+
"t": 14,
|
190 |
+
"u": 25,
|
191 |
+
"v": 24,
|
192 |
+
"w": 53,
|
193 |
+
"x": 61,
|
194 |
+
"y": 49,
|
195 |
+
"z": 11,
|
196 |
+
"{": 158,
|
197 |
+
"|": 139,
|
198 |
+
"}": 159,
|
199 |
+
"~": 147,
|
200 |
+
"\u00a2": 203,
|
201 |
+
"\u00a3": 162,
|
202 |
+
"\u00a4": 220,
|
203 |
+
"\u00a5": 176,
|
204 |
+
"\u00a7": 142,
|
205 |
+
"\u00a9": 268,
|
206 |
+
"\u00ab": 239,
|
207 |
+
"\u00ad": 275,
|
208 |
+
"\u00ae": 130,
|
209 |
+
"\u00b0": 100,
|
210 |
+
"\u00b1": 79,
|
211 |
+
"\u00b6": 171,
|
212 |
+
"\u00b7": 137,
|
213 |
+
"\u00bb": 240,
|
214 |
+
"\u00d7": 118,
|
215 |
+
"\u00d8": 192,
|
216 |
+
"\u00df": 197,
|
217 |
+
"\u00e6": 261,
|
218 |
+
"\u00f7": 225,
|
219 |
+
"\u00f8": 163,
|
220 |
+
"\u0131": 242,
|
221 |
+
"\u0142": 267,
|
222 |
+
"\u01c2": 211,
|
223 |
+
"\u025b": 223,
|
224 |
+
"\u02b9": 248,
|
225 |
+
"\u02c2": 195,
|
226 |
+
"\u02c3": 208,
|
227 |
+
"\u02c6": 253,
|
228 |
+
"\u0300": 209,
|
229 |
+
"\u0301": 131,
|
230 |
+
"\u0302": 138,
|
231 |
+
"\u0303": 156,
|
232 |
+
"\u0304": 152,
|
233 |
+
"\u0306": 222,
|
234 |
+
"\u0307": 247,
|
235 |
+
"\u0308": 103,
|
236 |
+
"\u030a": 102,
|
237 |
+
"\u030c": 254,
|
238 |
+
"\u0327": 155,
|
239 |
+
"\u0328": 269,
|
240 |
+
"\u0338": 170,
|
241 |
+
"\u0391": 173,
|
242 |
+
"\u0392": 169,
|
243 |
+
"\u0393": 180,
|
244 |
+
"\u0394": 85,
|
245 |
+
"\u0398": 243,
|
246 |
+
"\u0399": 271,
|
247 |
+
"\u039b": 272,
|
248 |
+
"\u03a0": 213,
|
249 |
+
"\u03a3": 185,
|
250 |
+
"\u03a6": 148,
|
251 |
+
"\u03a7": 212,
|
252 |
+
"\u03a8": 141,
|
253 |
+
"\u03a9": 161,
|
254 |
+
"\u03b1": 90,
|
255 |
+
"\u03b2": 107,
|
256 |
+
"\u03b3": 110,
|
257 |
+
"\u03b4": 153,
|
258 |
+
"\u03b5": 166,
|
259 |
+
"\u03b6": 178,
|
260 |
+
"\u03b7": 146,
|
261 |
+
"\u03b8": 186,
|
262 |
+
"\u03b9": 229,
|
263 |
+
"\u03ba": 164,
|
264 |
+
"\u03bb": 91,
|
265 |
+
"\u03bc": 78,
|
266 |
+
"\u03bd": 230,
|
267 |
+
"\u03be": 244,
|
268 |
+
"\u03c0": 127,
|
269 |
+
"\u03c1": 149,
|
270 |
+
"\u03c3": 116,
|
271 |
+
"\u03c4": 198,
|
272 |
+
"\u03c5": 189,
|
273 |
+
"\u03c6": 140,
|
274 |
+
"\u03c7": 124,
|
275 |
+
"\u03c8": 216,
|
276 |
+
"\u03c9": 167,
|
277 |
+
"\u0410": 273,
|
278 |
+
"\u0421": 194,
|
279 |
+
"\u115f": 217,
|
280 |
+
"\u200b": 265,
|
281 |
+
"\u2010": 117,
|
282 |
+
"\u2012": 135,
|
283 |
+
"\u2013": 42,
|
284 |
+
"\u2014": 106,
|
285 |
+
"\u2015": 228,
|
286 |
+
"\u2016": 259,
|
287 |
+
"\u2018": 123,
|
288 |
+
"\u2019": 121,
|
289 |
+
"\u201c": 87,
|
290 |
+
"\u201d": 115,
|
291 |
+
"\u201e": 245,
|
292 |
+
"\u2020": 109,
|
293 |
+
"\u2021": 129,
|
294 |
+
"\u2022": 128,
|
295 |
+
"\u2028": 190,
|
296 |
+
"\u2030": 154,
|
297 |
+
"\u2032": 68,
|
298 |
+
"\u203b": 224,
|
299 |
+
"\u2044": 188,
|
300 |
+
"\u204e": 199,
|
301 |
+
"\u2061": 200,
|
302 |
+
"\u20ac": 184,
|
303 |
+
"\u2190": 202,
|
304 |
+
"\u2191": 112,
|
305 |
+
"\u2192": 120,
|
306 |
+
"\u2193": 111,
|
307 |
+
"\u2194": 183,
|
308 |
+
"\u21d1": 266,
|
309 |
+
"\u21d2": 264,
|
310 |
+
"\u21d3": 255,
|
311 |
+
"\u2205": 215,
|
312 |
+
"\u2206": 175,
|
313 |
+
"\u2208": 262,
|
314 |
+
"\u2211": 160,
|
315 |
+
"\u2212": 76,
|
316 |
+
"\u2216": 206,
|
317 |
+
"\u2217": 105,
|
318 |
+
"\u2218": 246,
|
319 |
+
"\u2219": 236,
|
320 |
+
"\u221a": 187,
|
321 |
+
"\u221e": 207,
|
322 |
+
"\u2223": 260,
|
323 |
+
"\u2225": 193,
|
324 |
+
"\u2227": 182,
|
325 |
+
"\u2229": 256,
|
326 |
+
"\u222b": 258,
|
327 |
+
"\u223c": 98,
|
328 |
+
"\u2248": 210,
|
329 |
+
"\u2264": 38,
|
330 |
+
"\u2265": 74,
|
331 |
+
"\u2266": 214,
|
332 |
+
"\u2267": 181,
|
333 |
+
"\u2295": 263,
|
334 |
+
"\u22c5": 174,
|
335 |
+
"\u22c6": 191,
|
336 |
+
"\u22ee": 277,
|
337 |
+
"\u22ef": 270,
|
338 |
+
"\u2500": 205,
|
339 |
+
"\u2551": 231,
|
340 |
+
"\u25a0": 250,
|
341 |
+
"\u25a1": 177,
|
342 |
+
"\u25aa": 145,
|
343 |
+
"\u25b2": 136,
|
344 |
+
"\u25b3": 143,
|
345 |
+
"\u25bc": 251,
|
346 |
+
"\u25c6": 226,
|
347 |
+
"\u25ca": 235,
|
348 |
+
"\u25cb": 227,
|
349 |
+
"\u25cf": 172,
|
350 |
+
"\u25e6": 274,
|
351 |
+
"\u2605": 204,
|
352 |
+
"\u2606": 144,
|
353 |
+
"\u2640": 133,
|
354 |
+
"\u2642": 134,
|
355 |
+
"\u2663": 252,
|
356 |
+
"\u2666": 157,
|
357 |
+
"\u266f": 221,
|
358 |
+
"\u2713": 122,
|
359 |
+
"\u2714": 249,
|
360 |
+
"\u2717": 201,
|
361 |
+
"\u2794": 168,
|
362 |
+
"\u27a2": 276,
|
363 |
+
"\u2a7d": 234,
|
364 |
+
"\u2a7e": 241,
|
365 |
+
"\u3008": 237,
|
366 |
+
"\u3009": 238,
|
367 |
+
"\ufeff": 257
|
368 |
+
}
|
369 |
+
}
|
370 |
+
}
|