diff --git a/mmocr/models/textdet/detectors/mmdet_wrapper.py b/mmocr/models/textdet/detectors/mmdet_wrapper.py index 1d6be8caa..49de8482c 100644 --- a/mmocr/models/textdet/detectors/mmdet_wrapper.py +++ b/mmocr/models/textdet/detectors/mmdet_wrapper.py @@ -138,6 +138,7 @@ def adapt_predictions(self, data: MMDET_SampleList, # convert by text_repr_type if self.text_repr_type == 'quad': for j, poly in enumerate(filterd_polygons): + poly = poly.reshape(-1, 2) rect = cv2.minAreaRect(poly) vertices = cv2.boxPoints(rect) poly = vertices.flatten()