From 8e87de4ae3750f054e76afa3d1da0ee21b3d6e98 Mon Sep 17 00:00:00 2001 From: Wang Xin Date: Sat, 6 Jul 2024 19:14:08 +0800 Subject: [PATCH] fix bug when layout_predictor is None (#13279) --- 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,