[Fix] textspotting ut (#1599)

pull/1604/head
liukuikun 2022-12-06 14:02:12 +08:00 committed by GitHub
parent fa4fd1fd42
commit 5940d6bc9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ from mmocr.utils import bbox2poly
from mmocr.visualization import TextSpottingLocalVisualizer
class TestTextKIELocalVisualizer(unittest.TestCase):
class TestTextSpottingLocalVisualizer(unittest.TestCase):
def setUp(self):
h, w = 12, 10
@ -95,7 +95,7 @@ class TestTextKIELocalVisualizer(unittest.TestCase):
draw_pred=False,
out_file=out_file)
self._assert_image_and_shape(out_file, (h, w * 2, c))
bboxes = self.data_sample.pred_instances.pop('bboxes')
bboxes = self.data_sample.pred_instances.get('bboxes')
bboxes = bboxes.tolist()
polys = [bbox2poly(bbox) for bbox in bboxes]
self.data_sample.pred_instances.polygons = polys