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
yaoyuping
nnDetection
Commits
b9ce1a39
Commit
b9ce1a39
authored
Jul 19, 2021
by
mibaumgartner
Browse files
move dynamic task name
parent
470ef323
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
scripts/nnunet/nnunet_import.py
scripts/nnunet/nnunet_import.py
+9
-8
No files found.
scripts/nnunet/nnunet_import.py
View file @
b9ce1a39
...
...
@@ -341,19 +341,20 @@ if __name__ == '__main__':
save_seg
=
args
.
save_seg
save_iseg
=
args
.
save_iseg
# select corresponding nnDetection task
nnunet_dir
=
nnunet_dirs
[
0
]
task_names
=
[
n
for
n
in
PurePath
(
nnunet_dir
).
parts
if
"Task"
in
n
]
if
len
(
task_names
)
>
1
:
logger
.
error
(
f
"Found multiple task names trying to continue with
{
task_names
[
-
1
]
}
"
)
logger
.
info
(
f
"Found nnunet task
{
task_names
[
-
1
]
}
in nnunet path"
)
nnunet_task
=
task_names
[
-
1
]
if
task
is
None
:
# select corresponding nnDetection task
nnunet_dir
=
nnunet_dirs
[
0
]
task_names
=
[
n
for
n
in
PurePath
(
nnunet_dir
).
parts
if
"Task"
in
n
]
if
len
(
task_names
)
>
1
:
logger
.
error
(
f
"Found multiple task names trying to continue with
{
task_names
[
-
1
]
}
"
)
logger
.
info
(
f
"Found nnunet task
{
task_names
[
-
1
]
}
in nnunet path"
)
nnunet_task
=
task_names
[
-
1
]
logger
.
info
(
f
"Using nnunet task
{
nnunet_task
}
as detection task id"
)
task
=
nnunet_task
else
:
task
=
get_task
(
task
,
name
=
True
)
task_dir
=
Path
(
os
.
getenv
(
"det_models"
))
/
task
initialize_config_module
(
config_module
=
"nndet.conf"
)
cfg
=
compose
(
task
,
"config.yaml"
,
overrides
=
[])
...
...
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