Skip to content

Commit 1f63f83

Browse files
authored
[cherry-pick] Fix bugs for table-rec-pipe v2 (#4431)
* fix bug * fix bug
1 parent a8ec0bd commit 1f63f83

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

paddlex/inference/pipelines/table_recognition/pipeline_v2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1253,7 +1253,6 @@ def predict(
12531253
new_x1, new_y1 = img_height - tby2, tbx1
12541254
new_x2, new_y2 = img_height - tby1, tbx2
12551255
table_box = [new_x1, new_y1, new_x2, new_y2]
1256-
layout_det_res = {}
12571256
single_table_rec_res = self.predict_single_table_recognition_res(
12581257
doc_preprocessor_image,
12591258
overall_ocr_res,

paddlex/inference/pipelines/table_recognition/result.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ def __init__(self, data: Dict) -> None:
9696
super().__init__(data)
9797
HtmlMixin.__init__(self)
9898
XlsxMixin.__init__(self)
99+
if self["layout_det_res"] is None:
100+
self["layout_det_res"] = {}
99101

100102
def _get_input_fn(self):
101103
fn = super()._get_input_fn()

0 commit comments

Comments
 (0)