Commit 87d9ad32 authored by Anthony Larcher's avatar Anthony Larcher
Browse files

Merge branch 'dev'

# Conflicts:
#	docs/build/doctrees/bosaris/detplot.doctree
#	docs/build/doctrees/environment.pickle
#	docs/build/doctrees/frontend/io.doctree
#	docs/build/doctrees/libsvm/libsvm_core.doctree
#	docs/build/doctrees/sidekit.doctree
#	docs/build/doctrees/sidekit_io.doctree
#	docs/build/doctrees/statserver.doctree
#	docs/build/html/_modules/features_server.html
#	docs/build/html/_modules/frontend/features.html
#	docs/build/html/_modules/frontend/io.html
#	docs/build/html/_modules/frontend/normfeat.html
#	docs/build/html/_modules/sidekit_io.html
#	docs/build/html/_modules/statserver.html
#	docs/build/html/featuresserver.html
#	docs/build/html/frontend/features.html
#	docs/build/html/frontend/io.html
#	docs/build/html/genindex.html
#	docs/build/html/index.html
#	docs/build/html/libsvm.html
#	docs/build/html/libsvm/libsvm_core.html
#	docs/build/html/objects.inv
#	docs/build/html/py-modindex.html
#	docs/build/html/searchindex.js
#	docs/build/html/tutorial/featureExtraction.html
#	docs/build/html/tutorial/shorttuto.html
#	docs/source/conf.py
#	nnet/feed_forward.py
parent 36ac5290
......@@ -192,14 +192,14 @@ def __DETsort__(x, col=''):
ndx = numpy.arange(x.shape[0])
# sort 2nd column ascending
ind = numpy.argsort(x[:, 1])
ind = numpy.argsort(x[:, 1], kind='mergesort')
ndx = ndx[ind]
# reverse to descending order
ndx = ndx[::-1]
# now sort first column ascending
ind = numpy.argsort(x[ndx, 0])
ind = numpy.argsort(x[ndx, 0], kind='mergesort')
ndx = ndx[ind]
sort_scores = x[ndx, :]
......@@ -408,7 +408,7 @@ def rocch(tar_scores, nontar_scores):
#
# It is important here that scores that are the same
# (i.e. already in order) should NOT be swapped.rb
perturb = numpy.argsort(scores)
perturb = numpy.argsort(scores, kind='mergesort')
#
Pideal = Pideal[perturb]
Popt, width, foo = pavx(Pideal)
......
This diff is collapsed.
......@@ -95,7 +95,7 @@ Process the audio to save MFCC on disk
.. code:: python
logging.info("Initialize FeaturesExtractor")
extractor = sidekit.FeaturesExtractor(audio_filename_structure="/lium/corpus/audio/tel/en/RSR2015_v1/sph/male/{}.wav",
extractor = sidekit.FeaturesExtractor(audio_filename_structure=audioDir+"/{}.wav",
feature_filename_structure="./features/{}.h5",
sampling_frequency=16000,
lower_frequency=133.3333,
......@@ -112,7 +112,7 @@ Process the audio to save MFCC on disk
keep_all_features=False)
# Get the complete list of features to extract
show_list = np.unique(np.hstack([ubmList, enroll_idmap.rightids, nap_idmap.rightids, back_idmap.rightids, test_idmap.rightids]))
show_list = np.unique(np.hstack([ubmList, enroll_idmap.rightids, np.unique(test_ndx.segset)]))
channel_list = np.zeros_like(show_list, dtype = int)
logging.info("Extract features and save to disk")
......@@ -160,7 +160,10 @@ the UBM before saving it to disk. Covariance matrices are diagonal in this examp
logging.info('Train the UBM by EM')
# load all features in a list of arrays
ubm = sidekit.Mixture()
llk = ubm.EM_split(features_server, ubmList, distrib_nb, num_thread=nbThread)
llk = ubm.EM_split(features_server,
ubmList,
distrib_nb,
num_thread=nbThread)
ubm.write('gmm/ubm.h5')
Compute the sufficient statistics on the UBM
......@@ -215,7 +218,7 @@ then computed in the StatServer which is then stored to disk:
Train a GMM for each session
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Only adapt the mean supervector and store all of them in the enrol\_sv
Only adapt the mean super-vector and store all of them in the enrol\_sv
StatServer that is then stored in compressed picked format:
.. code:: python
......
......@@ -10,6 +10,7 @@ Enter the SIDEKIT
ubmTraining
tv_estimation
extractIVectors
trainDNN
bnfExtraction
dnnStat
......@@ -640,7 +640,7 @@ class FactorAnalyser:
_r /= total_session_nb
_R /= total_session_nb
_R -= np.outer(_r, _r)
_R -= numpy.outer(_r, _r)[numpy.triu_indices(tv_rank)]
# M-step
_A_tmp = numpy.zeros((tv_rank, tv_rank), dtype=numpy.float32)
......
......@@ -471,7 +471,6 @@ class StatServer:
f[prefix+"stat0"][previous_size:, :] = self.stat0.astype(STAT_TYPE)
f[prefix+"stat1"][previous_size:, :] = self.stat1.astype(STAT_TYPE)
def get_model_stat0(self, mod_id):
"""Return zero-order statistics of a given model
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment