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
80e1c3dc
Commit
80e1c3dc
authored
Oct 21, 2020
by
Amir MOHAMMADI
Browse files
optimize the qm-svm pipeline
parent
5de1a98d
Pipeline
#44393
failed with stage
in 5 minutes and 35 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/pad/face/config/vanilla_pad/qm_svm.py
View file @
80e1c3dc
# Legacy imports
from
bob.bio.face.helpers
import
face_crop_solver
from
bob.bio.video
import
FrameSelector
from
bob.bio.video.extractor
import
Wrapper
as
ExtractorWrapper
from
bob.bio.video
import
VideoLikeContainer
from
bob.bio.video.transformer
import
Wrapper
as
TransformerWrapper
from
bob.pad.face.extractor
import
ImageQualityMeasure
...
...
@@ -10,7 +9,6 @@ from sklearn.svm import SVC
from
sklearn.model_selection
import
GridSearchCV
from
sklearn.pipeline
import
make_pipeline
from
bob.pad.base.pipelines.vanilla_pad
import
FrameContainersToFrames
from
bob.bio.base.wrappers
import
wrap_sample_extractor
import
bob.pipelines
as
mario
database
=
globals
().
get
(
"database"
)
...
...
@@ -29,6 +27,8 @@ preprocessor = mario.wrap(
preprocessor
,
transform_extra_arguments
=
((
"annotations"
,
"annotations"
),),
features_dir
=
"temp/faces-64"
,
save_func
=
VideoLikeContainer
.
save
,
load_func
=
VideoLikeContainer
.
load
,
)
# Legacy extractor #
...
...
@@ -37,6 +37,8 @@ extractor = mario.wrap(
[
"sample"
,
"checkpoint"
],
extractor
,
features_dir
=
"temp/iqm-features"
,
save_func
=
VideoLikeContainer
.
save
,
load_func
=
VideoLikeContainer
.
load
,
)
# new stuff #
...
...
@@ -63,4 +65,5 @@ classifier = mario.wrap(
# ("frame_cont_to_array", frame_cont_to_array),
# ]
# )
pipeline
=
make_pipeline
(
preprocessor
,
extractor
,
frame_cont_to_array
,
classifier
)
frames_classifier
=
make_pipeline
(
frame_cont_to_array
,
classifier
)
pipeline
=
make_pipeline
(
preprocessor
,
extractor
,
frames_classifier
)
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