Open Tomhouxin opened 6 years ago
Can you please rephrase your question. @Tomhouxin
When I was doing face recognition, I found that I could only recognize faces in data sets. The problem is when I identify a face that is not in the data set. It actually discriminates me into the most similar human face in a dataset, not a stranger. @Shahnawazgrewal
for previously unseen identities, you need to extract embedding and then a train classifier to recognize. @Tomhouxin
According to my understanding, I just need to decide that people I don't know are strangers, and I don't need to put them into the classifier. @Shahnawazgrewal
Maybe find out the distribution of confidence levels of different classes for unknown faces. Then from there, see if can come up with a heuristic to determine if its unknown.
You have a good idea, but people you know and people you don't know are very similar in terms of SVM classification results. @jax79sg
@Tomhouxin How about create a category called as "unknown" and put a lots of face image which you don't have to classify in it then re-train the classifier? I think it may make the classifier better for usage.
This problem is solved by setting a threshold for the results of the classifier. At the very beginning, I saw that the results of the classification were very close, and there was no threshold. Now when I train the classifier, I add about 100 faces to each person. The result of the classification is obviously different, and then you can set the threshold.(这个问题解决了,把分类器出来的结果设一个阈值。最开始我看分类的结果都很接近,无法设阈值。现在我训练分类器的时候每人加到100张人脸左右。分类出来的结果就很明显有差距了,这时候就可以设阈值) @RedBugYO
@Tomhouxin try other classifier, if you find the classification results are very close to each other.
hi @Tomhouxin What does the "threshold" mean in the SVM classifier?
1) check the probability by model.predict_proba(emb)
, if the max one is below a threshold, then it is a stranger?
or
2) add a new class called "unknown" in to the classifier?
@Tomhouxin 所以你还是增加了一个新类叫stranger吗?和embedding预测的类别相似度小于阈值的都被分类为这个类别里?
@DawnHH only add a threshold
@DawnHH yes
Hello @Tomhouxin , Did you solve your problem ?
@menon92 , yes !
Thanks @Tomhouxin Could you please help me that how can I do this. I have the same problem. I try to calculate `l2 distance' of two image. But it's not working well
Thanks
sorry,I'm not sure how good it is to calculate the distance. I'm using the classifier (SVM), but I'm also going to try to calculate the distance directly
@Tomhouxin Do you just use classifier (SVM) prediction with a fix threshold to judge a stranger ?
@menon92 ,yes ,you are right
@Tomhouxin But it's not working for me. what could be the cause of it . However my image quality is not very good
I don't know exactly what your question is, can't you find the appropriate threshold?
@Tomhouxin Yes, I can't find the appropriate threshold for classifying the unknown images.
Well, please read the comments carefully. They say how to solve it.
hi @Tomhouxin What does the "threshold" mean in the SVM classifier? 1) check the probability by
model.predict_proba(emb)
, if the max one is below a threshold, then it is a stranger? or 2) add a new class called "unknown" in to the classifier?
I think their method is as the same as the first one you mentioned.
. I want to achieve real_time_face_recognition py, it mistook a stranger people in the dataset, it should be the most similar as the stranger in the dataset, then how should I process to determine the stranger unknowner? Thank you very much