README.rst 3.63 KB
Newer Older
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
1
2
.. vim: set fileencoding=utf-8 :

Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
3
4
5
===========================================================
 Spoofing Deep Face Recognition with Custom Silicone Masks
===========================================================
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
6
7

This package is part of the signal-processing and machine learning toolbox
8
Bob_. It contains the source code to reproduce the following paper_::
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
9
10


Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
11
12
    @article{,
              title = {Spoofing Deep Face Recognition with Custom Silicone Masks},
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
13
14
15
16
17
18
19
20
21
22
23
24
25
    }


Installation
------------

The installation instructions are based on conda_ and works on **Linux systems
only**. `Install conda`_ before continuing.

Once you have installed conda_, download the source code of this paper and
unpack it.  Then, you can create a conda environment with the following
command::

26
    $ cd bob.paper.btas2018_siliconemask
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
27
    $ conda env create -f environment.yml
28
    $ conda activate bob.paper.btas2018_siliconemask  # activate the environment
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
29
30
31
32
    $ buildout

This will install all the required software to reproduce this paper.

Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
33
Downloading the dataset
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
34
35
------------------------

Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
36
The dataset used in this study is publicly available.
37
To download the dataset please refer to its websites: `CSMAD`_
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

Downloading the face recognition models
---------------------------------------

Pre-trained face recognition (FR) models can be downloaded from their
respective website as well.

* `VGG Face`_ (`VGG Face model`_)
* `LightCNN`_ (`LightCNN model`_)
* `FaceNet`_ (`FaceNet model`_)

The code will automatically download the VGG Face and LightCNN models and will
place them in the right place. So you may skip downloading those manually.
Please unzip the `FaceNet model`_ in the source directory with the name
``20170512-110547``.

Configuring the experiments
---------------------------

Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
57
58
Now that you have downloaded the database. You need to set the path to the
database in the configuration file. Bob_ supports a configuration file
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
59
(``~/.bob_bio_databases.txt``) in your home directory to specify where the
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
60
61
databases are located. Please specify the paths for the database like below (by
editing the file manually) ::
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
62
63

   $ cat ~/.bob_bio_databases.txt
64
   [CSMAD_DIRECTORY] = /databases/CSMAD
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
65
66
67
68

Running the experiments
-----------------------

Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
69
70
71
A bash script is provided to help you run the code. You need to specify
a directory to save the intermediate files. For example::

72
   $ export RESULTS_DIR=$HOME/idiap/CSMAD
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
73
74

Then, run::
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
75

Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
76
   $ ./run.sh
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
77

78

Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
79
80
81
82
83
84
85
86
87
88
89
Contact
-------

For questions or reporting issues to this software package, contact our
development `mailing list`_.


.. Place your references here:
.. _bob: https://www.idiap.ch/software/bob
.. _mailing list: https://www.idiap.ch/software/bob/discuss
.. _conda: https://conda.io
90
.. _install conda: https://conda.io/docs/user-guide/install/linux.html
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
91
92
93
94
95
96
97
98
99
100
101
102
103
.. _bob.bio.base: https://pypi.python.org/pypi/bob.bio.base
.. _paper: http://publications.idiap.ch/index.php/publications/show/$$$$
.. _mobio: https://www.idiap.ch/dataset/mobio
.. _replay attack: http://www.idiap.ch/dataset/replayattack
.. _replay mobile: http://www.idiap.ch/dataset/replay-mobile
.. _msu mfsd: https://www.cse.msu.edu/rgroups/biometrics/Publications/Databases/MSUMobileFaceSpoofing/index.htm
.. _vgg face: http://www.robots.ox.ac.uk/~vgg/software/vgg_face
.. _vgg face model: http://www.robots.ox.ac.uk/~vgg/software/vgg_face
.. _lightcnn: https://github.com/AlfredXiangWu/face_verification_experiment
.. _lightcnn model: https://github.com/AlfredXiangWu/face_verification_experiment/archive/master.zip
.. _facenet: https://github.com/davidsandberg/facenet
.. _facenet model: https://drive.google.com/uc?export=download&confirm=YCEV&id=0B5MzpY9kBtDVZ2RpVDYwWmxoSUk
.. _roc sdk: https://www.rankone.io