Skip to content

Commit 754d75d

Browse files
authored
fix(paddleocr_vl): aggregate imgs_in_doc when concatenate_pages is True (#5044)
1 parent a0ad8af commit 754d75d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

paddlex/inference/pipelines/paddleocr_vl/pipeline.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,6 +1031,10 @@ def _conver_blocks_to_obj(blocks, model_settings):
10311031

10321032
concatenate_res = []
10331033
if concatenate_pages:
1034+
all_imgs_in_doc = []
1035+
for res in res_list:
1036+
all_imgs_in_doc.extend(res.get("imgs_in_doc", []))
1037+
res_list[0]["imgs_in_doc"] = all_imgs_in_doc
10341038
all_page_res = res_list[0]
10351039
all_page_res["parsing_res_list"] = [
10361040
blk for blks in blocks_by_page for blk in blks

0 commit comments

Comments
 (0)