From 0dac585336482eaa47dccdb85b22158dc148b6b4 Mon Sep 17 00:00:00 2001 From: Wang Xin Date: Sat, 6 Jul 2024 17:25:09 +0800 Subject: [PATCH] fix bug when layout_predictor is None --- ppstructure/predict_system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppstructure/predict_system.py b/ppstructure/predict_system.py index a2d21df79b..69f8e27765 100644 --- a/ppstructure/predict_system.py +++ b/ppstructure/predict_system.py @@ -121,7 +121,7 @@ def __call__(self, img, return_ocr_result_in_table=False, img_idx=0): time_dict["layout"] += elapse else: h, w = ori_im.shape[:2] - layout_res = [dict(bbox=None, label="table")] + layout_res = [dict(bbox=None, label="table", score=0.0)] # As reported in issues such as #10270 and #11665, the old # implementation, which recognizes texts from the layout regions,