Commit 41ecab5a authored by Pavel KORSHUNOV's avatar Pavel KORSHUNOV

Merge branch 'updates' into 'master'

update to the new bob version

See merge request !1
parents d8f22e81 3d73b5f2
Pipeline #9282 passed with stages
in 10 minutes and 49 seconds
# This build file heavily uses template features from YAML so it is generic
# enough for any Bob project. Don't modify it unless you know what you're
# doing.
# Definition of our build pipeline
stages:
- build
- test
- docs
- wheels
- deploy
# ---------
# Templates
# ---------
# Template for the build stage
# Needs to run on all supported architectures, platforms and python versions
.build_template: &build_job
stage: build
before_script:
- git clean -ffdx
- mkdir _ci
- curl --silent "https://gitlab.idiap.ch/bob/bob.admin/raw/master/gitlab/install.sh" > _ci/install.sh
- chmod 755 _ci/install.sh
- ./_ci/install.sh _ci #updates
- ./_ci/before_build.sh
script:
- ./_ci/build.sh
after_script:
- ./_ci/after_build.sh
artifacts:
expire_in: 1 week
paths:
- _ci/
- dist/
- sphinx/
# Template for the test stage - re-installs from uploaded wheels
# Needs to run on all supported architectures, platforms and python versions
.test_template: &test_job
stage: test
before_script:
- ./_ci/install.sh _ci #updates
- ./_ci/before_test.sh
script:
- ./_ci/test.sh
after_script:
- ./_ci/after_test.sh
# Template for the wheel uploading stage
# Needs to run against one supported architecture, platform and python version
.wheels_template: &wheels_job
stage: wheels
environment: intranet
only:
- master
- /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags)
before_script:
- ./_ci/install.sh _ci #updates
- ./_ci/before_wheels.sh
script:
- ./_ci/wheels.sh
after_script:
- ./_ci/after_wheels.sh
# Template for (latest) documentation upload stage
# Only one real job needs to do this
.docs_template: &docs_job
stage: docs
environment: intranet
only:
- master
before_script:
- ./_ci/install.sh _ci #updates
- ./_ci/before_docs.sh
script:
- ./_ci/docs.sh
after_script:
- ./_ci/after_docs.sh
# Template for the deployment stage - re-installs from uploaded wheels
# Needs to run on a single architecture only
# Will deploy your package to PyPI and other required services
# Only runs for tags
.deploy_template: &deploy_job
stage: deploy
environment: internet
only:
- /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags)
except:
- branches
before_script:
- ./_ci/install.sh _ci #updates
- ./_ci/before_deploy.sh
script:
- ./_ci/deploy.sh
after_script:
- ./_ci/after_deploy.sh
# -------------
# Build Targets
# -------------
# Linux + Python 2.7: Builds, tests, uploads wheel and deploys (if needed)
build_linux_27:
<<: *build_job
variables: &linux_27_build_variables
PYTHON_VERSION: "2.7"
WHEEL_TAG: "py27"
tags:
- conda-linux
test_linux_27:
<<: *test_job
variables: *linux_27_build_variables
dependencies:
- build_linux_27
tags:
- conda-linux
wheels_linux_27:
<<: *wheels_job
variables: *linux_27_build_variables
dependencies:
- build_linux_27
tags:
- conda-linux
deploy_linux_27:
<<: *deploy_job
variables: *linux_27_build_variables
dependencies:
- build_linux_27
tags:
- conda-linux
# Linux + Python 3.4: Builds and tests
build_linux_34:
<<: *build_job
variables: &linux_34_build_variables
PYTHON_VERSION: "3.4"
WHEEL_TAG: "py3"
tags:
- conda-linux
test_linux_34:
<<: *test_job
variables: *linux_34_build_variables
dependencies:
- build_linux_34
tags:
- conda-linux
# Linux + Python 3.5: Builds, tests and uploads wheel
build_linux_35:
<<: *build_job
variables: &linux_35_build_variables
PYTHON_VERSION: "3.5"
WHEEL_TAG: "py3"
tags:
- conda-linux
test_linux_35:
<<: *test_job
variables: *linux_35_build_variables
dependencies:
- build_linux_35
tags:
- conda-linux
wheels_linux_35:
<<: *wheels_job
variables: *linux_35_build_variables
dependencies:
- build_linux_35
tags:
- conda-linux
docs_linux_35:
<<: *docs_job
variables: *linux_35_build_variables
dependencies:
- build_linux_35
tags:
- conda-linux
# Mac OSX + Python 2.7: Builds and tests
build_macosx_27:
<<: *build_job
variables: &macosx_27_build_variables
PYTHON_VERSION: "2.7"
WHEEL_TAG: "py27"
tags:
- conda-macosx
test_macosx_27:
<<: *test_job
variables: *macosx_27_build_variables
dependencies:
- build_macosx_27
tags:
- conda-macosx
# Mac OSX + Python 3.4: Builds and tests
build_macosx_34:
<<: *build_job
variables: &macosx_34_build_variables
PYTHON_VERSION: "3.4"
WHEEL_TAG: "py3"
tags:
- conda-macosx
test_macosx_34:
<<: *test_job
variables: *macosx_34_build_variables
dependencies:
- build_macosx_34
tags:
- conda-macosx
# Mac OSX + Python 3.5: Builds and tests
build_macosx_35:
<<: *build_job
variables: &macosx_35_build_variables
PYTHON_VERSION: "3.5"
WHEEL_TAG: "py3"
tags:
- conda-macosx
test_macosx_35:
<<: *test_job
variables: *macosx_35_build_variables
dependencies:
- build_macosx_35
tags:
- conda-macosx
include README.rst bootstrap-buildout.py buildout.cfg COPYING version.txt requirements.txt
include README.rst bootstrap-buildout.py buildout.cfg COPYING version.txt requirements.txt *.sh
recursive-include doc *.py *.rst
recursive-include bob/bio/base/test/data *-dev*
.. vim: set fileencoding=utf-8 :
.. Pavel Korshunov <pavel.korshunov@idiap.ch>
.. Thu 23 Jun 13:43:22 2016
===================================================================
Cross-database evaluation of audio-based spoofing detection systems
===================================================================
.. image:: http://img.shields.io/badge/docs-stable-yellow.svg
:target: http://pythonhosted.org/bob.paper.interspeech_2016/index.html
.. image:: http://img.shields.io/badge/docs-latest-orange.svg
:target: https://www.idiap.ch/software/bob/docs/latest/bioidiap/bob.paper.interspeech_2016/master/index.html
.. image:: https://gitlab.idiap.ch/bob/bob.paper.interspeech_2016/badges/master/build.svg
:target: https://gitlab.idiap.ch/bob/bob.paper.interspeech_2016/commits/master
.. image:: https://img.shields.io/badge/gitlab-project-0000c0.svg
:target: https://gitlab.idiap.ch/bob/bob.paper.interspeech_2016
.. image:: http://img.shields.io/pypi/v/bob.paper.interspeech_2016.svg
:target: https://pypi.python.org/pypi/bob.paper.interspeech_2016
.. image:: http://img.shields.io/pypi/dm/bob.paper.interspeech_2016.svg
:target: https://pypi.python.org/pypi/bob.paper.interspeech_2016
=====================================================================
Cross-database evaluation of audio-based spoofing detection systems
=====================================================================
This package is part of the Bob_ toolkit and it allows to reproduce the experimental results published in the following paper::
......@@ -15,6 +26,7 @@ This package is part of the Bob_ toolkit and it allows to reproduce the experime
year = {2016},
month = sep,
booktitle = {Interspeech},
pages={1705--1709},
address = {San Francisco, CA, USA},
}
......@@ -23,13 +35,24 @@ If you use this package and/or its results, please cite the paper.
Installation
------------
To install this package -- alone or together with other `Packages of Bob <https://github.com/idiap/bob/wiki/Packages>`_ -- please read the `Installation Instructions <https://github.com/idiap/bob/wiki/Installation>`_.
For Bob_ to be able to work properly, some dependent packages are required to be installed.
Please make sure that you have read the `Dependencies <https://github.com/idiap/bob/wiki/Dependencies>`_ for your operating system.
Documentation
-------------
For further documentation on this package, please read the `Documentation <http://pythonhosted.org/bob.paper.interspeech_2016/index.html>`_.
For a list of tutorials on this or the other packages of Bob_, or information on submitting issues, asking questions and starting discussions, please visit its website.
Follow our `installation`_ instructions for installing ``conda`` and core Bob_ packages. Then, using the Python
from the installed conda environment, bootstrap and buildout this package::
$ python bootstrap-buildout.py
$ ./bin/buildout
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
.. _installation: https://www.idiap.ch/software/bob/install
.. _mailing list: https://www.idiap.ch/software/bob/discuss
.. _user guide: http://pythonhosted.org/bob.paper.interspeech_2016
; vim: set fileencoding=utf-8 :
; Pavel Korshunov <Pavel.Korshunov@idiap.ch>
; Thu 23 Jun 13:43:22 2016
; Tue 16 Aug 15:00:20 CEST 2016
[buildout]
parts = scripts
eggs = bob.paper.interspeech_2016
bob.pad.base
bob.sp
bob.ap
bob.spoof.speech
bob.bio.db
bob.db.base
bob.pad.db
gridtk
develop = .
eggs = bob.paper.interspeech_2016
extensions = bob.buildout
mr.developer
auto-checkout = *
develop = src/bob.spoof.speech
src/bob.pad.base
src/bob.ap
src/bob.bio.db
src/bob.db.base
src/bob.pad.db
.
; options for bob.buildout
debug = true
verbose = true
newest = false
[sources]
bob.spoof.speech = git git@gitlab.idiap.ch:pkorshunov/bob.spoof.speech.git
bob.pad.base = git git@gitlab.idiap.ch:biometric/bob.pad.base.git
bob.ap = git git@github.com:pkorshunov/bob.ap.git
bob.bio.db = git git@gitlab.idiap.ch:biometric/bob.bio.db.git
bob.db.base = git branch=refactoring_2016 git@github.com:bioidiap/bob.db.base.git
bob.pad.db = git git@gitlab.idiap.ch:biometric/bob.pad.db.git
verbose = true
[scripts]
recipe = bob.buildout:scripts
......
; vim: set fileencoding=utf-8 :
; Pavel Korshunov <Pavel.Korshunov@idiap.ch>
; Thu 23 Jun 13:43:22 2016
[buildout]
parts = scripts
eggs = bob.paper.interspeech_2016
bob.db.base
bob.pad.base
bob.bio.base
bob.bio.gmm
bob.pad.voice
bob.bio.spear
gridtk
extensions = bob.buildout
mr.developer
auto-checkout = *
develop = src/bob.spoof.speech
src/bob.db.base
src/bob.pad.base
src/bob.bio.base
src/bob.bio.gmm
src/bob.bio.spear
src/bob.pad.voice
.
; options for bob.buildout
debug = true
verbose = true
newest = false
[sources]
bob.db.base = git git@gitlab.idiap.ch:bob/bob.db.base.git
bob.bio.base = git git@gitlab.idiap.ch:bob/bob.bio.base.git
bob.pad.base = git git@gitlab.idiap.ch:bob/bob.pad.base.git
bob.bio.spear = git git@gitlab.idiap.ch:bob/bob.bio.spear.git
bob.bio.gmm = git git@gitlab.idiap.ch:bob/bob.bio.gmm.git
[scripts]
recipe = bob.buildout:scripts
dependent-scripts = true
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Andre Anjos <andre.anjos@idiap.ch>
# Mon 13 Aug 2012 12:38:15 CEST
#
# Copyright (C) 2011-2014 Idiap Research Institute, Martigny, Switzerland
import os
import sys
import glob
import pkg_resources
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
needs_sphinx = '1.3'
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.pngmath',
'sphinx.ext.ifconfig',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
]
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.ifconfig',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.doctest',
'sphinx.ext.graphviz',
'sphinx.ext.intersphinx',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
]
# The viewcode extension appeared only on Sphinx >= 1.0.0
import sphinx
if sphinx.__version__ >= "1.0":
extensions.append('sphinx.ext.viewcode')
if sphinx.__version__ >= "1.4.1":
extensions.append('sphinx.ext.imgmath')
imgmath_image_format = 'svg'
else:
extensions.append('sphinx.ext.pngmath')
# Be picky about warnings
nitpicky = True
# Ignores stuff we can't easily resolve on other project's sphinx manuals
nitpick_ignore = []
keep_warnings = True
# Allows the user to override warnings from a separate file
if os.path.exists('nitpick-exceptions.txt'):
for line in open('nitpick-exceptions.txt'):
if line.strip() == "" or line.startswith("#"):
continue
dtype, target = line.split(None, 1)
target = target.strip()
try: # python 2.x
target = unicode(target)
except NameError:
pass
nitpick_ignore.append((dtype, target))
# Always includes todos
todo_include_todos = True
# Generates auto-summary automatically
autosummary_generate = True
# Create numbers on figures with captions
numfig = True
# If we are on OSX, the 'dvipng' path maybe different
dvipng_osx = '/opt/local/libexec/texlive/binaries/dvipng'
if os.path.exists(dvipng_osx): pngmath_dvipng = dvipng_osx
......@@ -58,18 +80,21 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'Paper for Interspeech 2016'
project = u'bob.paper.interspeech_2016'
import time
copyright = u'%s, Idiap Research Institute' % time.strftime('%Y')
# Grab the setup entry
distribution = pkg_resources.require(project)[0]
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = 1.0
version = distribution.version
# The full version, including alpha/beta/rc tags.
release = 1.0
release = distribution.version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......@@ -83,7 +108,7 @@ release = 1.0
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
#exclude_patterns = ['**/links.rst']
exclude_patterns = ['links.rst']
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
......@@ -105,13 +130,18 @@ pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# Some variables which are useful for generated material
project_variable = project.replace('.', '_')
short_description = u'Paper for Interspeech 2016 based on Bob'
owner = [u'Idiap Research Institute']
# -- Options for HTML output ---------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
if sphinx.__version__ >= "1.0":
html_theme = 'nature'
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
......@@ -119,28 +149,28 @@ if sphinx.__version__ >= "1.0":
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = 'bob'
#html_short_title = project_variable
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
html_logo = ''
html_logo = 'img/logo.png'
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
html_favicon = ''
html_favicon = 'img/favicon.ico'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
#html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
......@@ -184,67 +214,52 @@ html_static_path = ['_static']
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'bobpaperdoc'
# -- Options for LaTeX output --------------------------------------------------
# The paper size ('letter' or 'a4').
latex_paper_size = 'a4'
# The font size ('10pt', '11pt' or '12pt').
latex_font_size = '10pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'bob_interspeech_paper.tex', u'Bob',
u'Biometrics Group, Idiap Research Institute', 'manual'),
]
htmlhelp_basename = project_variable + u'_doc'
# The name of an image file (relative to this directory) to place at the top of
# the title page.
latex_logo = ''
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Additional stuff for the LaTeX preamble.
#latex_preamble = ''
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Post configuration --------------------------------------------------------
# Included after all input documents
rst_epilog = ''
# -- Options for manual page output --------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'bob.paper.interspeech_2016', u'Paper for Interspeech 2016', [u'Idiap Research Institute'], 1)
]
rst_epilog = """
.. |project| replace:: Bob
.. |version| replace:: %s
.. |current-year| date:: %%Y
""" % (version,)
# Default processing flags for sphinx
autoclass_content = 'both'
autoclass_content = 'class'
autodoc_member_order = 'bysource'
autodoc_default_flags = ['members', 'undoc-members', 'inherited-members', 'show-inheritance']
autodoc_default_flags = [
'members',
'undoc-members',
'inherited-members',
'show-inheritance',
]
# For inter-documentation mapping:
#from bob.extension.utils import link_documentation
#intersphinx_mapping = link_documentation(['python', 'numpy', 'bob.io.base', 'bob.db.base', 'bob.pad.base'])
from bob.extension.utils import link_documentation, load_requirements
sphinx_requirements = "extra-intersphinx.txt"
if os.path.exists(sphinx_requirements):
intersphinx_mapping = link_documentation(additional_packages=load_requirements(sphinx_requirements))
else:
intersphinx_mapping = link_documentation()
# We want to remove all private (i.e. _. or __.__) members
# that are not in the list of accepted functions
accepted_private_functions = ['__array__']
def member_function_test(app, what, name, obj, skip, options):
# test if we have a private function
if len(name) > 1 and name[0] == '_':
# test if this private function should be allowed
if name not in accepted_private_functions:
# omit privat functions that are not in the list of accepted private functions
return skip
else:
# test if the method is documented
if not hasattr(obj, '__doc__') or not obj.__doc__:
return skip
return False
def setup(app):
pass
app.connect('autodoc-skip-member', member_function_test)
python
numpy
bob.bio.spear
gridtk
bob.db.base
bob.db.avspoof
bob.bio.base
\ No newline at end of file
......@@ -2,9 +2,9 @@
.. Pavel Korshunov <pavel.korshunov@idiap.ch>
.. Thu 23 Jun 13:43:22 2016
===============================================
Reproducing paper published in Interspeech 2016
===============================================
=================================================
Reproducing paper published in Interspeech 2016
=================================================
This package is part of the Bob_ toolkit, which allows to reproduce the results experiments published in the following paper::
......@@ -14,45 +14,49 @@ This package is part of the Bob_ toolkit, which allows to reproduce the results
year = {2016},
month = sep,
booktitle = {Interspeech},
pages={1705--1709},
address = {San Francisco, CA, USA},
}
This package contains basic scripts to run Presentation Attack Detection (PAD) speech experiments presented in the paper.
It utilizes a more generic ``./bin/spoof.py`` script from Bob's package ``bob.pad.base`` that takes several parameters, including:
It uses ``bob.bio.*`` and ``bob.pad.*`` packages from Bob framework, as well as, Bob's database interfaces for AVspoof_
and ASVspoof_ databases in ``bob.db.avspoof`` and ``bob.db.asvspoof``. All the above packages are assumed to be
installed using ``conda`` environment or built using ``buildout``.
The provided experimental pipeline scripts take several parameters, including:
* A database and its evaluation protocol
* A data preprocessing algorithm
* A feature extraction algorithm
* A PAD algorithm
* A classifier (to train or evaluate)
All these steps of the PAD system are given as configuration files.
To run all the experiments, two databases need to be downloaded: AVspoof_ and ASVspoof_. The paths to folders with the corresponding data need to be updated in the following files inside the ``src/bob.pad.speech/bob/pad/speech/config/database`` directory:
* asvspoof.py
* asvspoof_verify.py
* avspoof.py
* avspoof_verify.py
To run all the experiments, two databases need to be downloaded: AVspoof_ and ASVspoof_.
Once the databases are dowloaded, the corresponding Bob's interfaces need to be updated too. Please run the following commands::
Once the databases are downloaded, please specify the paths to these databases by creating/editing file ``~/
.bob_bio_databases.txt`` and writing there the following two lines: