Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.pad.face
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.pad.face
Commits
8c5c27b8
There was a problem fetching the pipeline summary.
Commit
8c5c27b8
authored
7 years ago
by
Olegs NIKISINS
Browse files
Options
Downloads
Patches
Plain Diff
Updated the documentation of quality_assessment script
parent
03cd4a66
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!67
HLDI for the CelebA database and quality estimation script
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/pad/face/script/quality_assessment.py
+30
-5
30 additions, 5 deletions
bob/pad/face/script/quality_assessment.py
with
30 additions
and
5 deletions
bob/pad/face/script/quality_assessment.py
+
30
−
5
View file @
8c5c27b8
...
@@ -8,8 +8,17 @@ according to their quality.
...
@@ -8,8 +8,17 @@ according to their quality.
Good quality data will be copied to ``<save_path>/good_quality_data/`` folder,
Good quality data will be copied to ``<save_path>/good_quality_data/`` folder,
respectively
"
low
"
quality to ``<save_path>/low_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
The data loading and quality assessment functionality are defined in the
config file.
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
@author: Olegs Nikisins
"""
"""
...
@@ -77,7 +86,7 @@ def parse_arguments(cmd_params=None):
...
@@ -77,7 +86,7 @@ def parse_arguments(cmd_params=None):
default
=
"
bob.pad.face.config.quality_assessment
"
)
default
=
"
bob.pad.face.config.quality_assessment
"
)
parser
.
add_argument
(
"
-v
"
,
"
--verbosity
"
,
action
=
"
count
"
,
default
=
0
,
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
:
if
cmd_params
is
not
None
:
args
=
parser
.
parse_args
(
cmd_params
)
args
=
parser
.
parse_args
(
cmd_params
)
...
@@ -168,6 +177,24 @@ def main(cmd_params=None):
...
@@ -168,6 +177,24 @@ def main(cmd_params=None):
functionality, is loaded.
functionality, is loaded.
4. All files in data folder with specified extension are obtained.
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:
# Parse the command line arguments:
...
@@ -216,5 +243,3 @@ def main(cmd_params=None):
...
@@ -216,5 +243,3 @@ def main(cmd_params=None):
if
verbosity
>
0
:
if
verbosity
>
0
:
print
(
"
Done!
"
)
print
(
"
Done!
"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment