diff --git a/bob/pad/face/config/database/mifs.py b/bob/pad/face/config/database/mifs.py index b70b31053c0561e9091ed4ec2840431ee9681105..d5db7dbcd4beabfb8b3472a05c5fe7736c7198bb 100644 --- a/bob/pad/face/config/database/mifs.py +++ b/bob/pad/face/config/database/mifs.py @@ -1,4 +1,22 @@ +#!/usr/bin/env python +"""`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 + +""" from bob.pad.face.database.mifs import MIFSPadDatabase diff --git a/bob/pad/face/config/mifs.py b/bob/pad/face/config/mifs.py index 5209463bea335ef07811a8f40b0abb616531f880..215a7da09d280479698db6c0d27961a3657f30b9 100644 --- a/bob/pad/face/config/mifs.py +++ b/bob/pad/face/config/mifs.py @@ -1,6 +1,22 @@ #!/usr/bin/env python -"""`MIFS`_ is a database for face PAD experiments using make-up. + +"""`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 + """ from bob.pad.face.database import MIFSPadDatabase diff --git a/bob/pad/face/database/mifs.py b/bob/pad/face/database/mifs.py index dddab7befd5d601c8c6a34e2f6e0e21abd1dc64e..570606a8dad5f06d5d528b19012b5659201c77dc 100644 --- a/bob/pad/face/database/mifs.py +++ b/bob/pad/face/database/mifs.py @@ -1,6 +1,7 @@ #!/usr/bin/env python2 # -*- coding: utf-8 -*- +#!/usr/bin/env python #============================================================================== @@ -25,7 +26,26 @@ class MIFSPadFile(PadFile): #========================================================================== def load(self, directory=None, extension=None): - #path = self.make_path(directory, extension) + """ + Overridden version of the load method defined in the ``PadFile``. + + **Parameters:** + + ``directory`` : :py:class:`str` + String containing the path to the MIFS database. + Default: None + + ``extension`` : :py:class:`str` + Extension of the video files in the MIFS database. + Default: None + + **Returns:** + + ``video_data`` : FrameContainer + Video data stored in the FrameContainer, see ``bob.bio.video.utils.FrameContainer`` + for further details. + """ + 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/doc/api.rst b/doc/api.rst index 3b834a8cd2fc9e468bba8b6c78293837ece98dd3..74a89cd7966719c5036ee9a6c69aa9c3fd0de4a9 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -37,6 +37,12 @@ Aggregated Database .. autoclass:: bob.pad.face.database.aggregated_db.AggregatedDbPadFile .. autoclass:: bob.pad.face.database.aggregated_db.AggregatedDbPadDatabase +MIFS Database +======================== + +.. autoclass:: bob.pad.face.database.mifs.MIFSPadFile +.. autoclass:: bob.pad.face.database.mifs.MIFSPadDatabase + Pre-processors ------------------------------ diff --git a/doc/links.rst b/doc/links.rst index 44ef1f87ef310f7e3bf869f70152c569dfb00ee9..0394a8529286af1004d95ec762602b6933f5f24e 100644 --- a/doc/links.rst +++ b/doc/links.rst @@ -12,4 +12,5 @@ .. _replayattack: https://www.idiap.ch/dataset/replayattack .. _replay-mobile: https://www.idiap.ch/dataset/replay-mobile .. _dependencies: https://gitlab.idiap.ch/bob/bob/wikis/Dependencies -.. _MSU MFSD: http://biometrics.cse.msu.edu/Publications/Databases/MSUMobileFaceSpoofing/index.htm \ No newline at end of file +.. _MSU MFSD: http://biometrics.cse.msu.edu/Publications/Databases/MSUMobileFaceSpoofing/index.htm +.. _MIFS: http://www.antitza.com/makeup-datasets.html diff --git a/doc/references.rst b/doc/references.rst index 9b34385ac989b36a6792fcf40dc75187603218b6..4a9b4632b74a44b0b6e831fc8e368abad45bce29 100644 --- a/doc/references.rst +++ b/doc/references.rst @@ -15,3 +15,6 @@ References .. [AM11] *A. Anjos and S. Marcel*, **Counter-measures to photo attacks in face recognition: A public database and a baseline**, in: 2011 International Joint Conference on Biometrics (IJCB), Washington, DC, 2011, pp. 1-7. + +.. [CDSR17] *C. Chen, A. Dantcheva, T. Swearingen, A. Ross, "Spoofing Faces Using Makeup: An Investigative Study," + in: Proc. of 3rd IEEE International Conference on Identity, Security and Behavior Analysis (ISBA), (New Delhi, India), February 2017. diff --git a/doc/resources.rst b/doc/resources.rst index 30bf78198744d430a2c405342b3e045b5dfed4a1..ca93b11a2ae35163884c7109e014a2909e274cb0 100644 --- a/doc/resources.rst +++ b/doc/resources.rst @@ -60,6 +60,12 @@ Aggregated Database .. automodule:: bob.pad.face.config.aggregated_db :members: +MIFS Database +================================================================================ + +.. automodule:: bob.pad.face.config.mifs + :members: + --------------------------------- @@ -129,6 +135,3 @@ Frame differences based features (motion analysis) + SVM for Aggregated Database .. automodule:: bob.pad.face.config.frame_diff_svm_aggregated_db :members: - - -