From d42bf7a0b79691d6fccd9cae7dc4046a7e78d5a3 Mon Sep 17 00:00:00 2001 From: MissPenguin Date: Wed, 9 Dec 2020 08:51:43 +0000 Subject: [PATCH] fix db postprocess --- ppocr/postprocess/db_postprocess.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ppocr/postprocess/db_postprocess.py b/ppocr/postprocess/db_postprocess.py index 316f7fc2..71b8aba7 100644 --- a/ppocr/postprocess/db_postprocess.py +++ b/ppocr/postprocess/db_postprocess.py @@ -138,9 +138,9 @@ class DBPostProcess(object): boxes_batch = [] for batch_index in range(pred.shape[0]): - height, width = shape_list[batch_index] + src_h, src_w, ratio_h, ratio_w = shape_list[batch_index] boxes, scores = self.boxes_from_bitmap( - pred[batch_index], segmentation[batch_index], width, height) + pred[batch_index], segmentation[batch_index], src_w, src_h) boxes_batch.append({'points': boxes}) return boxes_batch \ No newline at end of file -- GitLab