From 2578a83d8a31dbf74f833927bfd7cfe3655bc4ce Mon Sep 17 00:00:00 2001 From: Olegs NIKISINS <onikisins@italix03.idiap.ch> Date: Sun, 11 Mar 2018 11:18:36 +0100 Subject: [PATCH] WIP: Some modifications in BATL HLDI --- bob/pad/face/database/__init__.py | 2 ++ bob/pad/face/database/batl.py | 22 +++++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/bob/pad/face/database/__init__.py b/bob/pad/face/database/__init__.py index 12814bda..87a1efcc 100644 --- a/bob/pad/face/database/__init__.py +++ b/bob/pad/face/database/__init__.py @@ -4,6 +4,7 @@ from .replay_mobile import ReplayMobilePadDatabase from .msu_mfsd import MsuMfsdPadDatabase from .aggregated_db import AggregatedDbPadDatabase from .mifs import MIFSPadDatabase +from .batl import BatlPadDatabase # gets sphinx autodoc done right - don't remove it @@ -29,6 +30,7 @@ __appropriate__( MsuMfsdPadDatabase, AggregatedDbPadDatabase, MIFSPadDatabase, + BatlPadDatabase, ) __all__ = [_ for _ in dir() if not _.startswith('_')] diff --git a/bob/pad/face/database/batl.py b/bob/pad/face/database/batl.py index ff66c799..0a1c90fe 100644 --- a/bob/pad/face/database/batl.py +++ b/bob/pad/face/database/batl.py @@ -192,7 +192,7 @@ class BatlPadDatabase(PadDatabase): def objects(self, protocol=None, - group=None, + groups=None, purposes=None, sessions=None, **kwargs): @@ -229,6 +229,26 @@ class BatlPadDatabase(PadDatabase): # Since this database was designed for PAD experiments, nothing special # needs to be done here. files = self.db.objects(protocol=protocol, groups=groups, purposes=purposes **kwargs) + + +# files = self.db.objects(protocol=protocol, purposes=groups, **kwargs) +# +# if purposes == ["real", "attack"]: +# +# files = files +# +# if purposes == "real" or purposes == ["real"]: +# +# a = 1 +# +# +# if purposes == "attack" or purposes == ["attack"]: +# +# a = 1 + + + + files = [BatlPadFile(f, stream_type, max_frames) for f in files] return files -- GitLab