This commit is contained in:
LDOUBLEV
2022-10-09 14:15:47 +08:00
parent 119196f11d
commit 3558d57681
+2
View File
@@ -192,6 +192,8 @@ class TextDetector(object):
img_height, img_width = image_shape[0:2]
dt_boxes_new = []
for box in dt_boxes:
if type(box) is list:
box = np.array(box)
box = self.order_points_clockwise(box)
box = self.clip_det_res(box, img_height, img_width)
rect_width = int(np.linalg.norm(box[0] - box[1]))