train i-vector algorithm resource

134 views
Skip to first unread message

ziv rader

unread,
Oct 30, 2016, 3:42:25 AM10/30/16
to bob-devel
Hello,

I am running a Speaker Verification toolchain

I am trying to run  bob.bio.gmm.script.train_ivector.py after having UBM-GMM Projector.hdf5 file generated by train_gmm.py

I am getting the following error indicating that the default algorithm 'ivector' is not suitable:

ImportError: The given command line option 'ivector' is neither a resource for a 'algorithm', nor an existing configuration file, nor could be interpreted as a command (error: name 'ivector' is not defined)

This Error apply to the following lines in verify_ivector.py:

# override some parameters
parsers['config'].add_argument('-a', '--algorithm', metavar = 'x', nargs = '+', default = ['ivector'],
help = 'Face recognition; only GMM-related algorithms are allowed')

Thanks,
Ziv

Tiago Freitas Pereira

unread,
Oct 31, 2016, 3:11:20 AM10/31/16
to bob-...@googlegroups.com
Hi Ziv,

Thanks for the report.
This is a know issue (https://gitlab.idiap.ch/bob/bob.bio.base/issues/53)

I will let you know when fixed.

Cheers

--
-- 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+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Tiago

ziv rader

unread,
Oct 31, 2016, 6:51:03 AM10/31/16
to bob-devel
Thanks.

Can you instruct me on how to run i-vector training/ projection alternatively?

Ziv


On Monday, October 31, 2016 at 9:11:20 AM UTC+2, Tiago Freitas Pereira wrote:
Hi Ziv,

Thanks for the report.
This is a know issue (https://gitlab.idiap.ch/bob/bob.bio.base/issues/53)

I will let you know when fixed.

Cheers
On Sun, Oct 30, 2016 at 8:42 AM, ziv rader <zivr...@gmail.com> wrote:
Hello,

I am running a Speaker Verification toolchain

I am trying to run  bob.bio.gmm.script.train_ivector.py after having UBM-GMM Projector.hdf5 file generated by train_gmm.py

I am getting the following error indicating that the default algorithm 'ivector' is not suitable:

ImportError: The given command line option 'ivector' is neither a resource for a 'algorithm', nor an existing configuration file, nor could be interpreted as a command (error: name 'ivector' is not defined)

This Error apply to the following lines in verify_ivector.py:

# override some parameters
parsers['config'].add_argument('-a', '--algorithm', metavar = 'x', nargs = '+', default = ['ivector'],
help = 'Face recognition; only GMM-related algorithms are allowed')

Thanks,
Ziv

--
-- 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.



--
Tiago

Tiago Freitas Pereira

unread,
Oct 31, 2016, 9:46:30 AM10/31/16
to bob-...@googlegroups.com
Hi Ziv,

Just implemented a patch.
Could you please test it?

The problem was not in bob.bio.gmm, but in bob.bio.base.
Just point to the master branch of this project.

Thanks



--
-- 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+unsubscribe@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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Tiago

ziv rader

unread,
Oct 31, 2016, 12:05:15 PM10/31/16
to bob-devel
Tiago,

I still get the same error with the patched command_line.py.
can you explain the patch?
I am working with command line instead of configuration file but still I think that the error comes from unfamiliar resource which I dont understand how does the patch resolve.

Thanks again,
Ziv

Manuel Günther

unread,
Oct 31, 2016, 12:13:03 PM10/31/16
to bob-devel
Dear Ziv,

can you please give us a chance to reproduce your error by:

1. providing the exact command line that you are using when you obtain the error.
2. providing the complete error back-trace (including all relevant file paths) so that we can see, where and how the error is raised
3. explaining the steps that you took to get the command line patch

@Tiago: please do not expect that everyone knows how to use buildout in order to checkout the master branch from our GitLab page. A little bit more explanation would be helpful, I assume.

Manuel

Tiago Freitas Pereira

unread,
Oct 31, 2016, 12:14:27 PM10/31/16
to bob-...@googlegroups.com
Wait a sec, there is another patch on the way on bob.bio.gmm.

The name of the resource should be `ivector-cosine`, not `ivector`

--
-- 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+unsubscribe@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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Tiago

Tiago Freitas Pereira

unread,
Oct 31, 2016, 12:43:34 PM10/31/16
to bob-...@googlegroups.com
Hi Ziv,

Sorry, could you please update the package `bob.bio.gmm` (https://gitlab.idiap.ch/bob/bob.bio.gmm)?
Just point to the master branch of this python package.
Any question, please let me know.


@Manuel, I do expect. If the person does not know, just ask. No stress.



--
Tiago

ziv rader

unread,
Oct 31, 2016, 12:56:48 PM10/31/16
to bob-devel
Tiago Hi,

thanks for the quick fix. Indeed, I am not that familiar with the GitLab stuff but just to test your fix, I have modified my sources manually...

currently I get a different error which might indicate that the algorithm source is not recognizable:

.../base/tool/command_line.py", line 294, in initialize....
TypeError: can only join an iterable

Thans,
Ziv

Tiago

Tiago Freitas Pereira

unread,
Oct 31, 2016, 4:23:58 PM10/31/16
to bob-...@googlegroups.com
Hey Ziv,

I suggest you to use the source code that I updated.
To test these patches it is better to build bob.bio.spear via zc.buildout. To do so, follow the steps:

2. Download the buildout.cfg script attached and paste it in the same directory as 1.
3. Run `python bootstrap-buildout.py`
4. Run `./bin/buildout`
5. Do your tests

For precise information, please look at this link https://gitlab.idiap.ch/bob/bob/wikis/buildout
Furthermore, I strongly recommend you to intall bob via our conda builds (https://gitlab.idiap.ch/bob/bob/wikis/Installation)


Any issue, please let us know.

Cheers


--
-- 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+unsubscribe@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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Tiago
buildout.cfg

ziv rader

unread,
Nov 1, 2016, 8:25:56 AM11/1/16
to bob-devel
Tiago,

thanks for the instructions and config file.
I believe that the config file is pointing to the wrong GitLab for the spear package:
     bob.bio.spear = git https://gitlab.idiap.ch/bob/bob.bio.face

after changing this line to ...bio.spear, I got the 3 update packages in my src folder.

I noticed that the way a resource for a database  is defined have changed from the original spear package ( for example ...eggs/bob.bio.spear-2.0.5-py2.7.egg/bob/bio/spear/config/database/timit.py)
the new sources are using bob.db.bio_filelist.Database instead of the bob.bio.base.database.DatabaseBob.

subsequently, I get  ImportError: The given command line option 'MyDATASET_NAME' is neither a resource for a 'database', nor an existing configuration file, nor could be interpreted as a command (error: name 'MyDATASET_NAME' is not defined)
MyDATASET_NAME - a folder containing protocol sub folder with train_word.lst under norm subfolder.  


can you instruct me on how to overcome this issue?

Thaks,
Ziv

Pavel Korshunov

unread,
Nov 1, 2016, 10:47:51 AM11/1/16
to bob-...@googlegroups.com
Hi Ziv,

For the 'MyDATASET_NAME', you either change it inside src/bob.bio.spear/bob/bio/spear/config/database/timit.py, or you add the following line in bob_bio_databases.txt:
MyDATASET_NAME=/path/to/the/files/of/this/database


cheers,
-pavel



--
-- 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+unsubscribe@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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Dr. Pavel Korshunov
Biometric group
Idiap Research Institute
Rue Marconi 19
CH - 1920 Martigny
Switzerland

Room: 207

ziv rader

unread,
Nov 1, 2016, 1:37:30 PM11/1/16
to bob-devel
Pavel Hi,

I have copycat the timit protocol to MyDATASET_NAME so I currently have:
  • MyDATASET_NAME.py 
  • MyDATASET_NAME folder with lst files (dev, eval, norm)
  • [YOUR_MyDATASET_NAME_WAV_DIRECTORY] = /path/to/the/files/of/this/database in bob_bio_databases.txt
I have noticed that timit.py was changed after I committed Tiago's patches. it does not have the name and protocol fields and it uses  bob.db.bio_filelist.Database(... instead of bob.bio.base.database.DatabaseBob(database = bob.db.verification.filelist.Database(...   .


Thanks,
Ziv

ziv rader

unread,
Nov 2, 2016, 7:15:37 AM11/2/16
to bob-devel
Tiago,

following your instruction and adding bob.db.bio_filelist to the sources list in buildout.cfg I believe to have all the updated source code.
I now have 2 issues:
  1. running the timit test I get AttributeError: 'Database' object has no attribute 'protocol' . I have noticed the the updated timit.py does not contain name and protocol fields anymore.
  2. trying to run on my own dataset,  I cant figure out how to register a new database resource. I used to create a similar files/folders  to the timit example which enable the registration of my dataset. currently it doesnt work anymore and I get ImportError: The given command line option 'dataset' is neither a resource for a 'database', nor an existing configuration file, nor could be interpreted as a command (error: name 'dataset' is not defined)
Ziv
Reply all
Reply to author
Forward
0 new messages