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
0ed318eb
Commit
0ed318eb
authored
5 years ago
by
Anjith GEORGE
Browse files
Options
Downloads
Patches
Plain Diff
Updated config
parent
cb93aa0c
No related branches found
No related tags found
No related merge requests found
Pipeline
#38557
failed
5 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/pad/face/database/hqwmca.py
+57
-3
57 additions, 3 deletions
bob/pad/face/database/hqwmca.py
with
57 additions
and
3 deletions
bob/pad/face/database/hqwmca.py
+
57
−
3
View file @
0ed318eb
...
@@ -9,9 +9,63 @@ from bob.extension import rc
...
@@ -9,9 +9,63 @@ from bob.extension import rc
from
bob.pad.face.preprocessor.FaceCropAlign
import
detect_face_landmarks_in_image
from
bob.pad.face.preprocessor.FaceCropAlign
import
detect_face_landmarks_in_image
from
bob.db.hqwmca.attack_dictionaries
import
idiap_type_id_config
,
idiap_subtype_id_config
from
bob.db.hqwmca.attack_dictionaries
import
idiap_type_id_config
,
idiap_subtype_id_config
from
bob.io.stream
import
stream
# def _color(f):
# return f.stream('color')
dark_for_stereo
=
False
subtract_dark_nir
=
False
subtract_dark_swir
=
True
color
=
stream
(
'
color
'
)
nir_735nm
=
stream
(
'
nir_left_735nm
'
).
adjust
(
color
)
nir_850nm
=
stream
(
'
nir_left_850nm
'
).
adjust
(
color
)
nir_940nm
=
stream
(
'
nir_left_940nm
'
).
adjust
(
color
)
nir_1050nm
=
stream
(
'
nir_left_1050nm
'
).
adjust
(
color
)
nir_left_dark
=
stream
(
'
nir_left
'
).
adjust
(
color
)
nir_right_dark
=
stream
(
'
nir_left
'
).
adjust
(
color
)
nir_left_stereo
=
stream
(
'
nir_left_stereo
'
).
adjust
(
color
)
nir_right_stereo
=
stream
(
'
nir_right_stereo
'
).
adjust
(
color
)
if
subtract_dark_nir
:
nir_735nm
=
nir_735nm
.
subtract_dark
(
nir_left_dark
)
nir_850nm
=
nir_850nm
.
subtract_dark
(
nir_left_dark
)
nir_940nm
=
nir_940nm
.
subtract_dark
(
nir_left_dark
)
nir_1050nm
=
nir_1050nm
.
subtract_dark
(
nir_left_dark
)
nir
=
nir_735nm
.
stack
(
nir_850nm
).
stack
(
nir_940nm
).
stack
(
nir_1050nm
)
if
dark_for_stereo
:
nir_left_stereo
=
nir_left_dark
nir_right_stereo
=
nir_right_dark
from
bob.ip.stereo
import
StereoParameters
stereo_parameters
=
StereoParameters
()
stereo_parameters
.
erode
=
True
# remove small features
stereo_parameters
.
inpaint
=
True
# fill holes
_map_3d
=
nir_left_stereo
.
stereo
(
nir_right_stereo
,
stereo_parameters
=
stereo_parameters
)
def
dd
(
a
):
return
a
.
select
(
channel
=
2
)
depth
=
dd
(
_map_3d
)
color
=
color
.
reproject
(
nir_left_stereo
,
nir_right_stereo
,
_map_3d
)
streams
=
{
'
color
'
:
color
}
def
_color
(
f
):
return
f
.
stream
(
'
color
'
)
class
HQWMCAPadFile
(
PadFile
):
class
HQWMCAPadFile
(
PadFile
):
"""
"""
...
@@ -243,7 +297,7 @@ class HQWMCAPadDatabase(PadDatabase):
...
@@ -243,7 +297,7 @@ class HQWMCAPadDatabase(PadDatabase):
video
=
f
.
load
(
directory
=
self
.
original_directory
,
video
=
f
.
load
(
directory
=
self
.
original_directory
,
extension
=
self
.
original_extension
)
extension
=
self
.
original_extension
)
video
=
f
.
vf
.
load
(
directory
=
self
.
original_directory
,
extension
=
self
.
original_extension
,
streams
=
[
_color
]
,
n_frames
=
self
.
n_frames
)[
'
_
color
'
]
video
=
f
.
vf
.
load
(
directory
=
self
.
original_directory
,
extension
=
self
.
original_extension
,
streams
=
streams
,
n_frames
=
self
.
n_frames
)[
'
color
'
]
annotations
=
{}
annotations
=
{}
...
...
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