{ "info": { "author": "Ivana Chingovska", "author_email": "ivana.chingovska@idiap.ch", "bugtrack_url": null, "classifiers": [], "description": "=============================================================================\n Counter-Measures to Face Spoofing Attacks using Local Binary Patterns (LBP)\n=============================================================================\n\nThis package implements the LBP counter-measure to spoofing attacks to face\nrecognition systems as described at the paper `On the Effectiveness of Local\nBinary Patterns in Face Anti-spoofing`, by Chingovska, Anjos and Marcel,\npresented at the IEEE BioSIG 2012 meeting.\n\nIf you use this package and/or its results, please cite the following\npublications:\n\n1. The `original paper `_ with the counter-measure explained in details::\n\n @INPROCEEDINGS{Chingovska_BIOSIG_2012,\n author = {Chingovska, Ivana and Anjos, Andr{\\'{e}} and Marcel, S{\\'{e}}bastien},\n keywords = {Attack, Counter-Measures, Counter-Spoofing, Face Recognition, Liveness Detection, Replay, Spoofing},\n month = sep,\n title = {On the Effectiveness of Local Binary Patterns in Face Anti-spoofing},\n journal = {IEEE BIOSIG 2012},\n year = {2012},\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\ncontact 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\ninstalled **prior** to try using the programs described in this package. Visit\n`the REPLAY-ATTACK database portal\n`_ for more information.\n\nThis satellite package can also work with the `CASIA_FASD database `_. \n\nInstallation\n------------\n\n.. note:: \n\n If you are reading this page through our GitHub portal and not through PyPI,\n note **the development tip of the package may not be stable** or become\n unstable in a matter of moments.\n\n Go to `http://pypi.python.org/pypi/antispoofing.lbp\n `_ to download the latest\n stable version of this package. Then, extract the .zip file to a folder of your choice.\n\nThe ``antispoofing.lbp`` package is a satellite package of the free signal processing and machine learning library Bob_. This dependency has to be downloaded manually. This version of the package depends on Bob_ version 2 or greater. To install `packages of Bob `_, please read the `Installation Instructions `_. For Bob_ to be able to work properly, some dependent Bob packages are required to be installed. Please make sure that you have read the Dependencies for your operating system.\n\nThe most simple solution is to download and extract ``antispoofing.lbp`` package, then to go to the console and write::\n\n $ cd antispoofing.lbp\n $ python bootstrap-buildout.py\n $ bin/buildout\n\nThis will download all required dependent Bob_ and other packages and install them locally. \n\n\nUser Guide\n----------\n\nThis section explains how to use the package in order to: a) calculate the LBP\nfeatures on the REPLAY-ATTACK or CASIA_FASD database; b) perform classification using Chi-2,\nLinear Discriminant Analysis (LDA) and Support Vector Machines (SVM). At the bottom of the page, you can find instructions how to reproduce the exact paper results.\n\nIt is assumed you have followed the installation instructions for the package,\nand got the required database downloaded and uncompressed in a directory.\nAfter running the ``buildout`` command, you should have all required utilities\nsitting inside the ``bin`` directory. We expect that the video files of the database are installed in a sub-directory called\n``database`` at the root of the package. You can use a link to the location of\nthe database files, if you don't want to have the database installed on the\nroot 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\nall the scripts) to specify the root directory containing the database files.\nThat would be the directory that *contains* the sub-directories ``train``,\n``test``, ``devel`` and ``face-locations``.\n\nCalculate the LBP features\n==========================\n\nThe first stage of the process is calculating the feature vectors, which are\nessentially normalized LBP histograms. There are two types of feature vectors:\n\n1. per-video averaged feature-vectors (the normalized LBP histograms for each\n frame, averaged over all the frames of the video. The result is a single\n feature vector for the whole video), or\n\n2. a single feature vector for each frame of the video (saved as a multiple row\n array in a single file). \n\nThe program to be used for the first case is ``./bin/calclbp.py``, and for the\nsecond case ``./bin/calcframelbp.py``. They both use the utility script\n``spoof/calclbp.py``. Depending on the command line arguments, they can compute\ndifferent types of LBP histograms over the normalized face bounding box.\nFurthermore, the normalized face-bounding box can be divided into blocks or\nnot.\n\nThe following command will calculate the per-video averaged feature vectors of\nall the videos in the REPLAY-ATTACK database and will put the resulting\n``.hdf5`` files with the extracted feature vectors in the default output\ndirectory ``./lbp_features``::\n\n $ ./bin/calclbp.py --ff 50 replay\n\nIn the above command, the face size filter is set to 50 pixels (as in the\npaper), and the program will discard all the frames with detected faces smaller\nthen 50 pixels as invalid.\n\nTo calculate the feature vectors for each frame separately (and save them into a single file for the full video), you have to run::\n\n$ ./bin/calcframelbp.py --ff 50 replay\n\nTo see all the options for the scripts ``calclbp.py`` and ``calcframelbp.py``,\njust type ``--help`` at the command line. Change the default option in order to\nobtain various features, as described in the paper. \n\nIf you want to see all the options for a specific database (e.g. protocols, lighting conditions etc.), type the following command (for Replay-Attack)::\n \n $ ./bin/calclbp.py replay --help\n\nClassification using Chi-2 distance\n===================================\n\nThe clasification using Chi-2 distance consists of two steps. The first one is\ncreating the histogram model (average LBP histogram of all the real access\nvideos in the training set). The second step is comparison of the features of\ndevelopment and test videos to the model histogram and writing the results.\n\nThe script to use for creating the histogram model is\n``./bin/mkhistmodel.py``. It expects that the LBP features of the videos are\nstored in a folder ``./bin/lbp_features``. The model histogram will be written\nin the default output folder ``./res``. You can change this default features by\nsetting the input arguments. To execute this script fro Replay-Attack, just run::\n\n $ ./bin/mkhistmodel.py replay\n\nThe script for performing Chi-2 histogram comparison is\n``./bin/cmphistmodels.py``, and it assumes that the model histogram has been\nalready created. It makes use of the utility script ``spoof/chi2.py``. The default input directory is\n``./lbp_features``, while the default input directoru for the histogram model\nas well as default output directory is ``./res``. To execute this script for Replay-Attack, just\nrun:: \n\n $ ./bin/cmphistmodels.py -s replay\n\nDo not forget the ``-s`` option if you want the scores for each video saved in a file.\n\nTo see all the options for the scripts ``mkhistmodel.py`` and\n``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\n``./bin/ldatrain_lbp.py``. The default input and output directories\nare ``./lbp_features`` and ``./res``. To execute the script with prior PCA\ndimensionality reduction as is done in the paper (for Replay-Attack), call::\n\n $ ./bin/ldatrain_lbp.py -r -s replay\n\nDo not forget the ``-s`` option if you want the scores for each video saved in a file.\n\nTo see all the options for this script, just type ``--help`` at the command\nline.\n\nClassification with support vector machine (SVM)\n================================================\n\nThe classification with SVM is performed using the script\n``./bin/svmtrain_lbp.py``. The default input and output directories are ``./lbp_features``\nand ``./res``. To execute the script with prior normalization of the data in\nthe range ``[-1, 1]`` as in the paper (for Replay-Attack), call::\n\n $ ./bin/svmtrain_lbp.py -n --eval -s replay\n\nDo not forget the ``-s`` option if you want the scores for each video saved in a file.\n\nTo see all the options for this script, just type ``--help`` at the command\nline.\n\nClassification with support vector machine (SVM) on a different database or database subset\n===========================================================================================\n\nIn the training process, the SVM machine, as well as the normalization and PCA parameters are saved in an .hdf5 file. They can be used later for classification of data from a different database or database subset. This can be done using the script\n``./bin/svmtrain_lbp.py``. The default input and output directories are ``./lbp_features``\nand ``./res``. To execute the script, call::\n\n $ ./bin/svmeval_lbp.py replay\n\nDo not forget the ``-s`` option if you want the scores for each video saved in a file. Also, do not forget to specify the right .hdf5 file where the SVM machine and the parameters are saved using the ``-i`` parameter (the default one is ``./res/svm_machine.hdf5`` \n\nTo see all the options for this script, just type ``--help`` at the command\nline.\n\n\nReproduce paper results\n=======================\n\nThe exact commands to reproduce the results from the paper are given here. First, feature exatraction should be done as follows::\n\n $ ./bin/calcframelbp.py -d features/regular replay \n $ ./bin/calcframelbp.py -d features/transitional replay\n $ ./bin/calcframelbp.py -d features/direction_coded replay\n $ ./bin/calcframelbp.py -d features/modified replay\n $ ./bin/calcframelbp.py -d features/per-block -b 3 replay\n \nThe results in Table II are obtained with the following commands::\n\n $ ./bin/mkhistmodel.py -v features/regular -d models/regular replay\n $ ./bin/cmphistmodels.py -v features/regular -m models/regular -d scores/regular -s replay\n \nBy changing the ``-v`` parameter, you can change the type of features, resulting in the scores for the different columns of the table.\n\nThe results in Table III are obtained by the same commands, using the corresponding value for the ``-v`` parameter for the per-block computed feature.\n\nThe results in Table IV for LDA and SVM classification are obtained by the following two commands, respectively::\n\n $ ./bin/ldatrain_lbp.py -v features/regular -d scores/regular -n replay\n $ ./bin/svmtrain_lbp.py -v features/regular -d scores/regular -n -r replay \n \nThe results for the CASIA-FASD database can be obtained in the same way, by specifying the ``casia`` parameter at the end of the commands. Note that the results for CASIA-FASD are reported on per-block basis, and using 5-fold cross validation. This means that the results need to be generated 5 times, training with different fold, which can be specified as an argument as well.\n\nImportant note: the results in the last column of Table V are not straight-forwardly reproducible at the moment (in particular, the concatenation of histograms is not directly supported using the scripts in this satellite package). Furthermore, at the present state, the scripts do not support the NUAA database. Work to solve this incovenience is in progress :)\n \n\n\nProblems\n--------\n\nIn case of problems, please contact any of the authors of the paper.\n\n\n.. _Bob: http://www.idiap.ch/software/bob", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/antispoofing.lbp", "keywords": "antispoofing texture,LBP,face spoofing attacks,face spoofing database,bob,xbob", "license": "GPLv3", "maintainer": null, "maintainer_email": null, "name": "antispoofing.lbp", "package_url": "https://pypi.org/project/antispoofing.lbp/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/antispoofing.lbp/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/antispoofing.lbp" }, "release_url": "https://pypi.org/project/antispoofing.lbp/2.0.4/", "requires_dist": null, "requires_python": null, "summary": "Texture (LBP) based counter-measures for the REPLAY-ATTACK database", "version": "2.0.4" }, "last_serial": 1895278, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "b266dc000b621a5c5bb4062446d278e7", "sha256": "295bc728ca665dc579a6eb95777b5d86d73c53bd7cf3ecdc3f6285774d68d76b" }, "downloads": -1, "filename": "antispoofing.lbp-1.0.0.zip", "has_sig": false, "md5_digest": "b266dc000b621a5c5bb4062446d278e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 48979, "upload_time": "2012-08-30T15:15:57", "url": "https://files.pythonhosted.org/packages/60/e1/8da9c15438f2c99040e07c09f6aa82a5fcd8c38a969bca7c79ad7d4b9542/antispoofing.lbp-1.0.0.zip" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "9814ab89da903bbcd07a2935342a1e70", "sha256": "d8e2ac89c0b65f2193118054460da4d6ed2eb8ef3b45aa795f5cb98033cc77c4" }, "downloads": -1, "filename": "antispoofing.lbp-1.1.0.zip", "has_sig": false, "md5_digest": "9814ab89da903bbcd07a2935342a1e70", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 52417, "upload_time": "2012-12-20T12:16:54", "url": "https://files.pythonhosted.org/packages/8d/76/c7f4ad8f3fa4950313bfce5c52c7c8995966a48d8d59c488b515d0360b65/antispoofing.lbp-1.1.0.zip" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "67c39e41cd9ba5587358970ac7cb8f44", "sha256": "6c64717fcd43d5a2013189c54341776da0a226c7f01480e65f9bfb5d06a05c29" }, "downloads": -1, "filename": "antispoofing.lbp-1.1.1.tar.gz", "has_sig": false, "md5_digest": "67c39e41cd9ba5587358970ac7cb8f44", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27357, "upload_time": "2013-07-16T16:08:04", "url": "https://files.pythonhosted.org/packages/b4/fe/a1b0baae91295af2c1c75844b0cda50aadc798081879ee8eb069c0f1cba2/antispoofing.lbp-1.1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "10f7a268f812a986b6c38aab1ad3b2bc", "sha256": "2515fba8b073995a62e84917ca6a26440f7745d7781c0dcd6a55fffca207ad2b" }, "downloads": -1, "filename": "antispoofing.lbp-1.1.2.zip", "has_sig": false, "md5_digest": "10f7a268f812a986b6c38aab1ad3b2bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 50123, "upload_time": "2013-07-19T13:56:26", "url": "https://files.pythonhosted.org/packages/41/8d/32c6db074b81e901d35e7692014f3c7baaf34f58096d48d398a31c1c5c48/antispoofing.lbp-1.1.2.zip" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "e3f9fc38f5a6d77665e7fe1d53ed8040", "sha256": "3d268c4747061f87a659dec506440e7030d0b31f388c8aaed72da954bd2d846b" }, "downloads": -1, "filename": "antispoofing.lbp-1.2.0.zip", "has_sig": false, "md5_digest": "e3f9fc38f5a6d77665e7fe1d53ed8040", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42165, "upload_time": "2013-10-04T17:28:47", "url": "https://files.pythonhosted.org/packages/19/1a/041959e600ebbbe314fc79430637935d66bfe2d87f5f5f4f5a87e8b629b3/antispoofing.lbp-1.2.0.zip" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "9fa75c529640a86ff702a6109d843bb0", "sha256": "319a05733227d2160decaab9e3de6df33a74cb511aa3822b0f742266b06f7609" }, "downloads": -1, "filename": "antispoofing.lbp-1.3.0.zip", "has_sig": false, "md5_digest": "9fa75c529640a86ff702a6109d843bb0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 45244, "upload_time": "2014-03-26T12:02:25", "url": "https://files.pythonhosted.org/packages/d7/0b/a5431b992075d2bcb918a3d57ba80ce52e29dc9bb5b4153f457e872f5081/antispoofing.lbp-1.3.0.zip" } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "a2089beb53f6a517be31c37a61799ce8", "sha256": "5eab849519716bee74801f71c192275a04cfa659ba052376b1a8126335db3cde" }, "downloads": -1, "filename": "antispoofing.lbp-2.0.1.zip", "has_sig": false, "md5_digest": "a2089beb53f6a517be31c37a61799ce8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 44184, "upload_time": "2015-02-12T14:46:22", "url": "https://files.pythonhosted.org/packages/ee/b8/caa411aa1a2571ef0957159d6a617a927ab3aa8024afa1e0e227c1b6461f/antispoofing.lbp-2.0.1.zip" } ], "2.0.2": [ { "comment_text": "", "digests": { "md5": "b1615065024e4be312edc0423381c1f5", "sha256": "041dca770dee6caceee5277a828ac59aa9af7b8c4ed35a2e9c2b6209d0b3afdc" }, "downloads": -1, "filename": "antispoofing.lbp-2.0.2.zip", "has_sig": false, "md5_digest": "b1615065024e4be312edc0423381c1f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 44191, "upload_time": "2015-02-12T15:05:54", "url": "https://files.pythonhosted.org/packages/54/0a/30864e73b0fb3c5940dd0230fb8ae0fd0db49581e3163fc80a7d75775424/antispoofing.lbp-2.0.2.zip" } ], "2.0.4": [ { "comment_text": "", "digests": { "md5": "9ff9a4355b3d0f8144c8b27f0920592c", "sha256": "e588dd75edf9c91100cdd00d8a1af85cd31ac98c08f0c82711498afd99341fa2" }, "downloads": -1, "filename": "antispoofing.lbp-2.0.4.zip", "has_sig": false, "md5_digest": "9ff9a4355b3d0f8144c8b27f0920592c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 52869, "upload_time": "2016-01-08T16:59:30", "url": "https://files.pythonhosted.org/packages/5c/31/a73876611fc0020a0ae2c1d2e3deda1a07b553bdd1357908bff23fcc4626/antispoofing.lbp-2.0.4.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9ff9a4355b3d0f8144c8b27f0920592c", "sha256": "e588dd75edf9c91100cdd00d8a1af85cd31ac98c08f0c82711498afd99341fa2" }, "downloads": -1, "filename": "antispoofing.lbp-2.0.4.zip", "has_sig": false, "md5_digest": "9ff9a4355b3d0f8144c8b27f0920592c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 52869, "upload_time": "2016-01-08T16:59:30", "url": "https://files.pythonhosted.org/packages/5c/31/a73876611fc0020a0ae2c1d2e3deda1a07b553bdd1357908bff23fcc4626/antispoofing.lbp-2.0.4.zip" } ] }