Skip to content

Commit

Permalink
[Update] Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Mountchicken committed Jul 25, 2023
1 parent 1dcd6fa commit 34a50de
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mmocr/models/textdet/detectors/mmdet_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 34a50de

Please sign in to comment.