Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions paddlex/inference/pipelines/ocr/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,11 @@ def predict(
)
]

if return_word_box:
for res in results:
res["text_word"] = []
res["text_word_region"] = []

indices = list(range(len(doc_preprocessor_images)))
indices = [idx for idx in indices if len(dt_polys_list[idx]) > 0]

Expand Down