Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.pad.face
Commits
8c5c27b8
Commit
8c5c27b8
authored
May 28, 2018
by
Olegs NIKISINS
Browse files
Updated the documentation of quality_assessment script
parent
03cd4a66
Pipeline
#20574
passed with stage
in 30 minutes and 35 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/pad/face/script/quality_assessment.py
View file @
8c5c27b8
...
...
@@ -8,8 +8,17 @@ according to their quality.
Good quality data will be copied to ``<save_path>/good_quality_data/`` folder,
respectively "low" quality to ``<save_path>/low_quality_data/`` folder.
The function determining the quality of the data must be implemented in the
config file.
The data loading and quality assessment functionality are defined in the
configuration file. The config file MUST contain at least the following
functions:
``load_datafile(file_name)`` - returns the ``data`` given ``file_name``, and
``assess_quality(data, **assess_quality_kwargs)`` - returns ``True`` for good
quality ``data``, and ``False`` for low quality data, and
``assess_quality_kwargs`` - a dictionary with kwargs for ``assess_quality()``
function.
@author: Olegs Nikisins
"""
...
...
@@ -77,7 +86,7 @@ def parse_arguments(cmd_params=None):
default
=
"bob.pad.face.config.quality_assessment"
)
parser
.
add_argument
(
"-v"
,
"--verbosity"
,
action
=
"count"
,
default
=
0
,
help
=
"
C
urrently
not us
ed."
)
help
=
"
Only -v level is c
urrently
support
ed."
)
if
cmd_params
is
not
None
:
args
=
parser
.
parse_args
(
cmd_params
)
...
...
@@ -168,6 +177,24 @@ def main(cmd_params=None):
functionality, is loaded.
4. All files in data folder with specified extension are obtained.
5. Data is loaded and quality is computed for each data sample.
6. Good quality samples are coppied to <save_folder>/good_quality_data
folder, low quality to <save_folder>/low_quality_data.
NOTE:
The config file used in this function MUST contain at least the following
functions:
``load_datafile(file_name)`` - returns the ``data`` given ``file_name``,
and
``assess_quality(data, **assess_quality_kwargs)`` - returns ``True``
for good quality ``data``, and ``False`` for low quality data, and
``assess_quality_kwargs`` - a dictionary with kwargs for
``assess_quality()`` function.
"""
# Parse the command line arguments:
...
...
@@ -216,5 +243,3 @@ def main(cmd_params=None):
if
verbosity
>
0
:
print
(
"Done!"
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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