Hey all,
This discussion is about the temporary files created
when running a verification experiment, that is Projector.hdf5,
Enroller.hdf5, ... etc
If one runs the ./bin/verify.py using ubm-gmm, then a file named Projector.hdf5 will be created in /idiap/temp/username/YOUR_DATBASE_NAME/YOUR_SUB_DIR/. This Projector.hdf5 is the UBM and it contains a number of Gaussian (depending on how many Gaussian one has used for his GMM model).
Now
if one wants to run another experiment, like ISV of i-vector, using the
same database and same protocol, then it is judicious to use the
pre-calculated UBM model as well as the preprocessed files, instead of
recalculating them all. In order to do that, we can specify the options:
--skip-preprocessing --skip-extraction --projector-file '/idiap/temp/akomaty/AMI-test1/isv/Projector.hdf5'. Then the script will look directly for the UBM file in the specified directory.
However,
if one runs the whole verify.py command without any skip and without
specifying the already-trained Projector file, then a file also named Projector.hdf5 will
be created in , but this file is different than the one previously
discussed, so it does not only contains the GMM-UBM. In fact, if you
open it, you'll see two groups, Projector and Enroller as seen below:
--
-- 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.
Hi Alain,Thank you for raising this issue. Generally I think your problem is that you want to use a cascade of classifiers and also share some classifiers between different experiments.
In my understanding, bob.bio.base currently supports only two layers of cascading through the "projection" and the "enrollment" steps. This is somewhat limited and usually you may want to have N number of classifiers cascaded. But to be more realistic, in case of GMM based algorithms, you want to share the UBM/GMM between experiments.Hence, I think the GMM should be trained and saved in the projection step and other steps such as ISV and Ivector be done in the enrollment step and saved there.This way, you can use the vanilla 'verify.py' to provide the trained UBM with the '--projector-file' option and it should just work. This change I think will break current API of bob.bio.gmm but I think the changes can be minimal.P.S. I really don't know why we have 'verify_gmm.py', 'verify_isv.py', and 'verify_ivector.py' written separately but I think this may be time to merge them into 'verify.py` since these scripts are lacking behind the original one in terms of bug fixes and new features.Best,Amir
On Mon, Nov 14, 2016 at 6:03 PM 'Manuel Günther' via bob-devel <bob-...@googlegroups.com> wrote:
Dear Alain,indeed, the `Projector.hdf5` is different for each algorithm. This is by design. Here, you are only talking about UBM-GMM-based algorithms, while the possible types of algorithms is so wide-spread that it is impossible to assume any kind of structure inside a `Projector.hdf5`. In your case, this means that the `Projector.hdf5` files for the UBM-GMM and ISV algorithms are also different and incompatible. Hence, it is impossible to train a `Projector.hdf5` with one algorithm and use it in another one.I am not sure if Elie has implemented a clever way to re-use the UBM trained with another algorithm. From looking at the code, it does not seem to be the case.However, it should be straight-forward to implement this. For example, you should be able to specify a pre-trained UBM file in the GMM constructor: https://gitlab.idiap.ch/bob/bob.bio.gmm/blob/master/bob/bio/gmm/algorithm/GMM.py#L21 and use this instead of training a new one. For example you might check if `self.ubm` is already set here: https://gitlab.idiap.ch/bob/bob.bio.gmm/blob/master/bob/bio/gmm/algorithm/GMM.py#L101 and skip the UBM training.Then, you can specify the UBM in your configuration file. Note that you might need some manual work to get the UBM file into the right format, i.e., you might need to extract some sub-directory of `Projector.hdf5` into its own file.Let me know in case of problems.--Manuel
-- 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.
-- 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.
----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.
Now, thinking about it, maybe we should add another (optional) step to process probes after enrollment training was completed.I currently have a similar issue. I am using a database (IJB-A), where we have several images combined into one probe (i.e., implementing the `FileSet` protocol). During projection, only single files are handled, while I need to combine all probe features of a FileSet to be able to score. Hence, at the moment I do this during scoring, i.e., many times for the same probe FileSet. It might be a good idea to have an additional step that allows to do this once, which we could use for the ISV probe file processing (currently done during projection, see above). Yet, this would complicate the toolchain even more, is useful only in rare cases, and needs to be carefully designed.
--
--
-- 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.
To view this discussion on the web, visit https://groups.google.com/d/msgid/bob-devel/CAHq7xUwjTn8gRUdrw_dSjDZhDdeog6TpfVj0HWh97S-gku3%2B1A%40mail.gmail.com.
--
To view this discussion on the web, visit https://groups.google.com/d/msgid/bob-devel/CAPS%3DA35imTPsUcDKigcoQOckEBNKYQS9U%3D-9vYVujB_x7ArnZw%40mail.gmail.com.
- You don't need to put `Child_voice.py` inside bob's source code. It can be anywhere. You just give its path to verify.py.
- Your database's original directory has brackets around it `[]`, please remove that. I wonder how the code is working with that.
Have you modified the Bob's source code?
To view this discussion on the web, visit https://groups.google.com/d/msgid/bob-devel/CAHq7xUx%2B_THqJKXmSe5pC671X1CB4Byjs5upAuawMovedqrvfg%40mail.gmail.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/bob-devel/CAPS%3DA352RAXVscpgSkQ2U-DPTbG0oc7kowazOe32Lo%3Da7VX6TQ%40mail.gmail.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/bob-devel/CAHq7xUyBGEcHrEtYAmMpiV5BKGagNB8WB5NCER_6OKV14TcYdQ%40mail.gmail.com.