Skip to content
Snippets Groups Projects
Commit b17111bc authored by Amir Mohammadi's avatar Amir Mohammadi
Browse files

update docs

parent 8827b945
No related branches found
No related tags found
1 merge request!2First Alpha release
bob.fusion.base.algorithm package
=================================
Submodules
----------
bob.fusion.base.algorithm.Algorithm module
------------------------------------------
.. automodule:: bob.fusion.base.algorithm.Algorithm
:members:
:undoc-members:
:show-inheritance:
bob.fusion.base.algorithm.AlgorithmBob module
---------------------------------------------
.. automodule:: bob.fusion.base.algorithm.AlgorithmBob
:members:
:undoc-members:
:show-inheritance:
bob.fusion.base.algorithm.LLR module
------------------------------------
.. automodule:: bob.fusion.base.algorithm.LLR
:members:
:undoc-members:
:show-inheritance:
bob.fusion.base.algorithm.MLP module
------------------------------------
.. automodule:: bob.fusion.base.algorithm.MLP
:members:
:undoc-members:
:show-inheritance:
bob.fusion.base.algorithm.Weighted_Sum module
---------------------------------------------
.. automodule:: bob.fusion.base.algorithm.Weighted_Sum
:members:
:undoc-members:
:show-inheritance:
bob.fusion.base.algorithm.mlp_train_helper module
-------------------------------------------------
.. automodule:: bob.fusion.base.algorithm.mlp_train_helper
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: bob.fusion.base.algorithm
:members:
:undoc-members:
:show-inheritance:
bob.fusion.base.config.algorithm package
========================================
Submodules
----------
bob.fusion.base.config.algorithm.llr module
-------------------------------------------
.. automodule:: bob.fusion.base.config.algorithm.llr
:members:
:undoc-members:
:show-inheritance:
bob.fusion.base.config.algorithm.llr_skl module
-----------------------------------------------
.. automodule:: bob.fusion.base.config.algorithm.llr_skl
:members:
:undoc-members:
:show-inheritance:
bob.fusion.base.config.algorithm.mean module
--------------------------------------------
.. automodule:: bob.fusion.base.config.algorithm.mean
:members:
:undoc-members:
:show-inheritance:
bob.fusion.base.config.algorithm.mlp module
-------------------------------------------
.. automodule:: bob.fusion.base.config.algorithm.mlp
:members:
:undoc-members:
:show-inheritance:
bob.fusion.base.config.algorithm.plr_2 module
---------------------------------------------
.. automodule:: bob.fusion.base.config.algorithm.plr_2
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: bob.fusion.base.config.algorithm
:members:
:undoc-members:
:show-inheritance:
bob.fusion.base.config package
==============================
Subpackages
-----------
.. toctree::
bob.fusion.base.config.algorithm
Module contents
---------------
.. automodule:: bob.fusion.base.config
:members:
:undoc-members:
:show-inheritance:
bob.fusion.base package
=======================
Subpackages
-----------
.. toctree::
bob.fusion.base.algorithm
bob.fusion.base.config
bob.fusion.base.script
bob.fusion.base.tools
Module contents
---------------
.. automodule:: bob.fusion.base
:members:
:undoc-members:
:show-inheritance:
bob.fusion.base.script package
==============================
Submodules
----------
bob.fusion.base.script.bob_fuse module
--------------------------------------
.. automodule:: bob.fusion.base.script.bob_fuse
:members:
:undoc-members:
:show-inheritance:
bob.fusion.base.script.plot_fusion_decision_boundary module
-----------------------------------------------------------
.. automodule:: bob.fusion.base.script.plot_fusion_decision_boundary
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: bob.fusion.base.script
:members:
:undoc-members:
:show-inheritance:
bob.fusion.base.tools package
=============================
Submodules
----------
bob.fusion.base.tools.command_line module
-----------------------------------------
.. automodule:: bob.fusion.base.tools.command_line
:members:
:undoc-members:
:show-inheritance:
bob.fusion.base.tools.plotting module
-------------------------------------
.. automodule:: bob.fusion.base.tools.plotting
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: bob.fusion.base.tools
:members:
:undoc-members:
:show-inheritance:
bob.fusion package
==================
Subpackages
-----------
.. toctree::
bob.fusion.base
Module contents
---------------
.. automodule:: bob.fusion
:members:
:undoc-members:
:show-inheritance:
#!/usr/bin/env python #!/usr/bin/env python
# vim: set fileencoding=utf-8 : # 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 os
import sys import sys
import glob import glob
import pkg_resources 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 ----------------------------------------------------- # -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here. # 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 # Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [ extensions = [
'sphinx.ext.todo', 'sphinx.ext.todo',
'sphinx.ext.coverage', 'sphinx.ext.coverage',
'sphinx.ext.pngmath', 'sphinx.ext.ifconfig',
'sphinx.ext.ifconfig', 'sphinx.ext.autodoc',
'sphinx.ext.autodoc', 'sphinx.ext.autosummary',
'sphinx.ext.autosummary', 'sphinx.ext.doctest',
'sphinx.ext.doctest', 'sphinx.ext.graphviz',
'sphinx.ext.intersphinx', 'sphinx.ext.intersphinx',
] 'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
#'matplotlib.sphinxext.plot_directive'
]
# The viewcode extension appeared only on Sphinx >= 1.0.0
import sphinx import sphinx
if sphinx.__version__ >= "1.0": if sphinx.__version__ >= "1.4.1":
extensions.append('sphinx.ext.viewcode') 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 = []
# 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 # Always includes todos
todo_include_todos = True 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 # If we are on OSX, the 'dvipng' path maybe different
dvipng_osx = '/opt/local/libexec/texlive/binaries/dvipng' dvipng_osx = '/opt/local/libexec/texlive/binaries/dvipng'
if os.path.exists(dvipng_osx): pngmath_dvipng = dvipng_osx if os.path.exists(dvipng_osx): pngmath_dvipng = dvipng_osx
...@@ -58,12 +80,12 @@ source_suffix = '.rst' ...@@ -58,12 +80,12 @@ source_suffix = '.rst'
master_doc = 'index' master_doc = 'index'
# General information about the project. # General information about the project.
project = u'Bobs interface for running score fusion in biometric recognition experiments' project = u'bob.fusion.base'
import time import time
copyright = u'%s, Idiap Research Institute' % time.strftime('%Y') copyright = u'%s, Idiap Research Institute' % time.strftime('%Y')
# Grab the setup entry # Grab the setup entry
distribution = pkg_resources.require('bob.fusion.base')[0] distribution = pkg_resources.require(project)[0]
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the # |version| and |release|, also used in various other places throughout the
...@@ -108,13 +130,18 @@ pygments_style = 'sphinx' ...@@ -108,13 +130,18 @@ pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting. # A list of ignored prefixes for module index sorting.
#modindex_common_prefix = [] #modindex_common_prefix = []
# Some variables which are useful for generated material
project_variable = project.replace('.', '_')
short_description = u'Score fusion in biometric experiments'
owner = [u'Idiap Research Institute']
# -- Options for HTML output --------------------------------------------------- # -- Options for HTML output ---------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for # The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes. # a list of builtin themes.
if sphinx.__version__ >= "1.0": import sphinx_rtd_theme
html_theme = 'nature' html_theme = 'sphinx_rtd_theme'
# Theme options are theme-specific and customize the look and feel of a 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 # further. For a list of options available for each theme, see the
...@@ -122,14 +149,14 @@ if sphinx.__version__ >= "1.0": ...@@ -122,14 +149,14 @@ if sphinx.__version__ >= "1.0":
#html_theme_options = {} #html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory. # 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 # The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation". # "<project> v<release> documentation".
#html_title = None #html_title = None
# A shorter title for the navigation bar. Default is the same as html_title. # 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 # The name of an image file (relative to this directory) to place at the top
# of the sidebar. # of the sidebar.
...@@ -187,105 +214,56 @@ html_favicon = 'img/favicon.ico' ...@@ -187,105 +214,56 @@ html_favicon = 'img/favicon.ico'
#html_file_suffix = None #html_file_suffix = None
# Output file base name for HTML help builder. # Output file base name for HTML help builder.
htmlhelp_basename = 'bob_bio_base_doc' htmlhelp_basename = project_variable + u'_doc'
# -- 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_bio_base.tex', u'Bob',
u'Biometrics Group, Idiap Research Institute', 'manual'),
]
# 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, # -- Post configuration --------------------------------------------------------
# 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
# Included after all input documents # Included after all input documents
rst_epilog = '' rst_epilog = """
.. |project| replace:: Bob
# -- Options for manual page output -------------------------------------------- .. |version| replace:: %s
.. |current-year| date:: %%Y
# One entry per manual page. List of tuples """ % (version,)
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'bob.bio.base', u'Base tools to run biometric recognition experiments', [u'Idiap Research Institute'], 1)
]
# Default processing flags for sphinx # Default processing flags for sphinx
autoclass_content = 'both' autoclass_content = 'class'
autodoc_member_order = 'bysource' autodoc_member_order = 'bysource'
autodoc_default_flags = ['members', 'inherited-members', 'show-inheritance'] autodoc_default_flags = [
'members',
'undoc-members',
'inherited-members',
'show-inheritance',
]
# For inter-documentation mapping: # For inter-documentation mapping:
from bob.extension.utils import link_documentation from bob.extension.utils import link_documentation, load_requirements
intersphinx_mapping = link_documentation(['python', 'numpy', 'bob.bio.face', 'bob.bio.speaker', 'bob.bio.gmm', 'bob.bio.video', 'bob.bio.csu', 'bob.bio.spear', 'gridtk', 'bob.db.youtube']) sphinx_requirements = "extra-intersphinx.txt"
if os.path.exists(sphinx_requirements):
intersphinx_mapping = link_documentation(
def skip(app, what, name, obj, skip, options): additional_packages=['python','numpy'] + \
# Do not skip the __call__ and the __str__ functions as we have special implementations for them. load_requirements(sphinx_requirements)
if name in ("__str__", "__call__"): )
return False else:
return skip intersphinx_mapping = link_documentation()
# getting dictionaries printed nicely.
# see: http://stackoverflow.com/questions/7250659/python-code-to-generate-part-of-sphinx-documentation-is-it-possible/18143318#18143318 # We want to remove all private (i.e. _. or __.__) members
try: # that are not in the list of accepted functions
from StringIO import StringIO accepted_private_functions = ['__array__']
except ImportError:
from io import StringIO def member_function_test(app, what, name, obj, skip, options):
# test if we have a private function
from sphinx.util.compat import Directive if len(name) > 1 and name[0] == '_':
from docutils import nodes, statemachine # test if this private function should be allowed
if name not in accepted_private_functions:
class ExecDirective(Directive): # omit privat functions that are not in the list of accepted private functions
"""Execute the specified python code and insert the output into the document""" return skip
has_content = True else:
# test if the method is documented
def run(self): if not hasattr(obj, '__doc__') or not obj.__doc__:
oldStdout, sys.stdout = sys.stdout, StringIO() return skip
return False
tab_width = self.options.get('tab-width', self.state.document.settings.tab_width)
source = self.state_machine.input_lines.source(self.lineno - self.state_machine.input_offset - 1)
try:
exec('\n'.join(self.content))
text = sys.stdout.getvalue()
lines = statemachine.string2lines(text, tab_width, convert_whitespace=True)
self.state_machine.insert_input(lines, source)
return []
except Exception:
return [nodes.error(None, nodes.paragraph(text = "Unable to execute python code at %s:%d:" % (os.path.basename(source), self.lineno)), nodes.paragraph(text = str(sys.exc_info()[1])))]
finally:
sys.stdout = oldStdout
def setup(app): def setup(app):
app.connect("autodoc-skip-member", skip) app.connect('autodoc-skip-member', member_function_test)
app.add_directive('exec', ExecDirective)
...@@ -20,6 +20,6 @@ Using ``sklearn`` classifiers and pre-processors you can implement different fus ...@@ -20,6 +20,6 @@ Using ``sklearn`` classifiers and pre-processors you can implement different fus
There are two scripts available in the package as of now and they work for verification scenarios. There are two scripts available in the package as of now and they work for verification scenarios.
Spoofing and Anti-spoofing scenarios are not considered yet **in the scripts** however the Python API allows for easy extension. Spoofing and Anti-spoofing scenarios are not considered yet **in the scripts** however the Python API allows for easy extension.
Also take a look at the scripts ``bob_fuse.py`` and ``plot_fusion_decision_boundary.py`` and use them for your actual fusion experiments. Also take a look at the scripts ``bob_fuse.py`` and ``bob_fusion_decision_boundary.py`` and use them for your actual fusion experiments.
.. include:: links.rst .. include:: links.rst
doc/img/logo.png

11 KiB | W: | H:

doc/img/logo.png

6.12 KiB | W: | H:

doc/img/logo.png
doc/img/logo.png
doc/img/logo.png
doc/img/logo.png
  • 2-up
  • Swipe
  • Onion skin
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment