@@ -52,13 +52,12 @@ For training the projection matrix, the training images need to be read:
>>> for filename in training_image_files.values():
... training_image = bob.io.load(filename)
Since the images are already aligned to the eye positions, they can simply be linearized (converted into one long vector) and put into an ``bob.io.ArraySet``:
Since the images are already aligned to the eye positions, they can simply be linearized (converted into one long vector) and put into a 2D array
with one sample in each row:
.. code-block:: python
>>> training_set = bob.io.Arrayset()
>>> for image in training_images.values():
... training_set.append(image.flatten())
>>> training_set = numpy.vstack([image.flatten() for image in training_images.values()])
which is used to train a ``bob.machine.LinearMachine``:
...
...
@@ -177,20 +176,21 @@ while the expected verification result is: FAR 22% and FRR 22% at distance thres
The UBM/GMM modeling of DCT Blocks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The last example shows a quite complicated, but very successful algorithm.
The first step is the feature extraction of the training image features and the collection of them in a **bob.io.Arrayset**.
The first step is the feature extraction of the training image features and the collection of them in a 2D array.
In this experiment we will use *Discrete Cosine Transform* (DCT) block features [MM09]_: