Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
SOLOv2-pytorch
Commits
80a223da
Commit
80a223da
authored
Feb 14, 2019
by
Kai Chen
Browse files
bug fix for rpn proposal visualization
parent
801c8b19
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
mmdet/models/detectors/rpn.py
mmdet/models/detectors/rpn.py
+2
-2
No files found.
mmdet/models/detectors/rpn.py
View file @
80a223da
...
@@ -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
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment