Re: [bob-devel] Re: feature is not appropriate in bob.bio.gmm,

86 views
Skip to first unread message

Amir Mohammadi

unread,
Nov 20, 2017, 4:33:15 AM11/20/17
to bob-...@googlegroups.com
Hi,

Try to run:

T.enroll([ceps])

Looking at the code or running the code step by step always helps.

Best,
Amir

On Tue, Nov 14, 2017 at 9:11 AM Angga dwi firmanto <anggadwi...@gmail.com> wrote:
This is the code
T = bob.bio.gmm.algorithm.GMM(number_of_gaussians = 128,
    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)

T.enroll(ceps) #ceps = extracted feature


This is the error :
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/export/home/speakerrec/anaconda3/lib/python3.6/site-packages/bob/bio/gmm/algorithm/GMM.py", line 207, in enroll
    [self._check_feature(feature) for feature in feature_arrays]
  File "/export/home/speakerrec/anaconda3/lib/python3.6/site-packages/bob/bio/gmm/algorithm/GMM.py", line 207, in <listcomp>
    [self._check_feature(feature) for feature in feature_arrays]
  File "/export/home/speakerrec/anaconda3/lib/python3.6/site-packages/bob/bio/gmm/algorithm/GMM.py", line 91, in _check_feature
    raise ValueError("The given feature is not appropriate")
ValueError: The given feature is not appropriate


when I try to check the feature, the feature is 2-dimensional and float64 :
>>> ceps.ndim
2
>>> ceps.ndim
2
>>> ceps.dtype
dtype('float64')
>>> isinstance(ceps, numpy.ndarray)
True

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

Angga dwi firmanto

unread,
Nov 22, 2017, 11:37:49 PM11/22/17
to bob-devel
Dear Amir,
 
I am trying to run :

T.enroll([ceps])

and get this error :

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/export/home/speakerrec/anaconda3/lib/python3.6/site-packages/bob/bio/gmm/algorithm/GMM.py", line 210, in enroll
    return self.enroll_gmm(array)
  File "/export/home/speakerrec/anaconda3/lib/python3.6/site-packages/bob/bio/gmm/algorithm/GMM.py", line 200, in enroll_gmm
    gmm = bob.learn.em.GMMMachine(self.ubm)
TypeError: an integer is required (got type NoneType)

is there another missing step ?


Thanks in advance,

Angga

Amir Mohammadi

unread,
Nov 23, 2017, 2:41:13 AM11/23/17
to bob-...@googlegroups.com

Dear Angga,

I have no idea what you are doing and why you are doing this.
Please refer to the documentation of bob.bio.base to start with.

Thanks,
Amir


Tiago Freitas Pereira

unread,
Nov 23, 2017, 4:16:04 AM11/23/17
to bob-...@googlegroups.com
Dear Angga,

The goal of bob.bio.gmm package is to provide GMM based algorithms to our base biometric recognition engine https://www.idiap.ch/software/bob/docs/bob/bob.bio.base/stable/index.html and its derivatives for face (https://www.idiap.ch/software/bob/docs/bob/bob.bio.face/stable/index.html) and speaker (https://www.idiap.ch/software/bob/docs/bob/bob.bio.spear/stable/index.html) recognition engines.

Maybe the GMM documentation API of the this package is not very clear.
I've prepared an example on how to use this API to:
  - Train UBM
  - Train MAP adapted models
  - Scoring

For more information about the implementation of those algorithms, please check our base package (https://www.idiap.ch/software/bob/docs/bob/bob.learn.em/stable/index.html)

Let us know if it helps

Cheers

Tiago



On Thu, Nov 23, 2017 at 8:41 AM, Amir Mohammadi <183....@gmail.com> wrote:

Dear Angga,

I have no idea what you are doing and why you are doing this.
Please refer to the documentation of bob.bio.base to start with.

Thanks,
Amir

On Thu, Nov 23, 2017, 5:37 AM Angga dwi firmanto <anggadwi...@gmail.com> wrote:
Dear Amir,
 
I am trying to run :

T.enroll([ceps])

and get this error :

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/export/home/speakerrec/anaconda3/lib/python3.6/site-packages/bob/bio/gmm/algorithm/GMM.py", line 210, in enroll
    return self.enroll_gmm(array)
  File "/export/home/speakerrec/anaconda3/lib/python3.6/site-packages/bob/bio/gmm/algorithm/GMM.py", line 200, in enroll_gmm
    gmm = bob.learn.em.GMMMachine(self.ubm)
TypeError: an integer is required (got type NoneType)

is there another missing step ?


Thanks in advance,

Angga

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

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

Amir Mohammadi

unread,
Nov 23, 2017, 5:09:38 AM11/23/17
to bob-...@googlegroups.com
Dear Angga,

Sorry for my earlier reply. What I meant was that you have not explained what you are trying to achieve here so it's very difficult to help you.

The code in bob.bio.gmm is meant to be used in bob.bio.base using the verify.py or verify_gmm.py script.
I don't know why you are trying to run the GMM algorithm outside of it. It is not meant to be used like that.

If you want to just train a GMM with your own data, you better use the low-level package that provides this functionality: bob.learn.em
https://www.idiap.ch/software/bob/docs/bob/bob.learn.em/stable/index.html
which comes with excellent guides and documentation.

Otherwise, if you want to actually run a speaker recognition experiment, please refer to bob.bio.base, bob.bio.spear, and then bob.bio.gmm documentations.

Thank you,
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.

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

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

Angga dwi firmanto

unread,
Nov 23, 2017, 10:41:52 PM11/23/17
to bob-devel
Thank you. it is very helpful


Angga

David Tolu

unread,
Jan 30, 2019, 3:41:51 AM1/30/19
to bob-devel
HOw can I add ivector to this gmm you've used in your answer.py
-- 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.

--
-- 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
Reply all
Reply to author
Forward
0 new messages