diff --git a/conda/meta.yaml b/conda/meta.yaml index d637a2115fcce25cf94a030924ff3d30ce876100..4a3f45095ddc70a70e4a06b3efd3e672fc36cb02 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -25,23 +25,15 @@ requirements: - bob.measure - bob.io.image - bob.db.base - - bob.io.video - - bob.io.audio - bob.sp - bob.ap - bob.ip.base - bob.ip.color - bob.ip.gabor - - bob.learn.activation - - bob.learn.linear - - bob.db.iris - bob.learn.em - - bob.db.mnist - bob.db.atnt - - bob.ip.facedetect - gridtk - bob.pipelines - - bob.learn.tensorflow - bob.bio.base - bob.bio.gmm - bob.bio.face diff --git a/doc/example.rst b/doc/example.rst deleted file mode 100644 index 4cbd3f28a58ac47afd78727ad68ec9d2955d00c2..0000000000000000000000000000000000000000 --- a/doc/example.rst +++ /dev/null @@ -1,160 +0,0 @@ -.. vim: set fileencoding=utf-8 : - -.. _bob.iris_example: - -=============================================== - Tutorial: Analysis of the Fisher Iris Dataset -=============================================== - -In this tutorial, we collect bits and pieces of the previous tutorials and build a -complete example that discriminates Iris species based on Bob. - -The `Iris flower data set <http://en.wikipedia.org/wiki/Iris_flower_data_set>`_ or -Fisher's Iris data set is a multivariate data set introduced by Sir Ronald Aylmer Fisher -(1936) as an example of discriminant analysis. It is sometimes called Anderson's Iris -data set because Edgar Anderson collected the data to quantify the morphologic variation -of Iris flowers of three related species. The dataset consists of 50 samples from each -of three species of Iris flowers (Iris setosa, Iris virginica and Iris versicolor). Four -features were measured from each sample, they are the length and the width of sepal and -petal, in centimeters. Based on the combination of the four features, Fisher developed a -linear discriminant model to distinguish the species from each other. - - -.. note:: - - This example will consider all 3 classes for the LDA training. - This is **not** what Fisher did in his paper [Fisher1936]_ . - In that work Fisher did the *right* thing only for the first 2-class problem (setosa *versus* versicolor). - You can reproduce the 2-class LDA using bob's LDA training system without problems. - When inserting the virginica class, Fisher decides for a different metric (:math:`4vi + ve - 5se`) and solves for the matrices in the last row of Table VIII. - - This is OK, but does not generalize the method proposed in the beginning of his paper. - Results achieved by the generalized LDA method [Duda1973]_ will not match Fisher's result on that last table, be aware. - That being said, the final histogram presented on that paper looks quite similar to the one produced by this script, showing that Fisher's solution was a good approximation for the generalized LDA implementation available in Bob. - -.. [Fisher1936] **R. A. FISHER**, *The Use of Multiple Measurements in Taxonomic Problems*, Annals of Eugenics, pp. 179-188, 1936 -.. [Duda1973] **R.O. Duda and P.E. Hart**, *Pattern Classification and Scene Analysis*, (Q327.D83) John Wiley & Sons. ISBN 0-471-22361-1. 1973 (See page 218). - - -.. testsetup:: iris - - import bob - import numpy - import matplotlib - if not hasattr(matplotlib, 'backends'): - matplotlib.use('pdf') #non-interactive avoids exception on display - - -Training a :py:class:`bob.learn.linear.Machine` with LDA -======================================================== - -Creating a :py:class:`bob.learn.linear.Machine` to perform Linear Discriminant Analysis on the Iris dataset involves using the :py:class:`bob.learn.linear.FisherLDATrainer`: - -.. doctest:: iris - - >>> import bob.db.iris - >>> import bob.learn.linear - >>> trainer = bob.learn.linear.FisherLDATrainer() - >>> data = bob.db.iris.data() - >>> machine, unused_eigen_values = trainer.train(data.values()) - >>> machine.shape - (4, 2) - -That is it! The returned :py:class:`bob.learn.linear.Machine` is now setup to perform LDA on the Iris data set. -A few things should be noted: - -1. The returned :py:class:`bob.learn.linear.Machine` represents the linear projection of the input features to a new 3D space which maximizes the between-class scatter and minimizes the within-class scatter. - In other words, the internal matrix :math:`\mathbf{W}` is 4-by-2. - The projections are calculated internally using `Singular Value Decomposition <http://en.wikipedia.org/wiki/Singular_value_decomposition>`_ (SVD). - The first projection (first row of :math:`\mathbf{W}` corresponds to the highest eigenvalue resulting from the decomposition, the second, the second highest, and so on; - -2. The trainer also returns the eigenvalues generated after the SVD for our LDA implementation, in case you would like to use them. - For this example, we just discard this information. - -Looking at the first LDA component -================================== - -To reproduce Fisher's results, we must pass the data through the created machine: - -.. doctest:: iris - - >>> output = {} - >>> for key in data: - ... output[key] = machine.forward(data[key]) - -At this point the variable ``output`` contains the LDA-projected information as 2D :py:class:`numpy.ndarray` objects. -The only step missing is the visualization of the results. -Fisher proposed the use of a histogram showing the separation achieved by looking at the first only. -Let's reproduce it. - -.. doctest:: iris - - >>> from matplotlib import pyplot - >>> pyplot.hist(output['setosa'][:,0], bins=8, color='green', label='Setosa', alpha=0.5) # doctest: +SKIP - >>> pyplot.hist(output['versicolor'][:,0], bins=8, color='blue', label='Versicolor', alpha=0.5) # doctest: +SKIP - >>> pyplot.hist(output['virginica'][:,0], bins=8, color='red', label='Virginica', alpha=0.5) # doctest: +SKIP - -We can certainly throw in more decoration: - -.. doctest:: iris - - >>> pyplot.legend() # doctest: +SKIP - >>> pyplot.grid(True) # doctest: +SKIP - >>> pyplot.axis([-3,+3,0,20]) # doctest: +SKIP - >>> pyplot.title("Iris Plants / 1st. LDA component") # doctest: +SKIP - >>> pyplot.xlabel("LDA[0]") # doctest: +SKIP - >>> pyplot.ylabel("Count") # doctest: +SKIP - -Finally, to display the plot, do: - -.. code-block:: python - - >>> pyplot.show() - -You should see an image like this: - -.. plot:: plot/iris_lda.py - - -Measuring performance -===================== - -You can measure the performance of the system on classifying, say, *Iris Virginica* as compared to the other two variants. -We can use the functions in :ref:`bob.measure <bob.measure>` for that purpose. -Let's first find a threshold that separates this variant from the others. -We choose to find the threshold at the point where the relative error rate considering both *Versicolor* and *Setosa* variants is the same as for the *Virginica* one. - -.. doctest:: iris - - >>> import bob.measure - >>> negatives = numpy.vstack([output['setosa'], output['versicolor']])[:,0] - >>> positives = output['virginica'][:,0] - >>> threshold= bob.measure.eer_threshold(negatives, positives) - -With the threshold at hand, we can estimate the number of correctly classified *negatives* (or true-rejections) and *positives* (or true-accepts). -Let's translate that: plants from the *Versicolor* and *Setosa* variants that have the first LDA component smaller than the threshold (so called *negatives* at this point) and plants from the *Virginica* variant that have the first LDA component greater than the threshold defined (the *positives*). -To calculate the rates, we just use :ref:`bob.measure <bob.measure>` again: - -.. doctest:: iris - - >>> true_rejects = bob.measure.correctly_classified_negatives(negatives, threshold) - >>> true_accepts = bob.measure.correctly_classified_positives(positives, threshold) - -From that you can calculate, for example, the number of misses at the defined ``threshold``: - -.. doctest:: iris - - >>> sum(true_rejects) - 98 - >>> sum(true_accepts) - 49 - -You can also plot an ROC curve. -Here is the full code that will lead you to the following plot: - -.. plot:: plot/iris_lda_roc.py - :include-source: True - -.. include:: links.rst - - diff --git a/doc/index.rst b/doc/index.rst index a9c372e0bd0a1b2aed56e41a60719c544ff14d1d..54552f7dc3e9a0d8f7e8a01caf2f47288aa08969 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -20,8 +20,6 @@ packages. .. toctree:: :maxdepth: 2 - tutorial - example install help packages @@ -44,27 +42,19 @@ Index of all packages bob.core <bob/bob.core/doc/index.rst> bob.db.atnt <bob/bob.db.atnt/doc/index.rst> bob.db.base <bob/bob.db.base/doc/index.rst> - bob.db.iris <bob/bob.db.iris/doc/index.rst> - bob.db.mnist <bob/bob.db.mnist/doc/index.rst> bob.devtools <bob/bob.devtools/doc/index.rst> bob.extension <bob/bob.extension/doc/index.rst> bob.fusion.base <bob/bob.fusion.base/doc/index.rst> - bob.io.audio <bob/bob.io.audio/doc/index.rst> bob.io.base <bob/bob.io.base/doc/index.rst> bob.io.image <bob/bob.io.image/doc/index.rst> bob.io.stream <bob/bob.io.stream/doc/index.rst> - bob.io.video <bob/bob.io.video/doc/index.rst> bob.ip.base <bob/bob.ip.base/doc/index.rst> bob.ip.binseg <bob/bob.ip.binseg/doc/index.rst> bob.ip.color <bob/bob.ip.color/doc/index.rst> - bob.ip.facedetect <bob/bob.ip.facedetect/doc/index.rst> bob.ip.gabor <bob/bob.ip.gabor/doc/index.rst> bob.ip.qualitymeasure <bob/bob.ip.qualitymeasure/doc/index.rst> bob.ip.stereo <bob/bob.ip.stereo/doc/index.rst> - bob.learn.activation <bob/bob.learn.activation/doc/index.rst> bob.learn.em <bob/bob.learn.em/doc/index.rst> - bob.learn.linear <bob/bob.learn.linear/doc/index.rst> - bob.learn.tensorflow <bob/bob.learn.tensorflow/doc/index.rst> bob.math <bob/bob.math/doc/index.rst> bob.measure <bob/bob.measure/doc/index.rst> bob.pad.base <bob/bob.pad.base/doc/index.rst> diff --git a/doc/install.rst b/doc/install.rst index 09eaacd008264738c1f15a032ac6add44bd1f8d2..fdee951cf16e62df185dd0be45693f5f582db5ce 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -49,7 +49,7 @@ Bob package. Bob does not work on Windows. .. code:: sh $ conda activate bob_env1 - $ mamba install bob.io.video bob.bio.video ... + $ mamba install bob.bio.video ... For a comprehensive list of packages that are either part of |project| or use |project|, please visit :ref:`bob.packages`. diff --git a/doc/packages.rst b/doc/packages.rst index 16f4b7b488c78e493f3ed2f82a806117b6478008..9e9bd8bd19d70da78db7b3fdd582fd10e8c691b9 100644 --- a/doc/packages.rst +++ b/doc/packages.rst @@ -9,8 +9,8 @@ for a comprehensive list of packages that either **use Bob** or **are part of Bo Moreover, you may find the list of Bob packages that we maintain below. -Basic Functionality -------------------- +Basic Functionality (deprecated) +-------------------------------- * :ref:`bob.core` * :ref:`bob.math` @@ -18,22 +18,19 @@ Basic Functionality Data Input and Output --------------------- -* :ref:`bob.io.base` -* :ref:`bob.io.image` -* :ref:`bob.io.video` -* :ref:`bob.io.audio` +* (deprecated) :ref:`bob.io.base` +* (deprecated) :ref:`bob.io.image` * :ref:`bob.io.stream` Signal, Audio, Image and Video Processing ----------------------------------------- -* :ref:`bob.sp` -* :ref:`bob.ap` -* :ref:`bob.ip.base` -* :ref:`bob.ip.color` -* :ref:`bob.ip.gabor` -* :ref:`bob.ip.facedetect` -* :ref:`bob.ip.qualitymeasure` +* (deprecated) :ref:`bob.sp` +* (deprecated) :ref:`bob.ap` +* (deprecated) :ref:`bob.ip.base` +* (deprecated) :ref:`bob.ip.color` +* (deprecated) :ref:`bob.ip.gabor` +* (deprecated) :ref:`bob.ip.qualitymeasure` * :ref:`bob.ip.binseg` * :ref:`bob.ip.stereo` @@ -41,10 +38,7 @@ Machine Learning ---------------- * :ref:`bob.measure` -* :ref:`bob.learn.linear` -* :ref:`bob.learn.activation` * :ref:`bob.learn.em` -* :ref:`bob.learn.tensorflow` * :ref:`bob.pipelines` Modules for Developers @@ -52,7 +46,7 @@ Modules for Developers * :ref:`bob.devtools` * :ref:`bob.extension` -* :ref:`bob.blitz` +* (deprecated) :ref:`bob.blitz` Parallel Execution ------------------ @@ -84,16 +78,14 @@ Database Interfaces Base Database Packages ^^^^^^^^^^^^^^^^^^^^^^ -* :ref:`bob.db.base` +* (deprecated) :ref:`bob.db.base` * :ref:`bob.bio.base` * :ref:`bob.pad.base` Interfaces ^^^^^^^^^^ -* :ref:`bob.db.atnt` -* :ref:`bob.db.iris` -* :ref:`bob.db.mnist` +* (deprecated) :ref:`bob.db.atnt` diff --git a/doc/plot/iris_lda.py b/doc/plot/iris_lda.py deleted file mode 100644 index 9d3d3b152b13150a743d7978c9fb379e8b7c215a..0000000000000000000000000000000000000000 --- a/doc/plot/iris_lda.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python -# Andre Anjos <andre.anjos@idiap.ch> -# Sat 24 Mar 2012 18:51:21 CET - -"""The Iris Flower Recognition using Linear Discriminant Analysis and Bob. -""" - -import bob.db.iris -import bob.learn.linear -import bob.measure -import numpy -from matplotlib import pyplot - -# Training is a 3-step thing -data = bob.db.iris.data() -trainer = bob.learn.linear.FisherLDATrainer() -machine, eigen_values = trainer.train(data.values()) - -# A simple way to forward the data -output = {} -for key in data.keys(): output[key] = machine(data[key]) - -# Here starts the plotting -pyplot.hist(output['setosa'][:,0], bins=8, - color='green', label='Setosa', alpha=0.5) -pyplot.hist(output['versicolor'][:,0], bins=8, - color='blue', label='Versicolor', alpha=0.5) -pyplot.hist(output['virginica'][:,0], bins=8, - color='red', label='Virginica', alpha=0.5) - -# This is just some decoration... -pyplot.legend() -pyplot.grid(True) -pyplot.axis([-3,+3,0,20]) -pyplot.title("Iris Plants / 1st. LDA component") -pyplot.xlabel("LDA[0]") -pyplot.ylabel("Count") diff --git a/doc/plot/iris_lda_roc.py b/doc/plot/iris_lda_roc.py deleted file mode 100644 index 0c0a8aa42f518dfb161d0b80c8b738bd7e9d714d..0000000000000000000000000000000000000000 --- a/doc/plot/iris_lda_roc.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env python -# Andre Anjos <andre.anjos@idiap.ch> -# Sat 24 Mar 2012 18:51:21 CET - -"""Computes an ROC curve for the Iris Flower Recognition using Linear Discriminant Analysis and Bob. -""" - -import bob.db.iris -import bob.learn.linear -import bob.measure -import numpy -import matplotlib.pyplot as plt - -# Training is a 3-step thing -data = bob.db.iris.data() -trainer = bob.learn.linear.FisherLDATrainer() -machine, eigen_values = trainer.train(data.values()) - -# A simple way to forward the data -output = {} -for key, value in data.items(): - output[key] = machine(value) - -# Performance -negatives = numpy.vstack([output["setosa"], output["versicolor"]])[:, 0] -positives = output["virginica"][:, 0] - -# Plot ROC curve -fpr, fnr = bob.measure.roc(negatives, positives, n_points=2000) -plt.plot(100 * fpr, 100 * fnr) -plt.xlabel("False Virginica Acceptance (%)") -plt.ylabel("False Virginica Rejection (%)") -plt.title("ROC Curve for Virginica Classification") -plt.grid() diff --git a/doc/readme_index.rst b/doc/readme_index.rst index 9b8a9cfc311ca6d978b6beeb655d23afe38af0ca..1f7735c03a4dd95f3fdc3a919ccb42737f6a0879 100644 --- a/doc/readme_index.rst +++ b/doc/readme_index.rst @@ -17,28 +17,19 @@ README of all Packages bob.core <bob/bob.core/README.rst> bob.db.atnt <bob/bob.db.atnt/README.rst> bob.db.base <bob/bob.db.base/README.rst> - bob.db.iris <bob/bob.db.iris/README.rst> - bob.db.mnist <bob/bob.db.mnist/README.rst> bob.devtools <bob/bob.devtools/README.rst> bob.extension <bob/bob.extension/README.rst> bob.fusion.base <bob/bob.fusion.base/README.rst> - bob.io.audio <bob/bob.io.audio/README.rst> bob.io.base <bob/bob.io.base/README.rst> bob.io.image <bob/bob.io.image/README.rst> bob.io.stream <bob/bob.io.stream/README.rst> - bob.io.video <bob/bob.io.video/README.rst> bob.ip.base <bob/bob.ip.base/README.rst> bob.ip.binseg <bob/bob.ip.binseg/README.rst> bob.ip.color <bob/bob.ip.color/README.rst> - bob.ip.facedetect <bob/bob.ip.facedetect/README.rst> bob.ip.gabor <bob/bob.ip.gabor/README.rst> bob.ip.qualitymeasure <bob/bob.ip.qualitymeasure/README.rst> bob.ip.stereo <bob/bob.ip.stereo/README.rst> - bob.ip.tensorflow_extractor <bob/bob.ip.tensorflow_extractor/README.rst> - bob.learn.activation <bob/bob.learn.activation/README.rst> bob.learn.em <bob/bob.learn.em/README.rst> - bob.learn.linear <bob/bob.learn.linear/README.rst> - bob.learn.tensorflow <bob/bob.learn.tensorflow/README.rst> bob.math <bob/bob.math/README.rst> bob.measure <bob/bob.measure/README.rst> bob.pad.base <bob/bob.pad.base/README.rst> diff --git a/doc/tutorial.rst b/doc/tutorial.rst deleted file mode 100644 index aa86ba705d53fa475f8f43a8a33022e67ce8ff6d..0000000000000000000000000000000000000000 --- a/doc/tutorial.rst +++ /dev/null @@ -1,258 +0,0 @@ -.. _bob.tutorial: - -******************************** - Getting started with |project| -******************************** - -The following tutorial constitutes a suitable starting point to get to -know how to use |project|'s packages and to learn its fundamental concepts. - -They all rely on the lab-like environment which is `Python`_. Using |project| -within a Python environment is convenient because: - -- you can easily glue together all of the components of an experiment - within a single Python script (which does not require to be - compiled), - -- scripts may easily rely on other Python tools like `SciPy`_ as well - as |project|, and - -- Python bindings are used to transparently run the underlying - efficient C++ compiled code for the key features of the library. - - -Multi-dimensional Arrays -======================== - -The fundamental data structure of |project| is a multi-dimensional array. In -signal processing and machine learning, arrays are a suitable representation -for many different types of digital signals such as images, audio data and -extracted features. Python is the working environment selected for this library -and so when using Python we have relied on the existing `NumPy`_ -multi-dimensional arrays :any:`numpy.ndarray`. This provides with greater -flexibility within the Python environment. - -At the C++ level, the `Blitz++`_ library is used to handle arrays. |project| -provides internal conversion routines to transparently and efficiently convert -NumPy ndarrays to/from Blitz++. As they are done implicitly, the user has no -need to care about this aspect and should just use NumPy ndarrays everywhere -while inside Python code. - -For an introduction and tutorials about NumPy ndarrays, just visit the `NumPy -Reference`_ website. For a short tutorial on the bindings from NumPy ndarrays -to Blitz++, you can read the documentation of our :ref:`bob.blitz` package. - -.. note:: - - Many functions in Bob will return multi-dimensional arrays type - :any:`bob.blitz.array`, which are **wrapped** by as a :any:`numpy.ndarray`. While - you can use these arrays in all contexts inside Bob, NumPy and Scipy, some - functionality of the :any:`numpy.ndarray` are **not available**. In - particular, resizing the arrays with :any:`numpy.ndarray.resize` will raise an - exception. In such cases, please make a **copy** of the array using - :any:`numpy.ndarray.copy`. - -Digital signals as multi-dimensional arrays -=========================================== - -For Bob, we have decided to represent digital signals directly as -:any:`numpy.ndarray` rather than having dedicated classes for each type of -signals. This implies that some convention has been defined. - -Vectors and matrices --------------------- - -A vector is represented as a 1D NumPy array, whereas a matrix is -represented by a 2D array whose first dimension corresponds to the rows, -and second dimension to the columns. - -.. code:: python - - >>> import numpy - >>> A = numpy.array([[1, 2, 3], [4, 5, 6]], dtype='uint8') # A is a matrix 2x3 - >>> print(A) - [[1 2 3] - [4 5 6]] - >>> b = numpy.array([1, 2, 3], dtype='uint8') # b is a vector of length 3 - >>> print(b) - [1 2 3] - -Images ------- - -**Grayscale** images are represented as 2D arrays, the first dimension -being the height (number of rows) and the second dimension being the -width (number of columns). For instance: - -.. code:: python - - >>> img = numpy.ndarray((480,640), dtype='uint8') - -``img`` which is a 2D array can be seen as a gray-scale image of -dimension 640 (width) by 480 (height). In addition, ``img`` can be seen -as a matrix with 480 rows and 640 columns. This is the reason why we -have decided that for images, the first dimension is the height and the -second one the width, such that it matches the matrix convention as -well. - -**Color** images are represented as 3D arrays, the first dimension being -the number of color planes, the second dimension the height and the -third the width. As an image is an array, this is the responsibility of -the user to know in which color space the content is stored. -:ref:`bob.ip.color` provides functions to perform color-space conversion: - -.. code:: python - - >>> import bob.ip.color - >>> colored = numpy.ndarray((3,480,640), dtype='uint8') - >>> gray = bob.ip.color.rgb_to_gray(colored) - >>> print (gray.shape) - [480 640] - -Videos ------- - -A video can be seen as a sequence of images over time. By convention, the first -dimension is for the frame indices (time index), whereas the remaining ones are -related to the corresponding image frame. More information about loading and -handling video sources can be found in :ref:`bob.io.video`. - -Audio signals -------------- - -Audio signals in Bob are represented as 2D arrays: the first dimension being -the number of channels and the second dimension corresponding to the time -index. For instance: - -.. code:: python - - >>> import bob.io.audio - >>> audio = bob.io.audio.reader("test.wav") - >>> audio.rate - 16000.0 - >>> signal = audio.load() - >>> signal.shape - (1, 268197) - -:ref:`bob.io.audio` supports loading a variety of audio files. Please refer to -its documentation for more information. - -.. warning:: - - You can also use ``scipy.io.wavfile`` to load wav files in Python but the - returned data is slightly different compared to ``bob.io.audio``. In Scipy - the first dimension corresponds to the time index rather than the audio - channel. Also in Scipy, the loaded signal maybe an ``int8`` or ``int16`` or - something else depending on the audio but ``bob.io.audio`` always returns - the data as ``float`` arrays. We recommend using ``bob.io.audio`` since it - supports more audio formats and it is more consistent with the rest of Bob - packages. - - -Input and output -================ - -The default way to read and write data from and to files with Bob is -using the binary `HDF5`_ format which has several tools to inspect those -files. Bob's support for HDF5 files is given through the :ref:`bob.io.base` -package. - -On the other hand, loading and writing of different kinds of data is provided -in other :ref:`bob.packages` of Bob using a plug-in strategy. Many image types can be -read using :ref:`bob.io.image`, and many video codecs are supported through -the :ref:`bob.io.video` plug-in. Also, a comprehensive support for -MatLab files is given through the :ref:`bob.io.matlab` interface. - -Additionally, :ref:`bob.io.base` provides two generic functions -:any:`bob.io.base.load` and :any:`bob.io.base.save` to load and save data of -various types, based on the filename extension. For example, to load a -.jpg image, simply call: - -.. code:: python - - >>> import bob.io.base - >>> import bob.io.image #under the hood: loads Bob plug-in for image files - >>> img = bob.io.base.load("myimg.jpg") - -Image processing -================ - -The image processing module is split into several packages, where most -functionality is contained in the :ref:`bob.ip.base` module. For an -introduction in simple affine image transformations such as scaling and -rotating images, as well as for more complex operations like Gaussian or Sobel -filtering, please refer to the :ref:`bob.ip.base`. Also, simple -texture features like LBP's can be extracted using :any:`bob.ip.base.LBP`. - -Gabor wavelet functionality has made it into its own package -:ref:`bob.ip.gabor`. A tutorial on how to perform a Gabor wavelet transform, -extract Gabor jets in grid graphs and compare Gabor jets, please read the -:ref:`bob.ip.gabor`. - -Machine learning -================ - -*Machines* and *Trainers* are one of the core components of Bob. -Machines represent statistical models or other functions defined by -parameters that can be trained or set by using trainers. Two examples of -machines are multi-layer perceptrons (MLPs) and Gaussian mixture models -(GMMs). - -The operation you normally expect from a machine is to be able to feed a -feature vector and extract the machine response or output for that input -vector. It works, in many ways, similarly to signal processing blocks. -Different types of machines will give you a different type of output. -Here, we examine a few of the machines and trainers available in Bob. - -- For a start, you should read the :ref:`bob.learn.linear`, - which is able to perform subspace projections like PCA and LDA. - -- Generating strong classifiers by Boosting Strong Classifiers - weak classifiers is provided by :ref:`bob.learn.boosting`. - -- K-Means clustering and Gaussian Mixture Modeling, as well as Joint - Factor Analysis, Inter-Session Variability and Total Variability - modeling and, finally, Probabilistic Linear Discriminant Analysis is - implemented in :ref:`bob.learn.em`. - -Database interfaces -=================== - -Bob provides an API to easily query and interface with well known databases. A -database contains information about the organization of the files, functions to -query information such as the data which might be used for training a model, -but it usually does **not** contain the data itself (except for some toy -examples). Please visit :ref:`bob.db.base` for an excellent guide on Bob's -datbases. - -Bob includes a (growing) list of supported database interfaces. There are some -small toy databases like :ref:`bob.db.iris` and the :ref:`bob.db.mnist` -database can be used to train and evaluate classification experiments. For the -former, a detailed example on how to use Bob's machine learning techniques to -classify the Iris flowers is given in :doc:`example`. - -However, most of the databases contain face images, speech data or videos that -are used for biometric recognition and presentation attack detection -(anti-spoofing). A complete (and growing) list of database packages can be -found in our :ref:`bob.packages`. - -Several databases that can be used for biometric recognition share a common -interface, which is defined in the :any:`bob.bio.base.database.BioDatabase` -package. Generic functionality that is available in all verification database -packages is defined in the :ref:`bob.bio.base <bob.bio.base>`, while a list of -databases that implement this interface can be found in -:ref:`bob.bio.face <bob.bio.face>`, :ref:`bob.bio.video <bob.bio.video>`, -:ref:`bob.bio.spear <bob.bio.spear>`, or any other biometric package depending -on the modality of the database. - -Performance evaluation -====================== - -Methods in the :ref:`bob.measure` module can be used evaluate error for -multi-class or binary classification problems. Several evaluation -techniques such as Root Mean Squared Error, F-score, Recognition Rates, -False Acceptance and False Rejection Rates, and Equal Error Rates can be -computed, but also functionality for plotting CMC, ROC, DET and EPC -curves are described in more detail in the :ref:`bob.measure`. - -.. include:: links.rst diff --git a/packages.txt b/packages.txt index ddbb1ca8c02819c7324807e82283ae34b28b9a6a..e9c344edebb464351ad56ba3f13cd652fc9d926b 100644 --- a/packages.txt +++ b/packages.txt @@ -7,23 +7,15 @@ bob/bob.math bob/bob.measure bob/bob.io.image bob/bob.db.base -bob/bob.io.video -bob/bob.io.audio bob/bob.sp bob/bob.ap bob/bob.ip.base bob/bob.ip.color bob/bob.ip.gabor -bob/bob.learn.activation -bob/bob.learn.linear -bob/bob.db.iris bob/bob.learn.em -bob/bob.db.mnist bob/bob.db.atnt -bob/bob.ip.facedetect bob/gridtk bob/bob.pipelines -bob/bob.learn.tensorflow bob/bob.bio.base bob/bob.bio.gmm bob/bob.bio.face