iv_scoring¶
Copyright 20142019 Anthony Larcher and Sylvain Meignier
iv_scoring
provides methods to compare ivectors

iv_scoring.
PLDA_scoring
(enroll, test, ndx, mu, F, G, Sigma, test_uncertainty=None, Vtrans=None, p_known=0.0, scaling_factor=1.0, full_model=False)[source]¶ Compute the PLDA scores between two sets of vectors. The list of trials to perform is given in an Ndx object. PLDA matrices have to be precomputed. ivectors are supposed to be whitened before.
Implements the approach described in [Lee13] including scoring for partially openset identification
 Parameters
enroll – a StatServer in which stat1 are ivectors
test – a StatServer in which stat1 are ivectors
ndx – an Ndx object defining the list of trials to perform
mu – the mean vector of the PLDA gaussian
F – the betweenclass covariance matrix of the PLDA
G – the withinclass covariance matrix of the PLDA
Sigma – the residual covariance matrix
p_known – probability of having a known speaker for openset identification case (=1 for the verification task and =0 for the closedset case)
scaling_factor – scaling factor to be multiplied by the sufficient statistics
full_model – boolean, set to True when using a complete PLDA model (including within class covariance matrix)
 Returns
a score object

iv_scoring.
PLDA_scoring_uncertainty
(enroll, test, ndx, mu, F, Sigma, p_known=0.0, scaling_factor=1.0, test_uncertainty=None, Vtrans=None, check_missing=True)[source]¶  Parameters
enroll –
test –
ndx –
mu –
F –
Sigma –
p_known –
scaling_factor –
test_uncertainty –
Vtrans –
check_missing –
 Returns

iv_scoring.
cosine_scoring
(enroll, test, ndx, wccn=None, check_missing=True)[source]¶ Compute the cosine similarities between to sets of vectors. The list of trials to perform is given in an Ndx object.
 Parameters
enroll – a StatServer in which stat1 are ivectors
test – a StatServer in which stat1 are ivectors
ndx – an Ndx object defining the list of trials to perform
wccn – numpy.ndarray, if provided, the ivectors are normalized by using a Within Class Covariance Matrix
check_missing – boolean, if True, check that all models and segments exist
 Returns
a score object

iv_scoring.
fast_PLDA_scoring
(enroll, test, ndx, mu, F, Sigma, test_uncertainty=None, Vtrans=None, p_known=0.0, scaling_factor=1.0, check_missing=True)[source]¶ Compute the PLDA scores between to sets of vectors. The list of trials to perform is given in an Ndx object. PLDA matrices have to be precomputed. ivectors are supposed to be whitened before.
 Parameters
enroll – a StatServer in which stat1 are ivectors
test – a StatServer in which stat1 are ivectors
ndx – an Ndx object defining the list of trials to perform
mu – the mean vector of the PLDA gaussian
F – the betweenclass covariance matrix of the PLDA
Sigma – the residual covariance matrix
p_known – probability of having a known speaker for openset identification case (=1 for the verification task and =0 for the closedset case)
check_missing – boolean, if True, check that all models and segments exist
 Returns
a score object

iv_scoring.
full_PLDA_scoring
(enroll, test, ndx, mu, F, G, Sigma, p_known=0.0, scaling_factor=1.0, check_missing=True)[source]¶ Compute PLDA scoring
 Parameters
enroll – a StatServer in which stat1 are ivectors
test – a StatServer in which stat1 are ivectors
ndx – an Ndx object defining the list of trials to perform
mu – the mean vector of the PLDA gaussian
F – the betweenclass covariance matrix of the PLDA
G – the withinclass covariance matrix of the PLDA
Sigma – the residual covariance matrix
p_known – probability of having a known speaker for openset identification case (=1 for the verification task and =0 for the closedset case)
check_missing – boolean, default is True, set to False not to check missing models

iv_scoring.
mahalanobis_scoring
(enroll, test, ndx, m, check_missing=True)[source]¶ Compute the mahalanobis distance between to sets of vectors. The list of trials to perform is given in an Ndx object.
 Parameters
enroll – a StatServer in which stat1 are ivectors
test – a StatServer in which stat1 are ivectors
ndx – an Ndx object defining the list of trials to perform
m – mahalanobis matrix as a ndarray
check_missing – boolean, default is True, set to False not to check missing models
 Returns
a score object

iv_scoring.
two_covariance_scoring
(enroll, test, ndx, W, B, check_missing=True)[source]¶ Compute the 2covariance scores between to sets of vectors. The list of trials to perform is given in an Ndx object. Within and between class covariance matrices have to be precomputed.
 Parameters
enroll – a StatServer in which stat1 are ivectors
test – a StatServer in which stat1 are ivectors
ndx – an Ndx object defining the list of trials to perform
W – the withinclass covariance matrix to consider
B – the betweenclass covariance matrix to consider
check_missing – boolean, default is True, set to False not to check missing models
 Returns
a score object