Skip to content
Snippets Groups Projects
Commit a1fc10ee authored by Guillaume HEUSCH's avatar Guillaume HEUSCH
Browse files

[database] finished - i.e. working, but should be polished - 3DMAD high-level interface

parent d0565381
No related branches found
No related tags found
1 merge request!53WIP: rPPG as features for PAD
Pipeline #
......@@ -5,6 +5,7 @@ from .msu_mfsd import MsuMfsdPadDatabase
from .aggregated_db import AggregatedDbPadDatabase
from .mifs import MIFSPadDatabase
from .maskattack import MaskAttackPadDatabase
from .batl import BatlPadDatabase
# gets sphinx autodoc done right - don't remove it
......
......@@ -74,7 +74,7 @@ class MaskAttackPadDatabase(PadDatabase):
def __init__(
self,
protocol=None, # grandtest is the default protocol for this database
protocol=None,
original_directory=None,
original_extension='.avi',
**kwargs):
......@@ -101,7 +101,7 @@ class MaskAttackPadDatabase(PadDatabase):
# Since the high level API expects different group names than what the low
# level API offers, you need to convert them when necessary
self.low_level_group_names = (
'world', 'devel',
'world', 'dev',
'test') # group names in the low-level database interface
self.high_level_group_names = (
'train', 'dev',
......@@ -164,7 +164,28 @@ class MaskAttackPadDatabase(PadDatabase):
groups, self.low_level_group_names, self.high_level_group_names)
# Since this database was designed for PAD experiments, nothing special
# needs to be done here.
files = self.db.objects(groups=groups, **kwargs)
print("Objects method called with groups = {}, protocol = {}, purposes = {}, model_ids = {}".format(groups, protocol, purposes, model_ids))
#print("Kwargs -> {}".format(**kwargs))
#print("Translated groups = {}".frima)
# for training
# for dev
# for eval
lowlevel_purposes = []
if purposes == 'real':
lowlevel_purposes = ['trainReal', 'probeReal', 'classifyReal']
else:
lowlevel_purposes = ['trainMask', 'probeMask', 'classifyMask']
#if groups == ['world']:
# lowlevel_purposes = ['trainMask']
# if groups == ['world']:
# lowlevel_purposes = ['trainMask']
#print(lowlevel_purposes)
files = self.db.objects(sets=groups, purposes=lowlevel_purposes, **kwargs)
files = [MaskAttackPadFile(f) for f in files]
......
......@@ -6,6 +6,7 @@ from .VideoSparseCoding import VideoSparseCoding
from .Li import Li
from .Chrom import Chrom
from .SSR import SSR
from .PPGSecure import PPGSecure
def __appropriate__(*args):
"""Says object was actually declared here, and not in the import module.
......
......@@ -64,6 +64,7 @@ setup(
'aggregated-db = bob.pad.face.config.database.aggregated_db:database',
'mifs = bob.pad.face.config.database.mifs:database',
'maskattack = bob.pad.face.config.database.maskattack:database',
'batl = bob.pad.face.config.database.batl:database',
],
# registered configurations:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment