Commit 8edbed31 authored by Pavel KORSHUNOV's avatar Pavel KORSHUNOV
Browse files

Fixing issues with sphinx docs

parent b3453693
Pipeline #5069 passed with stages
in 36 minutes and 51 seconds
...@@ -2,4 +2,21 @@ from .GaborJet import GaborJet ...@@ -2,4 +2,21 @@ from .GaborJet import GaborJet
from .Histogram import Histogram from .Histogram import Histogram
# gets sphinx autodoc done right - don't remove it # gets sphinx autodoc done right - don't remove it
def __appropriate__(*args):
"""Says object was actually declared here, and not in the import module.
Fixing sphinx warnings of not being able to find classes, when path is shortened.
Parameters:
*args: An iterable of objects to modify
Resolves `Sphinx referencing issues
<https://github.com/sphinx-doc/sphinx/issues/3048>`
"""
for obj in args: obj.__module__ = __name__
__appropriate__(
GaborJet,
Histogram,
)
__all__ = [_ for _ in dir() if not _.startswith('_')] __all__ = [_ for _ in dir() if not _.startswith('_')]
...@@ -18,4 +18,34 @@ from .cuhk_cufs import CUHK_CUFSBioDatabase ...@@ -18,4 +18,34 @@ from .cuhk_cufs import CUHK_CUFSBioDatabase
from .scface import SCFaceBioDatabase from .scface import SCFaceBioDatabase
# gets sphinx autodoc done right - don't remove it # gets sphinx autodoc done right - don't remove it
def __appropriate__(*args):
"""Says object was actually declared here, and not in the import module.
Fixing sphinx warnings of not being able to find classes, when path is shortened.
Parameters:
*args: An iterable of objects to modify
Resolves `Sphinx referencing issues
<https://github.com/sphinx-doc/sphinx/issues/3048>`
"""
for obj in args: obj.__module__ = __name__
__appropriate__(
FaceBioFile,
MobioBioDatabase,
ReplayBioDatabase,
AtntBioDatabase,
BancaBioDatabase,
GBUBioDatabase,
ARFaceBioDatabase,
CaspealBioDatabase,
LFWBioDatabase,
MultipieBioDatabase,
IJBABioDatabase,
XM2VTSBioDatabase,
FRGCBioDatabase,
CUHK_CUFSBioDatabase,
SCFaceBioDatabase,
)
__all__ = [_ for _ in dir() if not _.startswith('_')] __all__ = [_ for _ in dir() if not _.startswith('_')]
...@@ -204,7 +204,7 @@ class GridGraph (Extractor): ...@@ -204,7 +204,7 @@ class GridGraph (Extractor):
def write_feature(self, feature, feature_file): def write_feature(self, feature, feature_file):
"""Writes the feature extracted by the :py:meth:`__call__` function to the given file. """Writes the feature extracted by the `__call__` function to the given file.
**Parameters:** **Parameters:**
......
...@@ -4,4 +4,23 @@ from .LGBPHS import LGBPHS ...@@ -4,4 +4,23 @@ from .LGBPHS import LGBPHS
from .Eigenface import Eigenface from .Eigenface import Eigenface
# gets sphinx autodoc done right - don't remove it # gets sphinx autodoc done right - don't remove it
def __appropriate__(*args):
"""Says object was actually declared here, and not in the import module.
Fixing sphinx warnings of not being able to find classes, when path is shortened.
Parameters:
*args: An iterable of objects to modify
Resolves `Sphinx referencing issues
<https://github.com/sphinx-doc/sphinx/issues/3048>`
"""
for obj in args: obj.__module__ = __name__
__appropriate__(
DCTBlocks,
GridGraph,
LGBPHS,
Eigenface,
)
__all__ = [_ for _ in dir() if not _.startswith('_')] __all__ = [_ for _ in dir() if not _.startswith('_')]
...@@ -33,7 +33,7 @@ class FaceCrop (Base): ...@@ -33,7 +33,7 @@ class FaceCrop (Base):
Some image databases do not provide eye locations, but rather bounding boxes. Some image databases do not provide eye locations, but rather bounding boxes.
This is not a problem at all. This is not a problem at all.
Simply define the coordinates, where you want your ``cropped_positions`` to be in the cropped image, by specifying the same keys in the dictionary that will be given as ``annotations`` to the :py:meth:`face_crop` function. Simply define the coordinates, where you want your ``cropped_positions`` to be in the cropped image, by specifying the same keys in the dictionary that will be given as ``annotations`` to the :py:meth:`crop_face` function.
.. note;:: .. note;::
These locations can even be outside of the cropped image boundary, i.e., when the crop should be smaller than the annotated bounding boxes. These locations can even be outside of the cropped image boundary, i.e., when the crop should be smaller than the annotated bounding boxes.
...@@ -57,7 +57,7 @@ class FaceCrop (Base): ...@@ -57,7 +57,7 @@ class FaceCrop (Base):
cropped_positions : dict cropped_positions : dict
The coordinates in the cropped image, where the annotated points should be put to. The coordinates in the cropped image, where the annotated points should be put to.
This parameter is a dictionary with usually two elements, e.g., ``{'reye':(RIGHT_EYE_Y, RIGHT_EYE_X) , 'leye':(LEFT_EYE_Y, LEFT_EYE_X)}``. This parameter is a dictionary with usually two elements, e.g., ``{'reye':(RIGHT_EYE_Y, RIGHT_EYE_X) , 'leye':(LEFT_EYE_Y, LEFT_EYE_X)}``.
However, also other parameters, such as ``{'topleft' : ..., 'bottomright' : ...}`` are supported, as long as the ``annotations`` in the :py:meth:`__call__` function are present. However, also other parameters, such as ``{'topleft' : ..., 'bottomright' : ...}`` are supported, as long as the ``annotations`` in the `__call__` function are present.
fixed_positions : dict or None fixed_positions : dict or None
If specified, ignore the annotations from the database and use these fixed positions throughout. If specified, ignore the annotations from the database and use these fixed positions throughout.
......
...@@ -8,4 +8,27 @@ from .HistogramEqualization import HistogramEqualization ...@@ -8,4 +8,27 @@ from .HistogramEqualization import HistogramEqualization
from .SelfQuotientImage import SelfQuotientImage from .SelfQuotientImage import SelfQuotientImage
# gets sphinx autodoc done right - don't remove it # gets sphinx autodoc done right - don't remove it
def __appropriate__(*args):
"""Says object was actually declared here, and not in the import module.
Fixing sphinx warnings of not being able to find classes, when path is shortened.
Parameters:
*args: An iterable of objects to modify
Resolves `Sphinx referencing issues
<https://github.com/sphinx-doc/sphinx/issues/3048>`
"""
for obj in args: obj.__module__ = __name__
__appropriate__(
Base,
FaceCrop,
FaceDetect,
TanTriggs,
INormLBP,
HistogramEqualization,
SelfQuotientImage,
)
__all__ = [_ for _ in dir() if not _.startswith('_')] __all__ = [_ for _ in dir() if not _.startswith('_')]
...@@ -85,12 +85,6 @@ The algorithms present an (incomplete) set of state-of-the-art face recognition ...@@ -85,12 +85,6 @@ The algorithms present an (incomplete) set of state-of-the-art face recognition
- algorithm : :py:class:`bob.bio.face.algorithm.GaborJet` - algorithm : :py:class:`bob.bio.face.algorithm.GaborJet`
* ``lgbphs``: *Local Gabor Binary Pattern Histogram Sequences* (LGBPHS) [ZSG+05]_ are extracted from the images and compares using the histogram intersection measure:
- preprocessor : :py:class:`bob.bio.face.preprocessor.TanTriggs`
- feature : :py:class:`bob.bio.face.extractor.LGBPHS`
- algorithm : :py:class:`bob.bio.face.algorithm.LGBPHS`
* ``plda``: *Probabilistic LDA* (PLDA) [Pri07]_ is a probabilistic generative version of the LDA, in its scalable formulation of [ESM+13]_. * ``plda``: *Probabilistic LDA* (PLDA) [Pri07]_ is a probabilistic generative version of the LDA, in its scalable formulation of [ESM+13]_.
Here, we also apply it on pixel-based representations of the image, though also other features should be possible. Here, we also apply it on pixel-based representations of the image, though also other features should be possible.
......
...@@ -94,7 +94,7 @@ Databases ...@@ -94,7 +94,7 @@ Databases
~~~~~~~~~ ~~~~~~~~~
One important aspect of :ref:`bob.bio.face <bob.bio.face>` is the relatively large list of supported image data sets, including well-defined evaluation protocols. One important aspect of :ref:`bob.bio.face <bob.bio.face>` is the relatively large list of supported image data sets, including well-defined evaluation protocols.
All databases rely on the :py:class:`bob.bio.base.database.DatabaseBob` interface, which in turn uses the `verification_databases <https://gitlab.idiap.ch/bob/bob/wikis/Packages>`_. All databases rely on the :py:class:`bob.bio.base.database.BioDatabase` interface, which in turn uses the `verification_databases <https://gitlab.idiap.ch/bob/bob/wikis/Packages>`_.
Please check the link above for information on how to obtain the original data of those data sets. Please check the link above for information on how to obtain the original data of those data sets.
After downloading and extracting the original data of the data sets, it is necessary that the scripts know, where the data was installed. After downloading and extracting the original data of the data sets, it is necessary that the scripts know, where the data was installed.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment