"NotADirectoryError: [Errno 20] Not a directory" when run bob.kaldi.ubm_train

187 views
Skip to first unread message

Nguyễn Cẩn

unread,
Mar 8, 2018, 2:29:31 AM3/8/18
to bob-devel
Hi,

I'm trying to run a experiment with bob.kaldi. Follow http://pythonhosted.org/bob.kaldi/guide.html, when i run:
# Train small diagonall GMM
diag_gmm_file = tempfile.NamedTemporaryFile()
full_gmm_file = tempfile.NamedTemporaryFile()
dubm = bob.kaldi.ubm_train(my_features, diag_gmm_file.name, num_gauss=1024)
The error is:

Traceback (most recent call last):
  File "/home/thangtran/Can/asv/asv_with_GMM_UBM/ivector.py", line 72, in <module>
    dubm = kaldi.ubm_train(features, diag_gmm_file.name, num_gauss=num_gauss)
  File "/home/thangtran/anaconda2/envs/bob_py3/lib/python3.5/site-packages/bob/kaldi/gmm.py", line 87, in ubm_train
    pipe1 = Popen(cmd1, stdin=PIPE, stdout=PIPE, stderr=logfile)
  File "/home/thangtran/anaconda2/envs/bob_py3/lib/python3.5/subprocess.py", line 676, in __init__
    restore_signals, start_new_session)
  File "/home/thangtran/anaconda2/envs/bob_py3/lib/python3.5/subprocess.py", line 1289, in _execute_child
    raise child_exception_type(errno_num, err_msg)
NotADirectoryError: [Errno 20] Not a directory

I try to fix but don't know where is problem come from. Can any help me to solve it?
Thank you very much,
Best

Amir Mohammadi

unread,
Mar 8, 2018, 5:12:27 AM3/8/18
to bob-...@googlegroups.com
Hi Nguyễn,

I see that you started with bob.bio.gmm and bob.learn.em.
My suggestion is that you stick with them. They are much more tested and more stable code.
We have an excellent and efficient implementation of GMMs in bob.learn.em.
I don't think switching to Kaldi will solve your problem.

Best,
Amir

--
-- You received this message because you are subscribed to the Google Groups bob-devel group. To post to this group, send email to bob-...@googlegroups.com. To unsubscribe from this group, send email to bob-devel+...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/bob-devel or directly the project website at http://idiap.github.com/bob/
---
You received this message because you are subscribed to the Google Groups "bob-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bob-devel+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nguyễn Cẩn

unread,
Mar 8, 2018, 5:42:10 AM3/8/18
to bob-devel
Dear Amir,

Thanks for your suggestion.

I just try with bob.kaldi today.
bob.kaldi interests me with multi-core processing and its documents is easy for me to follow.

But, as you said, bob.learn.em is an excellent library. I really want to try with ISV, i-vector + PLDA in its documents. But, it's hard for a fresh man like me to follow which those documents.
Luckily, i found this code example + running every bob.learn.em's code line. I finally sucess to make GMM-UBM experiment.

Do you have any code example for training ISV or i-vector?  I read all source code of those method, but still don't know how to use it for speaker verification system.
Hope to have your help,
Thanks your,

Best,

Amir Mohammadi

unread,
Mar 8, 2018, 6:12:10 AM3/8/18
to bob-...@googlegroups.com
Which part of it you did not follow? You need to ask specific questions since these the documentation of bob.learn.em has been recently
updated with examples.
If you are not familiar with biometrics (speaker verification is biometrics) in general, you can read the documentation of bob.bio.base
https://www.idiap.ch/software/bob/docs/bob/bob.bio.base/stable/struct_bio_rec_sys.html

My suggestion is still the same. Start with the documentation of bob.bio.base
https://www.idiap.ch/software/bob/docs/bob/bob.bio.base/stable/index.html
(our pythonhosted.org documentations are old and you should avoid them)

Create a filelist database interface for your database. This is not that difficult.
can help you to create a file list based database.

Also read the docs of bob.bio.spear:
https://www.idiap.ch/software/bob/docs/bob/bob.bio.spear/stable/index.html

Run your database in an experiment using the verify.py command line.
There are verify_gmm.py, verify_isv.py, and verify_ivector.py commands which do multi-core processing for you.

Best,
Amir

--

Nguyễn Cẩn

unread,
Mar 8, 2018, 9:10:54 PM3/8/18
to bob-devel
Dear Amir,

Thanks for those amazing documents,

I've read some of them before. I'll read it again, more carefully, before asking any more question.
Have a good day,

Best,
Can Nguyen


On Thursday, March 8, 2018 at 2:29:31 PM UTC+7, Nguyễn Cẩn wrote:
Reply all
Reply to author
Forward
0 new messages