{ "info": { "author": "Ivana Chingovska", "author_email": "Ivana Chingovska ", "bugtrack_url": null, "classifiers": [], "description": "=========================================================\nJoint operation of verification and anti-spoofing systems\n=========================================================\n\nThis package contains methods for fusion of verification algorithms with anti-spoofing methods at decision and score-level, as well as well as for evaluation of the fused systems under spoofing attacks. In particular, the scripts in this package enable fusion of face verification and anti-spoofing algorithms on the `Replay-Attack `_ face spoofing database. The fusion scripts require score files for both the verification and anti-spoofing algorithm. Hence, at least two score files are needed for each video in Replay-Attack: one for the verification and one for the anti-spoofing scores. Each score file contains the scores for all the frames in the corresponding video of Replay-Attack. If there is no score for a particular frame, the score value needs to be Nan. The format of the score files is .hdf5. The score files should be organized in the same directory structure as the videos in Replay-Attack.\n\nSome of the scripts can receive multiple score files as input, enabling fusion of more then one verification algorithm with more then one anti-spoofing algorithm. \n\nTo summarize, the methods in this package enable the user to:\n - parse score files in 4 column or 5 column format (`format `_ specified in `Bob `_) and extract the necessary information from that to organize the score files for each video into Replay-Attack directory structure.\n - evaluate the threshold of a classification system on the development set\n - apply the threshold on an evaluation or any other set\n - do: AND, SUM, LR and PLR fusion of verification and anti-spoofing system(s)\n - plot performance curves\n - plot score distributions\n - plot scatter plots and decision boundaries\n\nIf you use this package and/or its results, please cite the following\npublications:\n \n1. `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\n2. `Anti-spoofing in action: joint operation with an verification system `_ ::\n \n @INPROCEEDINGS{Chingovska_CVPRWORKSHOPONBIOMETRICS_2013,\n author = {Chingovska, Ivana and Anjos, Andr{\\'{e}} and Marcel, S{\\'{e}}bastien},\n keywords = {biometric recognition, Counter-Measures, Fusion, Spoofing, trustworthy, vulnerability},\n projects = {Idiap, TABULA RASA, BEAT},\n month = jun,\n title = {Anti-spoofing in action: joint operation with a verification system},\n booktitle = {Proceedings of CVPR 2013},\n year = {2013},\n location = {Portland, Oregon},\n }\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.fusion_faceverif\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.fusion_faceverif`` 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.fusion_faceverif`` package, then to go to the console and write::\n\n $ cd antispoofing.fusion_faceverif\n $ python bootstrap-buildout.py\n $ bin/buildout\n\nThis will download all required dependent Bob_ and other packages and install them locally. \n\nRequirements and dependencies\n-----------------------------\n\nAs mentioned before, this satellite package requires verification and anti-spoofing score files. To generate the face verification scores for the results in the paper `Anti-spoofing in action: joint operation with a verification system `_, we used `FaceRecLib `_. To generate the anti-spoofing scores, we used the anti-spoofing algorithm from the following satelite packages: `antispoofing.lbptop `_ for LBP and LBP-TOP counter-measures and `antispoofing.motion `_ for motion-based counter-measure. Both the face verification and anti-spoofing scores were generated on per-frame basis. Of course, you can experiment with different verification and anti-spoofing algorithms, as long as your score files are organized as the directory structure of Replay-Attack.\n\nThis satellite package relies on the following satellite packages: `antispoofing.utils `_ and `antispoofing.fusion `_. \n\nUser guide\n----------\n\nThis section explains the step by step procedure how to generate the results presented in the paper `Anti-spoofing in action: joint operation with a verification system `_. The code is tied to `Replay-Attack `_ database at the moment.\n\nStep 1: Generate score files from the verification and anti-spoofing algorithms\n===============================================================================\n\nThe first step is to train a face verification algorithm and to create models for each user into it. To generate the face verifications scores, you need to create a protocol for matching real-access (LICIT protocol) and spoof (SPOOF protocol) samples to user models that the algorithms has learned. The LICIT protocol is created by exhaustively matching each real access sample to the user model belonging to the sample's user and to all the other models. The SPOOF protocol is created my matching the spoof samples to the user model belonging to the sample's user. In our case, the algorithms work on a frame-by-frame basis. Due to computational limitations, we computed the scores only for every 10th frame of each video. The matching files for the LICIT and SPOOF protocol were then fed into FaceRecLib.\n\nTo generate the anti-spoofing scores, simply pick your favourite face verification algorithm and feed Replay-Attack to it. \n\nThis user guide does not give details on the exact commands how to generate the scores. To learn how to do it, please refer directly to FaceRecLib and the anti-spoofing algorithm of your choice. \n\nStep 2: Convert the score files to the requested directory structure\n====================================================================\n\nAs explained before, the score files need to be organized as the directory structure of Replay-Attack. While the anti-spoofing algorithms we use already give the scores in this format, FaceRecLib outputs score files in 4-column format (`format `_), particularly, separate score files for the real accesses (LICIT protocol) and attacks (SPOOF protocol) videos. So, the first step is to convert them into the required format. For example, to convert the licit scores in the development set, run the following command::\n\n $ ./bin/four_column_to_dir_structure.py score_file out_dir -t licit -s devel replay \n \nThe arguments ``score_file`` and ``out_dir`` refer to the 4-column score file which is input, and the directory for the converted scores, respectively. To see all the options for the script ``four_column_to_dir_structure.py``.\njust type ``--help`` at the command line. If you want to do the conversion for a particular protocol of Replay-Attack (eg. print protocol), state that protocol at the end of the command::\n \n $ ./bin/four_column_to_dir_structure.py score_file out_dir -t licit -s devel replay print\n \nDo not forget to do this step for all the dataset subsets (train, development and test set) and the two protocols (LICIT and SPOOF), using the appropriate input files and script options. Depending on the protocol, the scores will be saved into subdirectories called ``licit`` and ``spoof`` within ``out_dir``.\n \nThe score files in 4-column format generated by the recognition algorithm of FaceRecLib used in our work are supplied in this satellite package for your convenience. They can be found in the directory named ``supplemental_data``.\n\nIf it happens that your face verification or anti-spoofing algorithms output the scores in different format, feel free to implement your own convertor to get the scores into Replay-Attack directory structure.\n\nStep 3: Decision-level fusion\n=============================\n\nAND decision fusion is supported via the script ``and_decision_fusion.py``. AND decision fusion depends on the decision thresholds of the verification and anti-spoofing algorithms separately. Therefore, we first need to compute them::\n\n $ ./bin/antispoof_threshold.py as_score_dir replay\n $ ./bin/faceverif_threshold.py fv_score_dir replay\n \nThe arguments as_score_dir and fv_score_dir refer to the directory with the score files for the anti-spoofing and face verification threshold respectively. The thresholds calculated with these methods are then fed as an input to the ``and_decision_fusion.py`` script::\n\n $ ./bin/and_decision_fusion.py -s fv_score_dir -a as_score_dir --ft fv_thr --at as_thr -v replay\n \nThe script directly prints the error rates. To see all the options for the script ``and_decision_fusion.py``\njust type ``--help`` at the command line.\n\nStep 4: Score-level fusion\n========================== \n\nThree strategies for score-level fusion are available: SUM, LR and PLR. The score-fusion can be performed using the script ``fusion_fvas.py``::\n\n $ ./bin/fusion_fvas.py -s fv_score_dir -a as_score_dir -o outdir\n \nThe script writes the fused scores for each file in the specified output directory in a 4-column format. Having them, you can easily run any script for computing the performance or plotting. Note that you need to run this script separately for the LICIT and the SPOOF protocol for both development and test set at least. This will result in a total of 4 score files. To see all the options for the script ``fusion_fvas.py``, just type ``--help`` at the command line. A very important parameter is ``--sp`` that will save the normalization parameters and the machine of the fusion for further use.\n\nStep 5: Compute performance\n===========================\n\nTo compute the performance using the 4-column format score-files containing the fused scores, you can use the scripts ``eval_threshold.py`` to calculate the threshold on the development set and ``apply_threshold.py`` to compute the performance using the obtained treshold. Do not forget that you have 4 score files (one for development and one for test set for the LICIT and SPOOF protocol), and depending on your needs, you can use any of them for evaluation or application of the threshold.::\n\n $ ./bin/eval_threshold.py -s develset_score_file -c eer\n $ ./bin/apply_threshold.py -s testset_score_file -t thr\n\nUsually, the development set score file of the LICIT protocol is used to evaluate the threshold. That threshold can be used on any of the 4 score files.\n\nTo see all the options for the scripts, just type ``--help`` at the command line.\n\nStep 6: Plot performance curves\n===============================\n\nUsing the script ``plot_on_demand.py``, you can choose to plot many different plots like score distributions or DET curves on the LICIT, SPOOF protocol or both. Just see at the documentation of the script to see what input you need to specify for the desired curve. As mandatory input, you need to give the score files for the LICIT and SPOOF protocol for both the development and test set.::\n\n $ ./bin/plot_on_demand.py devel_licit_scores eval_licit_scores devel_spoof_scores eval_spoof_scores -b eer -i 2\n \nThis will plot the DET curve of the LICIT protocol overlayed with the DET curve of the SPOOF protocol. To see all the options for the script ``plot_on_demand.py``, just type ``--help`` at the command line.\n\nStep 7: Scatter plots\n=====================\n\nScatter plots plot the verification and anti-spoofing scores in the 2D space, together with a decision boundary depending on the algorithms used for their fusion. To plot a scatter plot for LLR fused scores, type::\n\n $ ./bin/scatter_plot.py -s fv_score_dir -a as_score_dir -m machine_file -n norm_file -d thr -f LLR\n \nThe devel threshold (specified with ``-d`` parameter) is a mandatory argument in this script. In the case of AND fusion (option ``-f AND``), two thresholds need to be specified with this argument. Normalization parameter (parameter ``-n norm_file``) needs to be specified for the score fusion algorithms (i.s. option ``-f SUM``, ``-f LLR`` or ``-f LLR_P``), where norm_file is a file containing the normalization parameters. Usually, this is the file saved when the option ``--sp`` is set when running the script ``fvas_fusion.py`` in Step 4. Similarly, the score fusion algorithms require the parameter ``-m machine_file``, where machine_file contains the of the fusion algorithm. It is also saved when the option ``--sp`` is set when running the script ``fvas_fusion.py`` in Step 4.\n \nTo see all the options for the script ``scatter_plot.py``, just type ``--help`` at the command line. \n\nAdditional information\n======================\n\nThe package contains an additional script ``dir_to_four_column.py`` that might be useful in some cases. It converts scores from Replay-Attack directory structure to 4-column file structure.\n\n\nProblems\n--------\n\nIn case of problems, please contact ivana.chingovska@idiap.ch\n", "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/antispoofing.fusion_faceverif", "keywords": null, "license": "LICENSE.txt", "maintainer": null, "maintainer_email": null, "name": "antispoofing.fusion_faceverif", "package_url": "https://pypi.org/project/antispoofing.fusion_faceverif/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/antispoofing.fusion_faceverif/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/bioidiap/antispoofing.fusion_faceverif" }, "release_url": "https://pypi.org/project/antispoofing.fusion_faceverif/3.0.2/", "requires_dist": null, "requires_python": null, "summary": "Decision and score-level fusion tools for joint operation of face verification and anti-spoofing system", "version": "3.0.2" }, "last_serial": 1895276, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "76bb4197d85a7389b958186248ffa4cb", "sha256": "e7a51fe9694e7e234d236329d6516a25f7e1501d4322fe858ca656a0f2da99c8" }, "downloads": -1, "filename": "antispoofing.fusion_faceverif-1.0.tar.gz", "has_sig": false, "md5_digest": "76bb4197d85a7389b958186248ffa4cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19113, "upload_time": "2013-07-16T16:36:57", "url": "https://files.pythonhosted.org/packages/a7/74/d0532dcf960e743c8ba1f481cc82d5d3e3a8633a94deb03b2aab736bb1b1/antispoofing.fusion_faceverif-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "51558c7eedc147c52ce0e0fd1b4b1e57", "sha256": "7269532a512e37ddafcd11aa6d0d30a3cf59b0b5a8973fe92b4fec16b4c90653" }, "downloads": -1, "filename": "antispoofing.fusion_faceverif-1.1.zip", "has_sig": false, "md5_digest": "51558c7eedc147c52ce0e0fd1b4b1e57", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37652, "upload_time": "2014-03-21T14:09:06", "url": "https://files.pythonhosted.org/packages/19/ca/c481760ed354b7ae9260b7c1477013026bcf2b45cff45ac2c1c67c1944c3/antispoofing.fusion_faceverif-1.1.zip" } ], "2.0": [ { "comment_text": "", "digests": { "md5": "6460c9f6382e9b5767a849af2d080636", "sha256": "37437ecd0f27ba205b49547e3850113c7a86afe12e9816361b82125204117a91" }, "downloads": -1, "filename": "antispoofing.fusion_faceverif-2.0.zip", "has_sig": false, "md5_digest": "6460c9f6382e9b5767a849af2d080636", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37781, "upload_time": "2014-04-03T18:14:39", "url": "https://files.pythonhosted.org/packages/72/ff/28efe7e308007d928255487d112154fce5a50a98d588493ff1f40a22fcbb/antispoofing.fusion_faceverif-2.0.zip" } ], "3.0.0": [ { "comment_text": "", "digests": { "md5": "7e9585c1508008920705d176b347b6af", "sha256": "a9a05e6a53d3d627c6e8f730414de976cda0a69d486ed0e3cbefd044fa060fc9" }, "downloads": -1, "filename": "antispoofing.fusion_faceverif-3.0.0.zip", "has_sig": false, "md5_digest": "7e9585c1508008920705d176b347b6af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37714, "upload_time": "2015-02-17T15:46:08", "url": "https://files.pythonhosted.org/packages/40/7c/167a69c79994e2b8ad73847e1220ce3e47c4b1d5c21b26793b6f3a65b48a/antispoofing.fusion_faceverif-3.0.0.zip" } ], "3.0.1": [ { "comment_text": "", "digests": { "md5": "1fddda94649707f64493c7ddc4be5766", "sha256": "50cbd3e81511c29662a90254bc3b26bcfd4931ca1cb89d4a1e1c3dc749900d25" }, "downloads": -1, "filename": "antispoofing.fusion_faceverif-3.0.1.zip", "has_sig": false, "md5_digest": "1fddda94649707f64493c7ddc4be5766", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 43225, "upload_time": "2015-10-28T11:45:26", "url": "https://files.pythonhosted.org/packages/9e/cc/0cad483f0e6883a74e8d4f074a42418b560e200668865c345e0eb4c13628/antispoofing.fusion_faceverif-3.0.1.zip" } ], "3.0.2": [ { "comment_text": "", "digests": { "md5": "2e6b2d66f53186fa2a614c4ab645d3e7", "sha256": "649ae1ffea1105b19c473136346a968af429d203ed39fcfc9dbf87e70fa7ea8b" }, "downloads": -1, "filename": "antispoofing.fusion_faceverif-3.0.2.zip", "has_sig": false, "md5_digest": "2e6b2d66f53186fa2a614c4ab645d3e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40399, "upload_time": "2016-01-08T16:57:41", "url": "https://files.pythonhosted.org/packages/2b/c6/14d3ee818ecbf97298caccb8bab98de56ae5eece0efd9ea8dd7987a79ddb/antispoofing.fusion_faceverif-3.0.2.zip" } ], "3.0.2b0": [ { "comment_text": "", "digests": { "md5": "7a9ed7077d43d7bef85b6f440806c784", "sha256": "356da8943ae676ebfebba0c2e258a7cbcbb9126583526bb2c853e077744e0af2" }, "downloads": -1, "filename": "antispoofing.fusion_faceverif-3.0.2b0.zip", "has_sig": false, "md5_digest": "7a9ed7077d43d7bef85b6f440806c784", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40529, "upload_time": "2015-10-28T13:59:43", "url": "https://files.pythonhosted.org/packages/f8/a1/5adaee3301ec48d4dbbbbb4c14a86b1075ab18638ba0c403327bd3f2fd41/antispoofing.fusion_faceverif-3.0.2b0.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2e6b2d66f53186fa2a614c4ab645d3e7", "sha256": "649ae1ffea1105b19c473136346a968af429d203ed39fcfc9dbf87e70fa7ea8b" }, "downloads": -1, "filename": "antispoofing.fusion_faceverif-3.0.2.zip", "has_sig": false, "md5_digest": "2e6b2d66f53186fa2a614c4ab645d3e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40399, "upload_time": "2016-01-08T16:57:41", "url": "https://files.pythonhosted.org/packages/2b/c6/14d3ee818ecbf97298caccb8bab98de56ae5eece0efd9ea8dd7987a79ddb/antispoofing.fusion_faceverif-3.0.2.zip" } ] }