{ "info": { "author": "Andre Anjos", "author_email": "andre.anjos@idiap.ch", "bugtrack_url": null, "classifiers": [], "description": "=============================================================\n Parts-Based GMM Verification for the Replay Attack Database\n=============================================================\n\nThis `Bob`_ satellite package allows you to run a baseline Parts-Based GMM face\nverification system on the Replay Attack Database. It explains how to setup\nthis package, generate the Universal Background Model (UBM), client models and\nfinally, scores.\n\nIf you use this package and/or its results, please cite the following\npublications:\n\n1. The Replay-Attack Database and baseline GMM results for it::\n\n @inproceedings{Chingovska_BIOSIG_2012,\n author = {I. Chingovska AND A. Anjos AND S. Marcel},\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 booktitle = {IEEE BioSIG 2012},\n year = {2012},\n }\n\n2. Bob as the core framework used for these results::\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\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.verification.gmm\n `_ to download the\n latest stable version of this package.\n\nThere are 2 options you can follow to get this package installed and\noperational on your computer: you can use automatic installers like `pip\n`_ (or `easy_install\n`_) or manually download, unpack and\nuse `zc.buildout `_ to create a\nvirtual 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 antispoofing.verification.gmm\n\nYou can also do the same with ``easy_install``::\n\n $ easy_install antispoofing.verification.gmm\n\nThis will download and install this package plus any other required\ndependencies. It will also verify if the version of Bob you have installed\nis compatible.\n\nThis scheme works well with virtual environments by `virtualenv\n`_ or if you have root access to your\nmachine. Otherwise, we recommend you use the next option.\n\nUsing ``zc.buildout``\n=====================\n\nDownload the latest version of this package from `PyPI\n`_ and unpack it in\nyour working area. The installation of the toolkit itself uses `buildout\n`_. You don't need to understand its inner workings\nto use this package. Here is a recipe to get you started::\n \n $ python bootstrap.py $ ./bin/buildout\n\nThese 2 commands should download and install all non-installed dependencies and\nget 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\n determines the python interpreter that will be used for all scripts developed\n inside this package. Because this package makes use of `Bob`_, `_ reports. They still accept an\nalternate (python) configuration file that can be passed as input. If nothing\nis passed, a default configuration file located at\n``antispoofing/verification/gmm/config/gmm_replay.py`` is used. Copy that file\nto the current directory and edit it to modify the overall configuration for\nthe mixture-model system or for the (DCT-based) feature extraction. Use the\noption ``--config=myconfig.py`` to set your private configuration if you decide\nto do so. Remember to set the option thoroughly through out all script calls or\nunexpected results may happen.\n\nRunning the Experiments\n=======================\n\nFollow the sequence described here to reproduce paper results.\n\nRun ``feature_extract.py`` to extract the DCT block features. This step is\nthe only that requires the original database videos as input. It will generate,\n**per video frame**, all input features required by the scripts that follow\nthis one::\n\n $ ./bin/feature_extract.py /root/of/replay/attack/database results/dct\n\nThis will run through the 1300 videos in the database and extract the features\nat the frame intervals defined at the configuration. In a relatively fast\nmachine, it will take about 10-20 seconds per input video, with a frame-skip\nparameter set to 10 (the default). If you want to be thorough, you will need to\nparallelize this script so that the overall database can be processed in a\nreasonable amount of time.\n\nYou can parallelize the execution of the above script (and of some of the\nscripts below as well) if you are a Idiap. Just do the following instead::\n\n $ ./bin/jman submit --array=1300 ./bin/feature_extract.py /root/of/replay/attack/database results/dct --grid\n\nNotice the ``--array=1300`` and ``--grid`` option by the end of the script. The\nabove instruction tells SGE to run 1300 versions of my script with the same\ninput parameters. The only difference is ``SGE_TASK_ID`` environment variable\nthat is changed at every interation (thanks to the ``--array=1300`` option).\nThe ``--grid`` option the execution of the script analyze first the value of\n``SGE_TASK_ID`` and re-set the internal processing so that particular instance\nof ``feature_extract.py`` only processes one of the 1300 videos that requires\nprocessing. You can check the status of the jobs in the grid with ``jman\nrefresh`` (refer to the `GridTk manual ` for\ndetails).\n\n.. note::\n\n If you are not, you can still take a look at our `GridTk package\n `_ for a logging grid job manager for SGE.\n\nUBM Training\n============\n\nRun ``train_ubm.py`` to create the GMM Universal Background Model from selected\nfeatures (in the enrollment/training subset)::\n \n $ ./bin/train_ubm.py results/dct results/ubm.hdf5\n\n.. note::\n\n Note: if you use ~1k files, it will take a few hours to complete and there is\n currently no way to parallelize this. This step requires all features for\n the training set/enrollment are calculated. The job can take many gigabytes\n of physical memory from your machine, so we advise you to run it in a machine\n with, at least, 8 gigabytes of free memory.\n\nUnfortunately, you cannot easily parallelize this job. Nevertheless, you can\nsubmit it to the grid with the following command and avoid it to run on your\nmachine (nice if you have a busy day of work)::\n\n $ ./bin/jman submit --queue=q_1week --memory=8G ./bin/train_ubm.py results/dct results/ubm.hdf5\n\nEven if you choose a long enough queue, it is still prudent to set the memory\nrequirements for the node you will be assigned to, to guarantee a minimum\namount of memory.\n\nUBM Statistics Generation\n=========================\n\nRun ``generate_statistics.py`` to create the background statistics for all\ndatafiles so we can calculate scores later. This step requires that the UBM is\ntrained and all features are available::\n\n $ ./bin/generate_statistics.py results/dct results/ubm.hdf5 results/stats\n\nThis will take a lot of time to go through all the videos in the replay\ndatabase. You can optionally submit the command to the grid, if you are at\nIdiap, with the following::\n\n $ ./bin/jman submit --array=840 ./bin/generate_statistics.py results/dct results/ubm.hdf5 results/stats --grid\n\nThis command will spread the GMM UBM statistics calculation over 840 processes\nthat will run in about 5-10 minutes each. So, the whole job will take a few\nhours to complete - taking into consideration current settings for SGE at\nIdiap.\n\nClient Model training\n=====================\n\n.. note::\n\n You can do this in parallel with the step above as it only depends on the\n input features pre-calculated at step 3\n\nGenerate the models for all clients::\n\n $ ./bin/enrol.py results/dct results/ubm.hdf5 results/models\n\nIf you think the above job is too slow, you can throw it at the grid as well::\n\n $ ./bin/jman submit --array=35 ./bin/enrol.py results/dct results/ubm.hdf5 results/models --grid\n\nScoring\n=======\n\nIn this step you will score the videos (every N frames up to a certain frame\nnumber) against the generated client models. We do this exhaustively for both\nthe test and development data. Command line execution goes like this::\n\n $ ./bin/score.py results/stats results/ubm.hdf5 results/models results/scores\n\nLinear scoring is fast, but you can also submit a client-based break-down of\nthis problem like this::\n\n $ ./bin/jman submit --array=35 ./bin/score.py results/stats results/ubm.hdf5 results/models results/scores --grid\n\nFull Score Files\n================\n\nAfter scores are calculated, you need to put them together to setup development\nand test text files in a 4 or 5 column format. To do that, use the application\n``build_score_files.py``. The next command will generate the baseline\nverification results by thouroughly matching every client video against every\nmodel available in the individual sets, averaging over (the first) 220 frames::\n\n $ ./bin/build_score_files.py results/scores results/perf --thorough --frames=220\n\nYou can specify to use the attack protocols like this (avoid using the\n`--thourough` option)::\n\n $ ./bin/build_score_files.py results/scores results/perf --protocol=grandtest --frames=220\n\n.. warning::\n\n It is possible you see warnings being emitted by the above programs in\n certain cases. This is **normal**. The warnings correspond to cases in which\n the program is trying to collect data from a certain frame number in which a\n face was not detected on the originating video.\n\nReproduce Paper Results\n=======================\n\nTo reproduce our paper results (~82% of attacks passing the verification\nsystem), you must generate two score files as defined above and then call a few\nprograms that compute the threshold on the development set and apply it to the\nlicit and spoofing test sets::\n\n $ ./bin/eval_threshold.py --scores=results/perf/devel-baseline-thourough-220.4c\n Threshold: 0.686207566\n FAR : 0.000% (0/840)\n FRR : 0.000% (0/60)\n HTER: 0.000%\n\n $ ./bin/apply_threshold.py --scores=results/perf/test-grandtest-220.4c --threshold=0.686207566\n FAR : 82.500% (330/400)\n FRR : 0.000% (0/80)\n HTER: 41.250%\n\n.. some links\n\n.. _bob: http://idiap.github.com/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.verification.gmm", "keywords": null, "license": "GPLv3", "maintainer": null, "maintainer_email": null, "name": "antispoofing.verification.gmm", "package_url": "https://pypi.org/project/antispoofing.verification.gmm/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/antispoofing.verification.gmm/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/antispoofing.verification.gmm" }, "release_url": "https://pypi.org/project/antispoofing.verification.gmm/1.0.2/", "requires_dist": null, "requires_python": null, "summary": "Replay-Attack Face Verification Package Based on a Parts-Based Gaussian Mixture Models", "version": "1.0.2" }, "last_serial": 819146, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "8ee16e5c4ee0293e25d2cac261f300f1", "sha256": "2d227ea043739f49752ccc6f1861c1b4f6c8dcb0bd8ff09fb7a3ac98523a2ff8" }, "downloads": -1, "filename": "antispoofing.verification.gmm-1.0.0.zip", "has_sig": false, "md5_digest": "8ee16e5c4ee0293e25d2cac261f300f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 51803, "upload_time": "2012-08-30T14:32:56", "url": "https://files.pythonhosted.org/packages/4c/61/7b033c89d7136a97286ee3f1657eb051760a059b5a93a6ad1748f9d5f588/antispoofing.verification.gmm-1.0.0.zip" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "f558b1424db36fdafcd2f76bc9478126", "sha256": "407e52567d71d62f916376c9db067233bc69effafb4080767bb2a35b6391b4ae" }, "downloads": -1, "filename": "antispoofing.verification.gmm-1.0.1.zip", "has_sig": false, "md5_digest": "f558b1424db36fdafcd2f76bc9478126", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 51901, "upload_time": "2013-02-19T14:30:34", "url": "https://files.pythonhosted.org/packages/90/d0/4d5de0bdbbc13f1c295f69bea1aa2000aea9aefd6e1407e3e48c920949e6/antispoofing.verification.gmm-1.0.1.zip" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "838967ad3788a7bbed14939ae9073b6a", "sha256": "ef54ba01010dc6887529ef4ab9dc110cbdbc11cf2266963334f812fda27794bc" }, "downloads": -1, "filename": "antispoofing.verification.gmm-1.0.2.zip", "has_sig": false, "md5_digest": "838967ad3788a7bbed14939ae9073b6a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 50366, "upload_time": "2013-07-19T13:46:41", "url": "https://files.pythonhosted.org/packages/b5/ca/ccdeea51b1196052aed277fbc7c80a016f79c4412d27636144da947bf3a9/antispoofing.verification.gmm-1.0.2.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "838967ad3788a7bbed14939ae9073b6a", "sha256": "ef54ba01010dc6887529ef4ab9dc110cbdbc11cf2266963334f812fda27794bc" }, "downloads": -1, "filename": "antispoofing.verification.gmm-1.0.2.zip", "has_sig": false, "md5_digest": "838967ad3788a7bbed14939ae9073b6a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 50366, "upload_time": "2013-07-19T13:46:41", "url": "https://files.pythonhosted.org/packages/b5/ca/ccdeea51b1196052aed277fbc7c80a016f79c4412d27636144da947bf3a9/antispoofing.verification.gmm-1.0.2.zip" } ] }