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
41ef492a
Commit
41ef492a
authored
May 27, 2021
by
mibaumgartner
Browse files
add no check option to preprocessing
parent
2e2bd60b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
12 deletions
+18
-12
scripts/preprocess.py
scripts/preprocess.py
+18
-12
No files found.
scripts/preprocess.py
View file @
41ef492a
...
@@ -425,30 +425,36 @@ def main():
...
@@ -425,30 +425,36 @@ def main():
help
=
"Run a full check of the data."
,
help
=
"Run a full check of the data."
,
action
=
'store_true'
,
action
=
'store_true'
,
)
)
parser
.
add_argument
(
'--no_check'
,
help
=
"Skip basic check."
,
action
=
'store_true'
,
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
tasks
=
args
.
tasks
tasks
=
args
.
tasks
ov
=
args
.
overwrites
ov
=
args
.
overwrites
full_check
=
args
.
full_check
full_check
=
args
.
full_check
no_check
=
args
.
no_check
initialize_config_module
(
config_module
=
"nndet.conf"
)
initialize_config_module
(
config_module
=
"nndet.conf"
)
# perform preprocessing checks first
# perform preprocessing checks first
for
task
in
tasks
:
if
not
no_check
:
_ov
=
copy
.
deepcopy
(
ov
)
if
ov
is
not
None
else
[]
for
task
in
tasks
:
cfg
=
compose
(
task
,
"config.yaml"
,
overrides
=
_ov
)
_ov
=
copy
.
deepcopy
(
ov
)
if
ov
is
not
None
else
[]
check_dataset_file
(
cfg
[
"task"
])
cfg
=
compose
(
task
,
"config.yaml"
,
overrides
=
_ov
)
check_data_and_label_splitted
(
check_dataset_file
(
cfg
[
"task"
])
cfg
[
"task"
],
test
=
False
,
labels
=
True
,
full_check
=
full_check
,
)
if
cfg
[
"data"
][
"test_labels"
]:
check_data_and_label_splitted
(
check_data_and_label_splitted
(
cfg
[
"task"
],
cfg
[
"task"
],
test
=
Tru
e
,
test
=
Fals
e
,
labels
=
True
,
labels
=
True
,
full_check
=
full_check
,
full_check
=
full_check
,
)
)
if
cfg
[
"data"
][
"test_labels"
]:
check_data_and_label_splitted
(
cfg
[
"task"
],
test
=
True
,
labels
=
True
,
full_check
=
full_check
,
)
# start preprocessing
# start preprocessing
for
task
in
tasks
:
for
task
in
tasks
:
...
...
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