diff --git a/paddlex/inference/pipelines/ocr/pipeline.py b/paddlex/inference/pipelines/ocr/pipeline.py index 33b54514c..e8ec0d2c2 100644 --- a/paddlex/inference/pipelines/ocr/pipeline.py +++ b/paddlex/inference/pipelines/ocr/pipeline.py @@ -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]