mifs.py 2.54 KB
Newer Older
David GEISSBUHLER's avatar
David GEISSBUHLER committed
1
2
#!/usr/bin/env python

David GEISSBUHLER's avatar
David GEISSBUHLER committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

"""`MIFS`_ is a face makeup spoofing database adapted for face PAD experiments.

Database assembled from a dataset consisting of 107 makeup-transformations taken
from random YouTube makeup video tutorials, adapted in this package for face-PAD
experiments. The public version of the database contains 107 such transformations
with each time two images of a subject before makeup, two images of the same
subject after makeup and two images of the target identity. For this package, a
subset of 104 makeup transformations is selected, the target identities images
discarded and the remaining images randomly distributed in three sets. More
information can be found in the reference [CDSR17]_.

You can download the raw data of the `MIFS`_ database by following
the link.

.. include:: links.rst

David GEISSBUHLER's avatar
David GEISSBUHLER committed
20
21
22
23
24
25
"""

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
26
ORIGINAL_DIRECTORY = "[YOUR_MIFS_DATABASE_DIRECTORY]"
David GEISSBUHLER's avatar
David GEISSBUHLER committed
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
"""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.

David GEISSBUHLER's avatar
David GEISSBUHLER committed
46
Notice that ``original_directory`` is set to ``[YOUR_MIFS_DATABASE_DIRECTORY]``.
David GEISSBUHLER's avatar
David GEISSBUHLER committed
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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.
"""