[Update] Fix bug (#1963)

pull/1964/head
Qing Jiang 2023-07-26 10:32:14 +08:00 committed by GitHub
parent 1dcd6fa695
commit 9551af6e5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -138,6 +138,7 @@ class MMDetWrapper(BaseModel):
# 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()