Commit 01bfb85e authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

Removing garbage [skip ci]

parent f6433257
Pipeline #12367 skipped
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: a7202012a25d5dec0c5b2fe8290b44e2
tags: 645f666f9bcd5a90fca523b33c5a78b7
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>bob.ip.mtcnn &mdash; bob.ip.mtcnn 0.0.1b0 documentation</title>
<link rel="shortcut icon" href="../../../_static/favicon.ico"/>
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<link rel="index" title="Index"
href="../../../genindex.html"/>
<link rel="search" title="Search" href="../../../search.html"/>
<link rel="top" title="bob.ip.mtcnn 0.0.1b0 documentation" href="../../../index.html"/>
<link rel="up" title="Module code" href="../../index.html"/>
<script src="../../../_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="../../../index.html" class="icon icon-home"> bob.ip.mtcnn
<img src="../../../_static/logo.png" class="logo" />
</a>
<div class="version">
0.0.1b0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../py_api.html">Python API for bob.ip.mtcnn</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../references.html">References</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../index.html">bob.ip.mtcnn</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../../index.html">Docs</a> &raquo;</li>
<li><a href="../../index.html">Module code</a> &raquo;</li>
<li>bob.ip.mtcnn</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Source code for bob.ip.mtcnn</h1><div class="highlight"><pre>
<span></span><span class="kn">from</span> <span class="nn">.FaceDetector</span> <span class="k">import</span> <span class="n">FaceDetector</span>
<span class="kn">import</span> <span class="nn">numpy</span>
<div class="viewcode-block" id="get_config"><a class="viewcode-back" href="../../../py_api.html#bob.ip.mtcnn.get_config">[docs]</a><span class="k">def</span> <span class="nf">get_config</span><span class="p">():</span>
<span class="sd">&quot;&quot;&quot;Returns a string containing the configuration information.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="kn">import</span> <span class="nn">bob.extension</span>
<span class="k">return</span> <span class="n">bob</span><span class="o">.</span><span class="n">extension</span><span class="o">.</span><span class="n">get_config</span><span class="p">(</span><span class="vm">__name__</span><span class="p">)</span></div>
<span class="c1"># gets sphinx autodoc done right - don&#39;t remove it</span>
<span class="n">__all__</span> <span class="o">=</span> <span class="p">[</span><span class="n">_</span> <span class="k">for</span> <span class="n">_</span> <span class="ow">in</span> <span class="nb">dir</span><span class="p">()</span> <span class="k">if</span> <span class="ow">not</span> <span class="n">_</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s1">&#39;_&#39;</span><span class="p">)]</span>
</pre></div>
</div>
<div class="articleComments">
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2017, Idiap Research Institute.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../',
VERSION:'0.0.1b0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../_static/underscore.js"></script>
<script type="text/javascript" src="../../../_static/doctools.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Overview: module code &mdash; bob.ip.mtcnn 0.0.1b0 documentation</title>
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="index" title="Index"
href="../genindex.html"/>
<link rel="search" title="Search" href="../search.html"/>
<link rel="top" title="bob.ip.mtcnn 0.0.1b0 documentation" href="../index.html"/>
<script src="../_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="../index.html" class="icon icon-home"> bob.ip.mtcnn
<img src="../_static/logo.png" class="logo" />
</a>
<div class="version">
0.0.1b0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../py_api.html">Python API for bob.ip.mtcnn</a></li>
<li class="toctree-l1"><a class="reference internal" href="../references.html">References</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">bob.ip.mtcnn</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html">Docs</a> &raquo;</li>
<li>Overview: module code</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>All modules for which code is available</h1>
<ul><li><a href="bob/ip/mtcnn.html">bob.ip.mtcnn</a></li>
<ul><li><a href="bob/ip/mtcnn/FaceDetector.html">bob.ip.mtcnn.FaceDetector</a></li>
</ul></ul>
</div>
<div class="articleComments">
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2017, Idiap Research Institute.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../',
VERSION:'0.0.1b0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>
\ No newline at end of file
.. vim: set fileencoding=utf-8 :
.. Tiago de Freitas Pereira <tiago.pereira@idiap.ch>
.. Fri 17 Jul 02:49:53 2016 CEST
.. _bob.ip.mtcnn:
====================================================
Bob interface for mtcnn face and landmark detection
====================================================
This package binds the face and landmark detection from the paper:
@ARTICLE{7553523,
author={K. Zhang and Z. Zhang and Z. Li and Y. Qiao},
journal={IEEE Signal Processing Letters},
title={Joint Face Detection and Alignment Using Multitask Cascaded Convolutional Networks},
year={2016},
volume={23},
number={10},
pages={1499-1503},
keywords={Benchmark testing;Computer architecture;Convolution;Detectors;Face;Face detection;Training;Cascaded convolutional neural network (CNN);face alignment;face detection},
doi={10.1109/LSP.2016.2603342},
ISSN={1070-9908},
month={Oct},}
===========
User guide
===========
Face Detection and Landmark detection
-------------------------------------
The most simple face detection task is to detect a single face in an image. This task can be achieved using a single command:
>>> import bob.ip.mtcnn
>>> import bob.io.base
>>> import bob.io.base.test_utils
>>> color_image = bob.io.base.load(bob.io.base.test_utils.datafile('testimage.jpg', 'bob.ip.facedetect'))
>>> bounding_box, landmarks = bob.ip.mtcnn.FaceDetector().detect_single_face(color_image)
>>> print(bounding_box.topleft)
(68, 70)
.. plot:: plot/plot_single_faces.py
:include-source: False
Multiple Face Detection
-----------------------
The detection of multiple faces can be achieved with a single command:
.. doctest:: mtcnntest
>>> import bob.ip.mtcnn
>>> import bob.io.base
>>> import bob.io.base.test_utils
>>> color_image = bob.io.base.load(bob.io.base.test_utils.datafile('multiple-faces.jpg', 'bob.ip.mtcnn'))
>>> bounding_box, landmarks = bob.ip.mtcnn.FaceDetector().detect_all_faces(color_image)
>>> print ((bounding_box[0].topleft, bounding_box[0].bottomright))
((28, 189), (102, 244))
.. plot:: plot/plot_multiple_faces.py
:include-source: False
Landmark detection
------------------
The detection of landmarks can be done as the following:
.. doctest:: mtcnntest
>>> import bob.ip.mtcnn
>>> import bob.io.base
>>> import bob.io.base.test_utils
>>> color_image = bob.io.base.load(bob.io.base.test_utils.datafile('testimage.jpg', 'bob.ip.facedetect'))
>>> bounding_box, landmarks = bob.ip.mtcnn.FaceDetector().detect_single_face(color_image)
>>> print (landmarks['leye'])
(174, 223)
Face genometric normalization
-----------------------------
The detection of landmarks can be done as the following:
.. doctest:: mtcnntest
>>> import bob.ip.mtcnn
>>> import bob.io.base
>>> import bob.io.base.test_utils
>>> color_image = bob.io.base.load(bob.io.base.test_utils.datafile('testimage.jpg', 'bob.ip.facedetect'))
>>> normimage = bob.ip.mtcnn.FaceDetector().detect_crop_align(color_image, final_image_size=(224, 224))
.. plot:: plot/plot_align_faces.py
:include-source: False
============
Python API
============
.. toctree::
:maxdepth: 2
py_api
references
============================
Python API for bob.ip.mtcnn
============================
.. automodule:: bob.ip.mtcnn
============
References
============
.. todo:: Provide the correct references for the algorithms defined in this package.