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
c3acdfd1
Unverified
Commit
c3acdfd1
authored
Aug 25, 2019
by
Kai Chen
Committed by
GitHub
Aug 25, 2019
Browse files
fix test api (#1255)
parent
c0a4c007
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
mmdet/apis/inference.py
mmdet/apis/inference.py
+5
-0
No files found.
mmdet/apis/inference.py
View file @
c3acdfd1
...
...
@@ -49,8 +49,13 @@ def init_detector(config, checkpoint=None, device='cuda:0'):
class
LoadImage
(
object
):
def
__call__
(
self
,
results
):
if
isinstance
(
results
[
'img'
],
str
):
results
[
'filename'
]
=
results
[
'img'
]
else
:
results
[
'filename'
]
=
None
img
=
mmcv
.
imread
(
results
[
'img'
])
results
[
'img'
]
=
img
results
[
'img_shape'
]
=
img
.
shape
results
[
'ori_shape'
]
=
img
.
shape
return
results
...
...
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