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
65594170
"googlemock/vscode:/vscode.git/clone" did not exist on "634c52d99cf40306c506e16cc0e9827e387d33f2"
Commit
65594170
authored
May 05, 2021
by
mibaumgartner
Browse files
small argparse bug fix
parent
724ba674
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
scripts/predict.py
scripts/predict.py
+17
-11
No files found.
scripts/predict.py
View file @
65594170
...
@@ -131,33 +131,39 @@ def main():
...
@@ -131,33 +131,39 @@ def main():
parser
=
argparse
.
ArgumentParser
()
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
'task'
,
type
=
str
,
help
=
"Task id e.g. Task12_LIDC OR 12 OR LIDC"
)
parser
.
add_argument
(
'task'
,
type
=
str
,
help
=
"Task id e.g. Task12_LIDC OR 12 OR LIDC"
)
parser
.
add_argument
(
'model'
,
type
=
str
,
help
=
"model name, e.g. RetinaUNetV0"
)
parser
.
add_argument
(
'model'
,
type
=
str
,
help
=
"model name, e.g. RetinaUNetV0"
)
parser
.
add_argument
(
'-f'
,
'--fold'
,
type
=
int
,
help
=
"fold to use for prediction. -1 uses the consolidated model"
,
parser
.
add_argument
(
'-f'
,
'--fold'
,
type
=
int
,
required
=
False
,
default
=-
1
,
required
=
False
,
default
=-
1
)
help
=
"fold to use for prediction. -1 uses the consolidated model"
,
)
parser
.
add_argument
(
'-nmodels'
,
'--num_models'
,
type
=
int
,
default
=
None
,
parser
.
add_argument
(
'-nmodels'
,
'--num_models'
,
type
=
int
,
default
=
None
,
required
=
False
,
help
=
"number of models for ensemble(per default all models will be used)."
help
=
"number of models for ensemble(per default all models will be used)."
"NOT usable by default -- will use all models inside the folder!"
,
"NOT usable by default -- will use all models inside the folder!"
,
required
=
False
)
)
parser
.
add_argument
(
'-ntta'
,
'--num_tta'
,
type
=
int
,
default
=
None
,
parser
.
add_argument
(
'-ntta'
,
'--num_tta'
,
type
=
int
,
default
=
None
,
help
=
"number of tta transforms (per default most tta are chosen)"
,
help
=
"number of tta transforms (per default most tta are chosen)"
,
required
=
False
)
required
=
False
,
)
parser
.
add_argument
(
'-o'
,
'--overwrites'
,
type
=
str
,
nargs
=
'+'
,
parser
.
add_argument
(
'-o'
,
'--overwrites'
,
type
=
str
,
nargs
=
'+'
,
default
=
None
,
required
=
False
,
help
=
(
"overwrites for config file. "
help
=
(
"overwrites for config file. "
"inference_kwargs can be used to add additional "
"inference_kwargs can be used to add additional "
"keyword arguments to inference."
),
"keyword arguments to inference."
),
default
=
None
,
)
required
=
False
)
parser
.
add_argument
(
'--no_preprocess'
,
action
=
'store_false'
,
help
=
"Preprocess test data"
)
parser
.
add_argument
(
'--no_preprocess'
,
help
=
"Preprocess test data"
,
action
=
'store_false'
)
parser
.
add_argument
(
'--force_args'
,
action
=
'store_true'
,
parser
.
add_argument
(
'--force_args'
,
help
=
(
"When transferring models betweens tasks the name "
help
=
(
"When transferring models betweens tasks the name "
"and fold might differ from the original one. "
"and fold might differ from the original one. "
"This forces an overwrite to the passed in arguments of"
"This forces an overwrite to the passed in arguments of"
" this function. This can be dangerous!"
),
action
=
'store_true'
)
" this function. This can be dangerous!"
),
parser
.
add_argument
(
'--test_split'
,
)
parser
.
add_argument
(
'--test_split'
,
action
=
'store_true'
,
help
=
(
"Typical usage of nnDetection will never require "
help
=
(
"Typical usage of nnDetection will never require "
"this option! Predict an already preprocessed "
"this option! Predict an already preprocessed "
"split of the original training data. "
"split of the original training data. "
"The 'test' split needs to be located in fold 0 "
"The 'test' split needs to be located in fold 0 "
"of a manually created split file."
))
"of a manually created split file."
),
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
model
=
args
.
model
model
=
args
.
model
...
...
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