Implementing a DualClassGMM class from bob.pad.base.algorithm.OneClassGMM

11 views
Skip to first unread message

Guillermo Estrada

unread,
May 22, 2018, 9:14:57 PM5/22/18
to bob-devel

Hi,

I was wondering if I can adapt the "OneClassGMM" class to train a GMM that uses the real and attack samples by modifying the "train_projector" method as follows:

def train_projector(self, training_features, projector_file):
        # training_features[0] - training features for the REAL class.
        real = convert_and_prepare_features(
            training_features[0])  # output is array

        # training_features[1] - training features for the ATTACK class.
        attack = convert_and_prepare_features(training_features[1]) # output is array

        # Train the DualClassGMM machine and get normalizers:
        machine, features_mean, features_std = self.train_gmm(
            real=real+attack,
            n_components=self.n_components,
            random_state=self.random_state)

        # Save the GNN machine and normalizers:
        self.save_gmm_machine_and_mean_std(projector_file, machine,
                                           features_mean, features_std)
My idea is: first to uncomment the attack... line and to add a attack samples in the real code line (real = real + attack).

I would really appreciate any help in this matter.

Best,
Guillermo



Amir Mohammadi

unread,
May 24, 2018, 5:59:49 AM5/24/18
to bob-...@googlegroups.com
Hi,

You would have to train two separate GMMs: one for real and one for attack.

I am not sure how you would produce one final score though.
Probably, score(gmm_real, test_sample) - score(gmm_attack, test_sample)
will work.

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