From abcf3332e87b06fc500b88018fc442c6a54769de Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Geissb=C3=BChler?= <david.geissbuhler@idiap.ch>
Date: Thu, 28 Sep 2017 18:36:07 +0200
Subject: [PATCH] Updated documentation

---
 bob/pad/face/config/database/mifs.py | 18 ++++++++++++++++++
 bob/pad/face/config/mifs.py          | 18 +++++++++++++++++-
 bob/pad/face/database/mifs.py        | 22 +++++++++++++++++++++-
 doc/api.rst                          |  6 ++++++
 doc/links.rst                        |  3 ++-
 doc/references.rst                   |  3 +++
 doc/resources.rst                    |  9 ++++++---
 7 files changed, 73 insertions(+), 6 deletions(-)

diff --git a/bob/pad/face/config/database/mifs.py b/bob/pad/face/config/database/mifs.py
index b70b3105..d5db7dbc 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 5209463b..215a7da0 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 dddab7be..570606a8 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 3b834a8c..74a89cd7 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 44ef1f87..0394a852 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 9b34385a..4a9b4632 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 30bf7819..ca93b11a 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:
-
-
-
-- 
GitLab