Skip to content
Snippets Groups Projects
Commit b53c68a0 authored by Anjith GEORGE's avatar Anjith GEORGE
Browse files

Updates test

parent fbe98753
Branches
No related tags found
No related merge requests found
Pipeline #41190 failed
......@@ -4,65 +4,78 @@
# ================
# === DATABASE ===
# ================
def _color(f):
return f.stream('color')
def _swir_940(f):
color = f.stream('color')
swir = f.stream('swir_940nm').adjust(color)
swir = swir.subtract_dark()
swir = swir.warp(color)
return swir
def _swir_1050(f):
color = f.stream('color')
swir = f.stream('swir_1050nm').adjust(color)
swir = swir.subtract_dark()
swir = swir.warp(color)
return swir
def _swir_1200(f):
color = f.stream('color')
swir = f.stream('swir_1200nm').adjust(color)
swir = swir.subtract_dark()
swir = swir.warp(color)
return swir
def _swir_1300(f):
color = f.stream('color')
swir = f.stream('swir_1300nm').adjust(color)
swir = swir.subtract_dark()
swir = swir.warp(color)
return swir
def _swir_1450(f):
color = f.stream('color')
swir = f.stream('swir_1450nm').adjust(color)
swir = swir.subtract_dark()
swir = swir.warp(color)
return swir
def _swir_1550(f):
color = f.stream('color')
swir = f.stream('swir_1550nm').adjust(color)
swir = swir.subtract_dark()
swir = swir.warp(color)
return swir
def _swir_1650(f):
color = f.stream('color')
swir = f.stream('swir_1650nm').adjust(color)
swir = swir.subtract_dark()
swir = swir.warp(color)
return swir
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)
nir = nir.warp(color)
intel_depth = Stream('intel_depth').adjust(color).warp(color)
swir_dark = Stream('swir').adjust(color)
swir_940nm = Stream('swir_940nm').adjust(color)
swir_1050nm = Stream('swir_1050nm').adjust(color)
swir_1200nm = Stream('swir_1200nm').adjust(color)
swir_1300nm = Stream('swir_1300nm').adjust(color)
swir_1450nm = Stream('swir_1450nm').adjust(color)
swir_1550nm = Stream('swir_1550nm').adjust(color)
swir_1650nm = Stream('swir_1650nm').adjust(color)
if subtract_dark_swir:
swir_940nm = swir_940nm.subtract_dark(swir_dark)
swir_1050nm = swir_1050nm.subtract_dark(swir_dark)
swir_1200nm = swir_1200nm.subtract_dark(swir_dark)
swir_1300nm = swir_1300nm.subtract_dark(swir_dark)
swir_1450nm = swir_1450nm.subtract_dark(swir_dark)
swir_1550nm = swir_1550nm.subtract_dark(swir_dark)
swir_1650nm = swir_1650nm.subtract_dark(swir_dark)
swir = swir_940nm
swir = swir.stack(swir_1050nm)
swir = swir.stack(swir_1200nm)
swir = swir.stack(swir_1300nm)
swir = swir.stack(swir_1450nm)
swir = swir.stack(swir_1550nm)
swir = swir.stack(swir_1650nm)
swir = swir.warp(color)
thermal = Stream('thermal').adjust(color).warp(color)
streams = { 'color' : color,
'swir' : swir}
from bob.extension import rc as _rc
from bob.pad.face.database import HQWMCAPadDatabase
from bob.pad.face.database import HQWMCAPadDatabase_warp as HQWMCAPadDatabase
database = HQWMCAPadDatabase(protocol='grand_test',
original_directory=_rc['bob.db.hqwmca.directory'],
original_extension='.h5',
annotations_dir = './landmarks-full',
load_function=[_color, _swir_940, _swir_1050, _swir_1200, _swir_1300, _swir_1450, _swir_1550, _swir_1650],
streams=streams,
n_frames=10)
groups = ["train", "dev", "eval"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment