{ "info": { "author": "Nesli Erdogmus", "author_email": "nesli.erdogmus@idiap.ch", "bugtrack_url": null, "classifiers": [], "description": "=============================================================================\n Counter-Measures to 3D Facial Mask Attacks using Local Binary Patterns (LBP)\n=============================================================================\n\nThis package implements the LBP counter-measure to spoofing attacks with 3d masks to 2d face recognition systems as described in the paper `Spoofing in 2D Face Recognition with 3D Masks and Anti-spoofing with Kinect`, by N. Erdogmus and S. Marcel, presented at BTAS 2013.\n\nIf you use this package and/or its results, please cite the following publications:\n\n1. The original paper with the counter-measure explained in details::\n\n @INPROCEEDINGS{Erdogmus_BTAS_2013,\n author = {Erdogmus, Nesli and Marcel, S{\\'{e}}bastien},\n keywords = {3D Mask Attack, Counter-Measures, Counter-Spoofing, Face Recognition, Liveness Detection, Replay, Spoofing},\n month = sep,\n title = {Spoofing in 2D Face Recognition with 3D Masks and Anti-spoofing with Kinect},\n journal = {BTAS 2013},\n year = {2013},\n }\n \n2. Bob as the core framework used to run the experiments::\n\n @inproceedings{Anjos_ACMMM_2012,\n author = {A. Anjos AND L. El Shafey AND R. Wallace AND M. G\\\"unther AND C. McCool AND S. Marcel},\n title = {Bob: a free signal processing and machine learning toolbox for researchers},\n year = {2012},\n month = oct,\n booktitle = {20th ACM Conference on Multimedia Systems (ACMMM), Nara, Japan},\n publisher = {ACM Press},\n }\n\nIf you wish to report problems or improvements concerning this code, please contact the authors of the above mentioned papers.\n\nRaw data\n--------\n\nThe data used in the paper is publicly available and should be downloaded and installed **prior** to try using the programs described in this package. Visit `the 3D MASK ATTACK database portal `_ for more information.\n\nInstallation\n------------\n\n.. note:: \n\n If you are reading this page through our GitHub portal and not through PyPI, note **the development tip of the package may not be stable** or become unstable in a matter of moments.\n\n Go to `http://pypi.python.org/pypi/maskattack.lbp `_ to download the latest stable version of this package.\n\nThere are 2 options you can follow to get this package installed and operational on your computer: you can use automatic installers like `pip `_ (or `easy_install `_) or manually download, unpack and use `zc.buildout `_ to create a virtual work environment just for this package.\n\nUsing an automatic installer\n============================\n\nUsing ``pip`` is the easiest (shell commands are marked with a ``$`` signal)::\n\n $ pip install maskattack.lbp\n\nYou can also do the same with ``easy_install``::\n\n $ easy_install maskattack.lbp\n\nThis will download and install this package plus any other required dependencies. It will also verify if the version of Bob you have installed is compatible.\n\nThis scheme works well with virtual environments by `virtualenv `_ or if you have root access to your machine. Otherwise, we recommend you use the next option.\n\nUsing ``zc.buildout``\n=====================\n\nDownload the latest version of this package from `PyPI `_ and unpack it in your working area. The installation of the toolkit itself uses `buildout `_. You don't need to understand its inner workings to use this package. Here is a recipe to get you started::\n \n $ python bootstrap.py \n $ ./bin/buildout\n\nThese 2 commands should download and install all non-installed dependencies and get you a fully operational test and development environment.\n\n.. note::\n\n The python shell used in the first line of the previous command set determines the python interpreter that will be used for all scripts developed inside this package. Because this package makes use of `Bob `_, you must make sure that the ``bootstrap.py`` script is called with the **same** interpreter used to build Bob, or unexpected problems might occur.\n\n If Bob is installed by the administrator of your system, it is safe to consider it uses the default python interpreter. In this case, the above 3 command lines should work as expected. If you have Bob installed somewhere else on a private directory, edit the file ``buildout.cfg`` **before** running ``./bin/buildout``. Find the section named ``external`` and edit the line ``egg-directories`` to point to the ``lib`` directory of the Bob installation you want to use. For example::\n\n [external]\n recipe = xbob.buildout:external\n egg-directories=/Users/crazyfox/work/bob/build/lib\n\nUser Guide\n----------\n\nThis section explains how to use the package in order to: a) calculate the LBP features on the 3D Mask Attack database; b) perform classification using Chi-2, Linear Discriminant Analysis (LDA) and Support Vector Machines (SVM).\n\nIt is assumed you have followed the installation instructions for the package, and got the required database downloaded and uncompressed in a directory. After running the ``buildout`` command, you should have all required utilities sitting inside the ``bin`` directory. We expect that the video files of the database are installed in a sub-directory called ``database`` at the root of the package. You can use a link to the location of the database files, if you don't want to have the database installed on the root of this package::\n\n $ ln -s /path/where/you/installed/the/database database\n\nIf you don't want to create a link, use the ``--input-dir`` flag (available in all the scripts) to specify the root directory containing the database files.\n\nCalculate the LBP features\n==========================\n\nThe first stage of the process is calculating the feature vectors, which are essentially normalized LBP histograms. A single feature vector for each frame of the video (both for the depth and color images) is computed and saved as a multiple row array in a single file. \n\nThe program to be used for this is ``./bin/calclbp.py``. It uses the utility script ``spoof/calclbp.py``. Depending on the command line arguments, it can compute different types of LBP histograms over the normalized face bounding box. Cropped and normalized images can be saved to a folder (``./img_cropped`` by default) and used in future computations to skip cropping using ``-sc`` flag.\n\nFurthermore, the normalized face-bounding box can be divided into blocks or not.\n\nThe following commands will calculate the feature vectors of all the videos in the database and will put the resulting ``.hdf5`` files with the extracted feature vectors in the output directory ``./lbp_features/r_1`` with and without skipping the cropping step::\n\n $ bin/calclbp.py -ld ./lbp_features/r_1 --el regular\n \n $ bin/calclbp.py -cd ./img_cropped -ld ./lbp_features/r_1 --el regular -sc\n\nIn the above command, the program will crop (64x64 by default) and normalize the images according to the eye positions available in the database. The cropped images will be saved to the default directory (``img_cropped``) which can be changed using ``--cropped-dir`` argument.\n\nTo see all the options for the script ``calclbp.py``, just type ``--help`` at the command line. Change the default option in order to obtain various features described in the paper.\n\nClassification using Chi-2 distance\n===================================\n\nThe clasification using Chi-2 distance consists of two steps. The first one is creating the histogram model (average LBP histogram of all the real access videos in the training set). The second step is comparison of the features of development and test videos to the model histogram and writing the results.\n\nThe script for performing Chi-2 histogram comparison is ``./bin/cmphistmodels.py``. It expects that the LBP features of the videos are stored in a folder ``./bin/lbp_features``. \n\nFirst, it calculates the average real-access histogram using the training set and next, it computes the distances and writes the results in a file using the utility script ``spoof/chi2.py`. The default input directory is ``./lbp_features``, while the default output directory is ``./res``. To execute this script on previously extracted features, just run:: \n\n $ ./bin/cmphistmodels.py -v ./lbp_features/r_1\n\nTo see all the options for the script ``cmphistmodels.py``, just type ``--help`` at the command line.\n\nClassification with linear discriminant analysis (LDA)\n======================================================\n\nThe classification with LDA is performed using the script ``./bin/ldatrain_lbp.py``. It makes use of the scripts ``ml/lda.py``, ``ml/pca.py`` (if PCA reduction is performed on the data) and ``ml/norm.py`` (if the data need to be normalized). The default input and output directories are ``./lbp_features`` and ``./res``. To execute the script with prior PCA dimensionality reduction as is done in the paper, call::\n\n $ ./bin/ldatrain_lbp.py -v ./lbp_features/r_1 -r\n\nTo see all the options for this script, just type ``--help`` at the command line.\n\nClassification with support vector machine (SVM)\n================================================\n\nThe classification with SVM is performed using the script ``./bin/svmtrain_lbp.py``. It makes use of the scripts ``ml/pca.py`` (if PCA reduction is performed on the data) and ``ml\\norm.py`` (if the data need to be normalized). The default input and output directories are ``./lbp_features`` and ``./res``. To execute the script as is done in the paper, call::\n\n $ ./bin/svmtrain_lbp.py -v ./lbp_features/r_1\n\nTo see all the options for this script, just type ``--help`` at the command line.\n\nPlotting the HTER\n=================\nThe classification scripts ``cmphistmodels``, ``ldatrain_lbp`` and ``svmtrain_lbp``, run the experiments in 1000-fold manner, by randomly assigning subject ids to training, development and test sets (of fixed size). The resulting files are written to the ``res`` folder by default. If all the experiments in the paper are run (3 classification, 4 LBP methods with and without blocks - see ``run_experiments.sh``), the ``barplot.py`` script will create and save the image with HTER bar plot (under the ``res`` folder), for which the height shows the mean of the HTER values in 1000 folds and the error bar shows the standard deviation::\n\n $ ./bin/barplot.py\n\n\nProblems\n--------\n\nIn case of problems, please contact any of the authors of the paper.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/bioidiap/maskattack.lbp", "keywords": null, "license": "GPLv3", "maintainer": null, "maintainer_email": null, "name": "maskattack.lbp", "package_url": "https://pypi.org/project/maskattack.lbp/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/maskattack.lbp/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/bioidiap/maskattack.lbp" }, "release_url": "https://pypi.org/project/maskattack.lbp/1.0.4/", "requires_dist": null, "requires_python": null, "summary": "Texture (LBP) based counter-measures for the 3D MASK ATTACK database", "version": "1.0.4" }, "last_serial": 1115446, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "af0fbecec7bb8d304c5015803db77256", "sha256": "03317c8840fc6bd46ee8ca075d222d2c42582ee807c2b9234a6aca127059edb1" }, "downloads": -1, "filename": "maskattack.lbp-1.0.0.zip", "has_sig": false, "md5_digest": "af0fbecec7bb8d304c5015803db77256", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 43066, "upload_time": "2013-07-18T11:26:15", "url": "https://files.pythonhosted.org/packages/6f/4a/d7da5a7c92003adc22299d233c6c74ce214753e79c998d4d0dea20bd7e35/maskattack.lbp-1.0.0.zip" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "8dc7e504d64e294c082d5b590afedf9e", "sha256": "198cc05ca54714cd709ede7e501a1eb5be172003952a2bee75fba83761209a5a" }, "downloads": -1, "filename": "maskattack.lbp-1.0.1.zip", "has_sig": false, "md5_digest": "8dc7e504d64e294c082d5b590afedf9e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1357215, "upload_time": "2013-10-04T15:21:45", "url": "https://files.pythonhosted.org/packages/7c/98/9b14a17bc0b8036e2d9a99cef80b99ba88751eac8c9571bf98a637408894/maskattack.lbp-1.0.1.zip" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "d27c568cf600af3fe95b79af1d8c3325", "sha256": "18318236ed76924075ed98d5cafe484527b92dcc5387fff676acaea16cca7cd7" }, "downloads": -1, "filename": "maskattack.lbp-1.0.2.zip", "has_sig": false, "md5_digest": "d27c568cf600af3fe95b79af1d8c3325", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1357269, "upload_time": "2013-11-19T11:57:59", "url": "https://files.pythonhosted.org/packages/07/6f/d1be8e443f7230ccaec4a8927bc87af4dcb397d07a117498666a8a372a1e/maskattack.lbp-1.0.2.zip" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "8f2a9bfbdfc560e43dd87fe3ad2dc0f5", "sha256": "b5213cedea01b2c0d57810285bd1f355833d80da507ae885f2650759e96c10ed" }, "downloads": -1, "filename": "maskattack.lbp-1.0.3.zip", "has_sig": false, "md5_digest": "8f2a9bfbdfc560e43dd87fe3ad2dc0f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1357270, "upload_time": "2013-11-19T12:09:19", "url": "https://files.pythonhosted.org/packages/ee/b4/6764da2186de8c8baa999762a5aba155a6d2861d7888770e5671a2f1b802/maskattack.lbp-1.0.3.zip" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "a28b4ec88ad5956018e28427178fcd9e", "sha256": "8a57a7a50456d5986eb784128cb69e7f5bb3db9a3b27331a40a39ce529e3758b" }, "downloads": -1, "filename": "maskattack.lbp-1.0.4.zip", "has_sig": false, "md5_digest": "a28b4ec88ad5956018e28427178fcd9e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1357273, "upload_time": "2014-06-05T13:19:16", "url": "https://files.pythonhosted.org/packages/7d/cd/a424917143e9ba9e6e417f210c87b413e89f5a16973f63253a9963216700/maskattack.lbp-1.0.4.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a28b4ec88ad5956018e28427178fcd9e", "sha256": "8a57a7a50456d5986eb784128cb69e7f5bb3db9a3b27331a40a39ce529e3758b" }, "downloads": -1, "filename": "maskattack.lbp-1.0.4.zip", "has_sig": false, "md5_digest": "a28b4ec88ad5956018e28427178fcd9e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1357273, "upload_time": "2014-06-05T13:19:16", "url": "https://files.pythonhosted.org/packages/7d/cd/a424917143e9ba9e6e417f210c87b413e89f5a16973f63253a9963216700/maskattack.lbp-1.0.4.zip" } ] }