mirror of https://github.com/open-mmlab/mmocr.git
[Update] Fix bug (#1963)
parent
1dcd6fa695
commit
9551af6e5a
mmocr/models/textdet/detectors
|
@ -138,6 +138,7 @@ class MMDetWrapper(BaseModel):
|
||||||
# convert by text_repr_type
|
# convert by text_repr_type
|
||||||
if self.text_repr_type == 'quad':
|
if self.text_repr_type == 'quad':
|
||||||
for j, poly in enumerate(filterd_polygons):
|
for j, poly in enumerate(filterd_polygons):
|
||||||
|
poly = poly.reshape(-1, 2)
|
||||||
rect = cv2.minAreaRect(poly)
|
rect = cv2.minAreaRect(poly)
|
||||||
vertices = cv2.boxPoints(rect)
|
vertices = cv2.boxPoints(rect)
|
||||||
poly = vertices.flatten()
|
poly = vertices.flatten()
|
||||||
|
|
Loading…
Reference in New Issue