-
Notifications
You must be signed in to change notification settings - Fork 134
New face recognised with any other face add in this #13
Comments
Hi, a lot of people asked this same question. The implementation here is not face identification but face recognition. What you are asking for would be to have a confidence score. If the confidence score is below a threshold it would name the person as "unknown". But this is not implemented yet, but you can find more information on how to implement it Qualeams/Android-Face-Recognition-with-Deep-Learning-Test-Framework#14 and #8 |
New face recognized matched with an already added old face. if new face not added in this. |
how to find confidence score |
Hi sladomic |
Hi sladomic |
Hi, as already mentioned, this feature is not implemented, but you can try to implement it by yourself. I will share some emails I have shared with other people already. What you ask for is used in face identification (confidence score). A lot of people asked for this, but I’m afraid, that I don’t have any time to implement this by myself at the moment (maybe in a few months). But I can share with you what I shared with others regarding this function. I hope this helps for a start. Best would be if you research for confidence score and probably you can come up with an implementation of a good algorithm and even share it (commit it) to the library so anyone could benefit. Thanks and best regards, ————————————————————————————————————————— Dear XXX, First of all thanks for the interest and feedback. Face recognition generally doesn't include the feature you mentioned. This is more a task of face identification. But since a few other people already had the same question, you can try to implement a confidence score and set a threshold (experiment a bit to set it at the right point), so that you only tell the name if the confidence score is about the threshold and "unknown" if below. Qualeams/Android-Face-Recognition-with-Deep-Learning-Test-Framework#14 Here and especially in the last comment you can find information of how this could be implemented. Please note that the confidence score I proposed is not 100% accurate. If you want to train it correctly you would need to implement a bit more complex algorithms. Best regards ————————————————————————————————————————— Hello Sir, Can you please help me with face identification, i tried to implement confidance score using below code. double dotProduct = featureVector.dot(featureVectorToRecognize); But still there is not much difference that i can distuinguiss between registered and non registered faces. I have tried my best, it will be very helpfull to me if you can help me with face identification. ————————————————————————————————————————— Hi XXX, Sorry, I don’t have much time at the moment. What do you take as „featureVector“? I just see the code here to calculate the cosineSimilarity, but not the code how you calculated the „featureVector“. The featureVector here is the mean of all feature vectors of one person. https://github.com/elimu-ai/authentication/blob/master/app/src/main/java/org/literacyapp/authentication/thread/TrainingThread.java on line 244 we reduce all feature vectors of one student to one feature vector (meanFeatureVector). This meanFeatureVector is then used in the cosineSimilarity calculation as „featureVector“. So what you need to do in training is, to additionally calculate the meanFeatureVector per label/person and store this for later use (so that you don’t need to calculate it every time you do the recognition). Then when you want to do the recognition, you load the meanFeatureVectors and after you’ve got the recognized person/label, calculate the cosineSimilarity by using the person’s meanFeatureVector and the current image (featureVectorToRecognize). Then if the value is above a threshold (e.g. 0.5), you print out the name and if it’s below, you print out „Unknown“. Good luck and regards |
Thanks a lot I will try them :) |
hi, |
@sladomic Please let us know in case you have implemented it .Thanks |
hi @sladomic any update about calculating confidence score. thank |
tensorflow_jni.cc has a function to return confidence score as shown below. Can I please know how do I make use of this function
|
Hi That's because they use the softmax function as the last layer in the CNNs. The softmax function gives you a probability for each class. So instead of using KNN or SVM you could add a new classifier (softmax) and should then have the ability to use confidence scores. |
@sladomic Thanks very much for your help . |
Hmm I doubt that this will work https://www.tensorflow.org/tutorials/image_retraining
If you really want to try out I would suggest you first gry it out on a PC. There the transfer learning should work with python. But for Android you would need to adapt the python code, build TensorFlow with special instructions for the operations and then it might still not be feasible. But on a PC you can try it out with lesd effort (still some effort though). |
@sladomic Thanks I have been looking at the link for past few days. (i am ready to implement irrespective of mobile or PC) |
Could I please know if the below implementation is possible Currently the output Image Classification is 128 numbers for each training image which is then fed to SVM for training. Instead of providing these 128 numbers of each image as input to SVM for training, If so , how do we provide these 128 numbers of each image as input to create tensorflow graph/model file ? |
The setup would then be as follows:
Yes, that should be possible on a PC but on Android only with modifications in the build of TF for Android (google for "tensorflow no opkernel android") if you want to execute step 4. Also best would be to save the features of step 3 so they don't need to be extracted every time but can be reused (extract once per image and then save the 128-vector per image to save time). |
sir how can i get the recognized label name from the coding.....may i use this code for face login ?? |
Dear @chithrabaskar sorry but I don't get the question. If you want to use it for face login you need to tweak it. At least you would need to add probabilities so you could check against a threshold if the probability is high enough for the person (confidence score) and you would need to add eye tracking, so you could detect eye blinks (so the recognition cannot be fooled by a photo) |
thank u sir...sorry for my late reply...how and where to add probabilities??..can you explain in detail?? |
@sladomic Thanks... Modifying the architecture a bit helped me to get the confidence rate.. |
@Zumbalamambo , Great to hear you made it working ,but I am still facing the same problem to the confidence score on the Android App . I am using KNN. Could you please help me in to achieve confidence score. |
I am trying but not change camera Orientation so please give m the solution.............. |
has this functionality been implemented? |
What is the confidence score below threshold value for unknown people? |
hi, can anyone implemented New face recognised with out adding face add in this please mail me.. |
I am using this library but probelm is that every mobile perfect work but huwai p20 and google nexus 5 crass . |
Hi friends,
I m facing an issue if any new face will recognize and then given any old user name on that face.
The text was updated successfully, but these errors were encountered: