wy1iu / sphereface

Implementation for <SphereFace: Deep Hypersphere Embedding for Face Recognition> in CVPR'17.
MIT License
1.58k stars 543 forks source link

can this method generate to new classes? #73

Open IQ17 opened 6 years ago

IQ17 commented 6 years ago

I tried to train MNIST dataset only with 0-7, and the resulting feature space looks good for 0-7. however, when I test the network with 8 and 9, they are not discriminative any more. So I am wondering if this method can generate to new classes?

figure_1

Basically, the problem I am facing is that today I want to verify 100 classes (but not necessary face), and tomorrow I will have to verify 105 classes, and next day more. I would like not to train the network everyday. So can I use method like in this paper to avoid retraining?

wy1iu commented 6 years ago

It depends. If your training dataset is large enough, eg, Imagenet dataset, then generally speaking, your learned features will be discriminative enough for the new classes.

Even when you are using metric learning type of losses, eg, contrastive/triplet loss, you will still need a large number of training samples to make the learned features discriminative. Maybe you should look for zero-shot learning or transfer learning type of techniques.

Our loss may work better than the original softmax in terms of the generation power, so you could try our loss for a dataset that is large enough, say Imagenet, for your task.