From da6636dceebb8af3e0a39341e7beb1a8faf9c7cc Mon Sep 17 00:00:00 2001 From: wangjingyeye <1025993141@qq.com> Date: Tue, 5 Jul 2022 03:01:10 +0000 Subject: [PATCH] add polygons --- ppocr/postprocess/db_postprocess.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/ppocr/postprocess/db_postprocess.py b/ppocr/postprocess/db_postprocess.py index e1041b00..5e2553c3 100755 --- a/ppocr/postprocess/db_postprocess.py +++ b/ppocr/postprocess/db_postprocess.py @@ -73,7 +73,6 @@ class DBPostProcess(object): epsilon = 0.002 * cv2.arcLength(contour, True) approx = cv2.approxPolyDP(contour, epsilon, True) points = approx.reshape((-1, 2)) - # print(points) if points.shape[0] < 4: continue @@ -88,7 +87,6 @@ class DBPostProcess(object): else: continue box = box.reshape(-1, 2) - # print(box) _, sside = self.get_mini_boxes(box.reshape((-1, 1, 2))) if sside < self.min_size + 2: @@ -101,7 +99,6 @@ class DBPostProcess(object): np.round(box[:, 1] / height * dest_height), 0, dest_height) boxes.append(box.tolist()) scores.append(score) - # print(boxes) return boxes, scores def boxes_from_bitmap(self, pred, _bitmap, dest_width, dest_height): -- GitLab