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
OpenDAS
MMCV
Commits
68b6887e
Commit
68b6887e
authored
Jan 23, 2019
by
tjsongzw
Browse files
fix typo
parent
0ad619c1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
mmcv/image/io.py
mmcv/image/io.py
+1
-1
mmcv/runner/utils.py
mmcv/runner/utils.py
+4
-4
No files found.
mmcv/image/io.py
View file @
68b6887e
...
...
@@ -67,7 +67,7 @@ def imwrite(img, file_path, params=None, auto_mkdir=True):
img (ndarray): Image array to be written.
file_path (str): Image file path.
params (None or list): Same as opencv's :func:`imwrite` interface.
auto_mkdir (bool): If the par
r
ent folder of `file_path` does not exist,
auto_mkdir (bool): If the parent folder of `file_path` does not exist,
whether to create it automatically.
Returns:
...
...
mmcv/runner/utils.py
View file @
68b6887e
...
...
@@ -42,7 +42,7 @@ def get_time_str():
return
time
.
strftime
(
'%Y%m%d_%H%M%S'
,
time
.
localtime
())
def
obj_from_dict
(
info
,
par
r
ent
=
None
,
default_args
=
None
):
def
obj_from_dict
(
info
,
parent
=
None
,
default_args
=
None
):
"""Initialize an object from dict.
The dict must contain the key "type", which indicates the object type, it
...
...
@@ -51,7 +51,7 @@ def obj_from_dict(info, parrent=None, default_args=None):
Args:
info (dict): Object types and arguments.
module
(:class:`module`): Module which may containing expected object
parent
(:class:`module`): Module which may containing expected object
classes.
default_args (dict, optional): Default arguments for initializing the
object.
...
...
@@ -64,8 +64,8 @@ def obj_from_dict(info, parrent=None, default_args=None):
args
=
info
.
copy
()
obj_type
=
args
.
pop
(
'type'
)
if
mmcv
.
is_str
(
obj_type
):
if
par
r
ent
is
not
None
:
obj_type
=
getattr
(
par
r
ent
,
obj_type
)
if
parent
is
not
None
:
obj_type
=
getattr
(
parent
,
obj_type
)
else
:
obj_type
=
sys
.
modules
[
obj_type
]
elif
not
isinstance
(
obj_type
,
type
):
...
...
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