diff --git a/bob/bio/face/algorithm/__init__.py b/bob/bio/face/algorithm/__init__.py index 6f36b2ed5ba29005db230d148343ea359b0b7511..94897572a64bdcf27e7b71788f730b949b52de89 100644 --- a/bob/bio/face/algorithm/__init__.py +++ b/bob/bio/face/algorithm/__init__.py @@ -2,4 +2,21 @@ from .GaborJet import GaborJet from .Histogram import Histogram # 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('_')] diff --git a/bob/bio/face/database/__init__.py b/bob/bio/face/database/__init__.py index 7b1e187e27ec4e7c6a221098becd98915e9f0fc4..e6a26fe353122530a60f9909d47a78223299276e 100644 --- a/bob/bio/face/database/__init__.py +++ b/bob/bio/face/database/__init__.py @@ -18,4 +18,34 @@ from .cuhk_cufs import CUHK_CUFSBioDatabase from .scface import SCFaceBioDatabase # 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('_')] diff --git a/bob/bio/face/extractor/GridGraph.py b/bob/bio/face/extractor/GridGraph.py index c1b15ae84778b5008921fd363f8e497f1ddcc7a3..387d86bec66b3b5e4f38d09240d50233c7b6508b 100644 --- a/bob/bio/face/extractor/GridGraph.py +++ b/bob/bio/face/extractor/GridGraph.py @@ -204,7 +204,7 @@ class GridGraph (Extractor): 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:** diff --git a/bob/bio/face/extractor/__init__.py b/bob/bio/face/extractor/__init__.py index 0226aadf9a7973cbac85f2b677a6757d823ea799..b1b7826d09d9f3e5d8b24d428cbebebf3aa5562f 100644 --- a/bob/bio/face/extractor/__init__.py +++ b/bob/bio/face/extractor/__init__.py @@ -4,4 +4,23 @@ from .LGBPHS import LGBPHS from .Eigenface import Eigenface # 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('_')] diff --git a/bob/bio/face/preprocessor/FaceCrop.py b/bob/bio/face/preprocessor/FaceCrop.py index 5b928ad45fac9c2a4950b6c2bc437c7d620f5f6a..43c1b518e90febb8a25b1ce8b17059649567f7fa 100644 --- a/bob/bio/face/preprocessor/FaceCrop.py +++ b/bob/bio/face/preprocessor/FaceCrop.py @@ -33,7 +33,7 @@ class FaceCrop (Base): Some image databases do not provide eye locations, but rather bounding boxes. 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;:: 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): cropped_positions : dict 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)}``. - 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 If specified, ignore the annotations from the database and use these fixed positions throughout. diff --git a/bob/bio/face/preprocessor/__init__.py b/bob/bio/face/preprocessor/__init__.py index c2241a8685383fefe83c818f3b365adcd27096b8..e8fc564563032f2d74662414bc13cc4b6ca2b09c 100644 --- a/bob/bio/face/preprocessor/__init__.py +++ b/bob/bio/face/preprocessor/__init__.py @@ -8,4 +8,27 @@ from .HistogramEqualization import HistogramEqualization from .SelfQuotientImage import SelfQuotientImage # 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('_')] diff --git a/doc/baselines.rst b/doc/baselines.rst index a40d06b527fb650b9e46193f44ddd1996501fbb0..b3ede11c98dea289429b87c3dd6eb78fdd7c9bfd 100644 --- a/doc/baselines.rst +++ b/doc/baselines.rst @@ -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` -* ``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]_. Here, we also apply it on pixel-based representations of the image, though also other features should be possible. diff --git a/doc/implementation.rst b/doc/implementation.rst index 88490b215cf04a4e55c8d5e3c368aff8be8b378b..6b81375202aab3f58c047c557f7d64b4df55fbd6 100644 --- a/doc/implementation.rst +++ b/doc/implementation.rst @@ -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. -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. After downloading and extracting the original data of the data sets, it is necessary that the scripts know, where the data was installed. diff --git a/doc/nitpick-exceptions.txt b/doc/nitpick-exceptions.txt new file mode 100644 index 0000000000000000000000000000000000000000..14c3632ef2dc0c19608a93a7af18fdac75d55333 --- /dev/null +++ b/doc/nitpick-exceptions.txt @@ -0,0 +1 @@ +py:exc ValueError