diff --git a/bob/pad/face/config/mifs.py b/bob/pad/face/config/mifs.py new file mode 100644 index 0000000000000000000000000000000000000000..5209463bea335ef07811a8f40b0abb616531f880 --- /dev/null +++ b/bob/pad/face/config/mifs.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python + +"""`MIFS`_ is a database for face PAD experiments using make-up. +""" + +from bob.pad.face.database import MIFSPadDatabase + +# Directory where the data files are stored. +# This directory is given in the .bob_bio_databases.txt file located in your home directory +ORIGINAL_DIRECTORY = "[YOUR_MIFS_DATABASE_DIRECTORY]" +"""Value of ``~/.bob_bio_databases.txt`` for this database""" + +ORIGINAL_EXTENSION = "" # extension of the data files + +database = MIFSPadDatabase( + protocol='grandtest', + original_directory=ORIGINAL_DIRECTORY, + original_extension=ORIGINAL_EXTENSION, + training_depends_on_protocol=True, +) +"""The :py:class:`bob.pad.base.database.PadDatabase` derivative with Replayattack +database settings + +.. warning:: + + This class only provides a programmatic interface to load data in an orderly + manner, respecting usage protocols. It does **not** contain the raw + data files. You should procure those yourself. + +Notice that ``original_directory`` is set to ``[YOUR_MIFS_DATABASE_DIRECTORY]``. +You must make sure to create ``${HOME}/.bob_bio_databases.txt`` setting this +value to the place where you actually installed the Replayattack Database, as +explained in the section :ref:`bob.pad.face.baselines`. +""" + +protocol = 'grandtest' +"""The default protocol to use for reproducing the baselines. + +You may modify this at runtime by specifying the option ``--protocol`` on the +command-line of ``spoof.py`` or using the keyword ``protocol`` on a +configuration file that is loaded **after** this configuration resource. +""" + +groups = ["train", "dev", "eval"] +"""The default groups to use for reproducing the baselines. + +You may modify this at runtime by specifying the option ``--groups`` on the +command-line of ``spoof.py`` or using the keyword ``groups`` on a +configuration file that is loaded **after** this configuration resource. +""" diff --git a/bob/pad/face/database/__init__.py b/bob/pad/face/database/__init__.py index bc586be28417c221340e0bf11297282f5cb4e6d6..5215323e3f04765dd84fd74a89bff8d03a9b2e6d 100644 --- a/bob/pad/face/database/__init__.py +++ b/bob/pad/face/database/__init__.py @@ -2,6 +2,7 @@ from .replay import ReplayPadDatabase from .replay_mobile import ReplayMobilePadDatabase from .msu_mfsd import MsuMfsdPadDatabase from .aggregated_db import AggregatedDbPadDatabase +from .mifs import MIFSPadDatabase # gets sphinx autodoc done right - don't remove it @@ -23,6 +24,7 @@ __appropriate__( ReplayMobilePadDatabase, MsuMfsdPadDatabase, AggregatedDbPadDatabase, + MIFSPadDatabase, ) __all__ = [_ for _ in dir() if not _.startswith('_')] diff --git a/bob/pad/face/database/mifs.py b/bob/pad/face/database/mifs.py index 517ecba02152169e23ee33789cd6d77bdda4de2f..dddab7befd5d601c8c6a34e2f6e0e21abd1dc64e 100644 --- a/bob/pad/face/database/mifs.py +++ b/bob/pad/face/database/mifs.py @@ -25,6 +25,7 @@ class MIFSPadFile(PadFile): #========================================================================== def load(self, directory=None, extension=None): + #path = self.make_path(directory, extension) path = self.make_path(directory=directory, extension=extension) # path to the file frame_selector = bob.bio.video.FrameSelector(selection_style = 'all') # this frame_selector will select all frames from the video file diff --git a/bob/pad/face/test/test_databases.py b/bob/pad/face/test/test_databases.py index c7b9a76f1a44930e02bb390d4dd53281c95bcd8b..6df4e4ac6f079925ae9fa2414b5b8fcc51fc6cb0 100644 --- a/bob/pad/face/test/test_databases.py +++ b/bob/pad/face/test/test_databases.py @@ -57,6 +57,7 @@ def test_msu_mfsd(): except IOError as e: raise SkipTest( "The database could not be queried; probably the db.sql3 file is missing. Here is the error: '%s'" % e) +<<<<<<< HEAD # Test the Aggregated database, which doesn't have a package @@ -94,3 +95,5 @@ def test_aggregated_db(): +======= +>>>>>>> ed055bf5d9222546143fa212b578be273ace2269 diff --git a/setup.py b/setup.py index 25eaac9a091cf5f93670371c2423cdab5c203285..7ca82566e5123e8dae0406fbcbf9f910df699780 100644 --- a/setup.py +++ b/setup.py @@ -67,6 +67,7 @@ setup( 'replay-mobile = bob.pad.face.config.database.replay_mobile:database', 'msu-mfsd = bob.pad.face.config.database.msu_mfsd:database', 'aggregated-db = bob.pad.face.config.database.aggregated_db:database', + 'mifs = bob.pad.face.config.database.mifs:database', ], # registered configurations: @@ -76,6 +77,7 @@ setup( 'replay-mobile = bob.pad.face.config.replay_mobile', 'msu-mfsd = bob.pad.face.config.msu_mfsd', 'aggregated-db = bob.pad.face.config.aggregated_db', + 'mifs = bob.pad.face.config.mifs', # baselines using SVM: 'lbp-svm = bob.pad.face.config.lbp_svm',