Commit 4e5c4e6
authored
refactor: remove remaining table OCR logic in inference (#302)
### Summary
Remove all OCR related code:
* table OCR code -> require ocr tokens to pass in for table structure
* parameter `extract_tables` -> moved to unst already, unst decide if
extract or not and calling table model
* function `interpret_table_block` -> this was a wrapper to call table
in inference on block level, logic moved to unst
* paddle ocr related code and readme instruction
### Test
* shouldn't affect anything since its just remove a deprecated logic
* added some test for coverage
* CCT metrics compare (no change):
before (main on core product):
```
metric average sample_sd population_sd count
--------------------------------------------------
cct-accuracy 0.665 0.278 0.277 109
cct-%missing 0.094 0.176 0.176 109
```
after (inference checked out to this branch):
```
metric average sample_sd population_sd count
--------------------------------------------------
cct-accuracy 0.665 0.278 0.277 109
cct-%missing 0.094 0.176 0.176 109
```1 parent d4785df commit 4e5c4e6
File tree
15 files changed
+585
-340
lines changed- test_unstructured_inference
- inference
- models
- unstructured_inference
- inference
- models
15 files changed
+585
-340
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
1 | 5 | | |
2 | 6 | | |
3 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | 35 | | |
42 | 36 | | |
43 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | 37 | | |
56 | 38 | | |
57 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
219 | 218 | | |
220 | 219 | | |
221 | 220 | | |
222 | 221 | | |
223 | 222 | | |
224 | | - | |
225 | 223 | | |
226 | 224 | | |
227 | 225 | | |
| |||
596 | 594 | | |
597 | 595 | | |
598 | 596 | | |
599 | | - | |
600 | 597 | | |
601 | 598 | | |
602 | 599 | | |
| |||
Lines changed: 0 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | | - | |
10 | 8 | | |
11 | 9 | | |
12 | 10 | | |
13 | | - | |
14 | | - | |
15 | 11 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | 12 | | |
20 | 13 | | |
21 | | - | |
22 | | - | |
23 | 14 | | |
24 | 15 | | |
25 | 16 | | |
26 | 17 | | |
27 | 18 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | 19 | | |
32 | 20 | | |
33 | 21 | | |
| |||
0 commit comments