Qualeams / Android-Face-Recognition-with-Deep-Learning-Library

Face Recognition library for Android devices is an Android library (module) which includes several face recognition methods.
Apache License 2.0
371 stars 135 forks source link

Does caffe or tensorflow can be used to train? #14

Closed aigeek closed 6 years ago

aigeek commented 6 years ago

Hi, thanks for your work, I like it very much! But I have some questions, does caffe or tensorflow can be used to train faces? I see the code in caffe.java :

        caffe = new CaffeMobile();
        caffe.setNumThreads(4);
        caffe.loadModel(dataPath + modelFile, dataPath + weightsFile);

But I can not found the codes which create "modelFile" and "weightsFile" in the project.And they are not put in the project in advance. Thank you! @sladomic

sladomic commented 6 years ago

Hi, Caffe was only used in the beginning but we haven't used it since the first version. But the idea for both CNN methods is to use a pre-trained model (e.g. self-trained, VGG Faces, facenet) and to take the last layer before the classification as features. We then use SVM or KNN to train a classifier with those features. So it isn't possible to train the CNN on your mobile entirely with this code (wouldn't be powerful enough at this time anyway)