"git@developer.sourcefind.cn:modelzoo/resnet50_tensorflow.git" did not exist on "229e43e8b4578f4e69e02b35a5b33e655b6be3e8"
Commit 80a223da authored by Kai Chen's avatar Kai Chen
Browse files

bug fix for rpn proposal visualization

parent 801c8b19
...@@ -71,7 +71,7 @@ class RPN(BaseDetector, RPNTestMixin): ...@@ -71,7 +71,7 @@ class RPN(BaseDetector, RPNTestMixin):
# TODO: remove this restriction # TODO: remove this restriction
return proposal_list[0].cpu().numpy() return proposal_list[0].cpu().numpy()
def show_result(self, data, result, img_norm_cfg): def show_result(self, data, result, img_norm_cfg, dataset=None, top_k=20):
"""Show RPN proposals on the image. """Show RPN proposals on the image.
Although we assume batch size is 1, this method supports arbitrary Although we assume batch size is 1, this method supports arbitrary
...@@ -84,4 +84,4 @@ class RPN(BaseDetector, RPNTestMixin): ...@@ -84,4 +84,4 @@ class RPN(BaseDetector, RPNTestMixin):
for img, img_meta in zip(imgs, img_metas): for img, img_meta in zip(imgs, img_metas):
h, w, _ = img_meta['img_shape'] h, w, _ = img_meta['img_shape']
img_show = img[:h, :w, :] img_show = img[:h, :w, :]
mmcv.imshow_bboxes(img_show, result, top_k=20) mmcv.imshow_bboxes(img_show, result, top_k=top_k)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment