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
fc0d08c1
There was a problem fetching the pipeline summary.
Commit
fc0d08c1
authored
6 years ago
by
Guillaume HEUSCH
Browse files
Options
Downloads
Patches
Plain Diff
[test] added unit tests for preprocessors
parent
b7c66d42
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!69
Resolve "Follow-up from "WIP: rPPG as features for PAD""
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/pad/face/test/test.py
+51
-1
51 additions, 1 deletion
bob/pad/face/test/test.py
with
51 additions
and
1 deletion
bob/pad/face/test/test.py
+
51
−
1
View file @
fc0d08c1
...
...
@@ -28,7 +28,11 @@ from ..extractor import LBPHistogram
from
..extractor
import
ImageQualityMeasure
import
random
from
..preprocessor
import
LiICPR2016
from
..preprocessor
import
Chrom
from
..preprocessor
import
PPGSecure
from
..preprocessor
import
SSR
from
..preprocessor.FaceCropAlign
import
detect_face_landmarks_in_image
...
...
@@ -371,3 +375,49 @@ def convert_array_to_list_of_frame_cont(data):
frame_container
)
# add current frame to FrameContainer
return
frame_container_list
def
test_preprocessor_LiICPR2016
():
preprocessor
=
LiICPR2016
()
data
=
np
.
random
((
10
,
3
,
10
,
10
))
frames
=
bob
.
bio
.
video
.
FrameContainer
()
for
i
in
range
(
data
.
shape
[
0
])
frames
.
add
(
i
,
data
[
i
])
pulse
=
preprocessor
(
frames
)
assert
pulse
.
shape
==
(
10
,
3
)
assert
np
.
all
(
pulse
==
0
)
def
test_preprocessor_Chrom
():
preprocessor
=
Chrom
()
data
=
np
.
random
((
10
,
3
,
10
,
10
))
frames
=
bob
.
bio
.
video
.
FrameContainer
()
for
i
in
range
(
data
.
shape
[
0
])
frames
.
add
(
i
,
data
[
i
])
pulse
=
preprocessor
(
frames
)
assert
pulse
.
shape
[
0
]
==
10
def
test_preprocessor_PPGSecure
():
preprocessor
=
PPGSecure
()
data
=
np
.
random
((
10
,
3
,
10
,
10
))
frames
=
bob
.
bio
.
video
.
FrameContainer
()
for
i
in
range
(
data
.
shape
[
0
])
frames
.
add
(
i
,
data
[
i
])
pulse
=
preprocessor
(
frames
)
assert
pulse
.
shape
==
(
5
,
10
)
def
test_preprocessor_SSR
():
preprocessor
=
SSR
()
data
=
np
.
random
((
10
,
3
,
10
,
10
))
frames
=
bob
.
bio
.
video
.
FrameContainer
()
for
i
in
range
(
data
.
shape
[
0
])
frames
.
add
(
i
,
data
[
i
])
pulse
=
preprocessor
(
frames
)
assert
pulse
.
shape
[
0
]
==
10
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