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
0f7d5718
"src/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "edf22c052e0d91eca4687ee678b06a485f78666d"
Unverified
Commit
0f7d5718
authored
Jan 23, 2019
by
Kai Chen
Committed by
GitHub
Jan 23, 2019
Browse files
Merge pull request #31 from tjsongzw/master
fix typo
parents
0ad619c1
68b6887e
Changes
2
Hide 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 @
0f7d5718
...
@@ -67,7 +67,7 @@ def imwrite(img, file_path, params=None, auto_mkdir=True):
...
@@ -67,7 +67,7 @@ def imwrite(img, file_path, params=None, auto_mkdir=True):
img (ndarray): Image array to be written.
img (ndarray): Image array to be written.
file_path (str): Image file path.
file_path (str): Image file path.
params (None or list): Same as opencv's :func:`imwrite` interface.
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.
whether to create it automatically.
Returns:
Returns:
...
...
mmcv/runner/utils.py
View file @
0f7d5718
...
@@ -42,7 +42,7 @@ def get_time_str():
...
@@ -42,7 +42,7 @@ def get_time_str():
return
time
.
strftime
(
'%Y%m%d_%H%M%S'
,
time
.
localtime
())
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.
"""Initialize an object from dict.
The dict must contain the key "type", which indicates the object type, it
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):
...
@@ -51,7 +51,7 @@ def obj_from_dict(info, parrent=None, default_args=None):
Args:
Args:
info (dict): Object types and arguments.
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.
classes.
default_args (dict, optional): Default arguments for initializing the
default_args (dict, optional): Default arguments for initializing the
object.
object.
...
@@ -64,8 +64,8 @@ def obj_from_dict(info, parrent=None, default_args=None):
...
@@ -64,8 +64,8 @@ def obj_from_dict(info, parrent=None, default_args=None):
args
=
info
.
copy
()
args
=
info
.
copy
()
obj_type
=
args
.
pop
(
'type'
)
obj_type
=
args
.
pop
(
'type'
)
if
mmcv
.
is_str
(
obj_type
):
if
mmcv
.
is_str
(
obj_type
):
if
par
r
ent
is
not
None
:
if
parent
is
not
None
:
obj_type
=
getattr
(
par
r
ent
,
obj_type
)
obj_type
=
getattr
(
parent
,
obj_type
)
else
:
else
:
obj_type
=
sys
.
modules
[
obj_type
]
obj_type
=
sys
.
modules
[
obj_type
]
elif
not
isinstance
(
obj_type
,
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