Tools implemented in bob.bio.gmm¶
Summary¶

Algorithm for computing Universal Background Models and Gaussian Mixture Models of the features. 

Tool for computing Unified Background Models and Gaussian Mixture Models of the features 

Tool for computing Unified Background Models and Gaussian Mixture Models of the features and project it via JFA 

Tool for extracting IVectors 
Details¶

class
bob.bio.gmm.algorithm.
GMM
(number_of_gaussians, kmeans_training_iterations=25, gmm_training_iterations=25, training_threshold=0.0005, variance_threshold=0.0005, update_weights=True, update_means=True, update_variances=True, relevance_factor=4, gmm_enroll_iterations=1, responsibility_threshold=0, INIT_SEED=5489, scoring_function=<builtin function linear_scoring>, n_threads=None)¶ Bases:
bob.bio.base.algorithm.Algorithm
Algorithm for computing Universal Background Models and Gaussian Mixture Models of the features. Features must be normalized to zero mean and unit standard deviation.

enroll
(feature_arrays)[source]¶ Enrolls a GMM using MAP adaptation, given a list of 2D numpy.ndarray’s of feature vectors

project
(feature)[source]¶ Computes GMM statistics against a UBM, given an input 2D numpy.ndarray of feature vectors

score
(model, probe)[source]¶ Computes the score for the given model and the given probe using the scoring function from the config file

score_for_multiple_probes
(model, probes)[source]¶ This function computes the score between the given model and several given probe files.


class
bob.bio.gmm.algorithm.
GMMRegular
(**kwargs)¶ Bases:
bob.bio.gmm.algorithm.GMM
Algorithm for computing Universal Background Models and Gaussian Mixture Models of the features

score
(model, probe)[source]¶ Computes the score for the given model and the given probe. The score are LogLikelihood. Therefore, the log of the likelihood ratio is obtained by computing the following difference.


class
bob.bio.gmm.algorithm.
JFA
(subspace_dimension_of_u, subspace_dimension_of_v, jfa_training_iterations=10, jfa_enroll_iterations=1, **kwargs)¶ Bases:
bob.bio.gmm.algorithm.GMM
Tool for computing Unified Background Models and Gaussian Mixture Models of the features and project it via JFA

score_for_multiple_probes
(model, probes)[source]¶ This function computes the score between the given model and several probes.

train_enroller
(train_features, enroller_file)[source]¶ This function can be overwritten to train the model enroller. If you do this, please also register the function by calling this base class constructor and enabling the training by
require_enroller_training = True
.Parameters:
 training_features[object] or [[object]]
A list of extracted features that can be used for training the projector. Features will be split into lists, each of which contains the features of a single (training)client.
 enroller_filestr
The file to write. This file should be readable with the
load_enroller()
function.


class
bob.bio.gmm.algorithm.
ISV
(subspace_dimension_of_u, isv_training_iterations=10, isv_enroll_iterations=1, multiple_probe_scoring=None, **kwargs)¶ Bases:
bob.bio.gmm.algorithm.GMM
Tool for computing Unified Background Models and Gaussian Mixture Models of the features

score_for_multiple_probes
(model, probes)[source]¶ This function computes the score between the given model and several given probe files.

train_projector
(train_features, projector_file)[source]¶ Train Projector and Enroller at the same time

write_feature
(data, feature_file)[source]¶ Saves the given projected feature to a file with the given name. In this base class implementation:
If the given feature has a
save
attribute, it callsfeature.save(bob.io.base.HDF5File(feature_file), 'w')
. In this case, the given feature_file might be either a file name or a bob.io.base.HDF5File.Otherwise, it uses
bob.io.base.save()
to do that.
If you have a different format, please overwrite this function.
Please register ‘performs_projection = True’ in the constructor to enable this function.
Parameters:
 featureobject
A feature as returned by the
project()
function, which should be written. feature_filestr or
bob.io.base.HDF5File
The file open for writing, or the file name to write to.


class
bob.bio.gmm.algorithm.
IVector
(subspace_dimension_of_t, tv_training_iterations=25, update_sigma=True, use_whitening=True, use_lda=False, use_wccn=False, use_plda=False, lda_dim=None, lda_strip_to_rank=True, plda_dim_F=50, plda_dim_G=50, plda_training_iterations=50, **kwargs)¶ Bases:
bob.bio.gmm.algorithm.GMM
Tool for extracting IVectors

read_feature
(feature_file)[source]¶ Read the type of features that we require, namely ivectors (stored as simple numpy arrays)

score_for_multiple_probes
(model, probes)[source]¶ This function computes the score between the given model and several given probe files.
