-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to improve Accuracy #22
Comments
I do have the similar question. In my cases, if there are around 8 persons (each around 5-10 samples), the 'probabilities' using SVM is fine ( > 0.7+). But if it exceeds 20 persons, the probability declines to around (0.2 to 0.3). Probably i lack of something. Can you share yours too? |
@kyygit i think this repository is not useful for production. this repository is best for colleges projects. i have tried with 25 classes but accuracy is very low. if you fined any solution for this so please let me know. thanks |
hm... not sure we are talking about the same thing. |
@Manishsinghrajput98 It really depends on your use-case and your data. |
Hi @ldulcic , thanks for your sharing.
30-40 images. That really opens my eyes~ In my case, it is an attendance system for around hundreds of workers. @ldulcic Allow me to ask, when you get an accuracy of >95%, is it, the softmax classifier is 'confident' of the matches? What is the 'probability' of the result classified? Thanks in advance. |
@kyygit I had the same problem when I first started to work on face recognition smart lock. Low confidences but mostly correct labels. Head poses in these images are not very good for face recognition, you see only the side of the face, in lot of situations there are not enough data on the image where person is turned on one side. First image is a good example, you only see one half of the face at bad lighting. If lighting was little bit worse, you as a human could sometimes mistaken this person for someone else when you look at it from the side. Side head pose is just an example, model performance is deteriorated mostly by side head poses, bad lighting positions and people faces which are far away in image. This gives model too much variation in data which is why it doesn't produce high confidences. When I started I didn't realise this so my dataset was filled with these "bad images" because I thought "more data is always better". After realising this I restricted my problem to front-facing head poses in reasonable lighting conditions which are relatively close to camera, so I "refactored" my dataset to include images like this. From this point on I was getting pretty good confidences. Camera didn't catch you half-way across the hallway but when you came close to the door and looked at the camera, the door would open within a second or two. To answer you question, when I wrote accuracy > 95%, I was referring to accuracy on my test set that I compiled, that's softmax classifier score (probability). Sorry for the late answer, I will write a blog post about this where I'll explain in more detail what I did. I just didn't have enough time to do it lately, hopefully it will be soon 🙂 PS. If anyone else is reading this...This lib saves you the hassle of manually writing the code for classifying people, you can just plug your data and get working system out. But it's all about the data, your face recognition system will only be as good as your data is. Cheers! |
Thank you. It looks promising!
Not at all! Your experience is Gold to me :) I am grateful for your patience and kindness to share your work.
You have highlighted the main point that i have overlooked - 'data'. With your detailed advice on the 'frame quality', i would be more careful and picky on the 'face enrolment' part now. |
not sure @Manishsinghrajput98 has any concern? |
Hi, i am working on an attendance system as well. To provide context: Facenet was used as an embedding generator to generate facial embeddings As for the classifier, i am not using any, instead, i am comparing the cosine similarity between embeddings to find out the highest confident between two embeddings. Reason i am not using a classifier is that i am required to add new users (facial embeddings) to the system occasionally, thus it seems that using a classifier is not ideal as you would require to retrain it again and again. But i am getting a lot wrong labels predicted for each user, ie. The person was wrongly recognized with high confidence. How should i tackle my situation where new users may be added while maintaining correct labels with high confidence? |
You can added multiple checks for removing false cases.
Also you can add strong face detection models.
For face recognition you can add more data for each position. Like beard
etc.
Added one more checks for removing false positives histogram matching and
face recognition library.
…On Fri 18 Aug, 2023, 5:05 PM marcolyh, ***@***.***> wrote:
Hi, i am working on an attendance system as well. To provide context:
Facenet was used as an embedding generator to generate facial embeddings
As for the classifier, i am not using any, instead, i am comparing the
cosine similarity between embeddings to find out the highest confident
between two embeddings.
Reason i am not using a classifier is that i am required to add new users
(facial embeddings) to the system occasionally, thus it seems that using a
classifier is not ideal as you would require to retrain it again and again.
But i am getting a lot wrong labels predicted for each user, ie. The
person was wrongly recognized with high confidence.
How should i tackle my situation where new users may be added while
maintaining correct labels with high confidence?
—
Reply to this email directly, view it on GitHub
<#22 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AI74CZANUUIEEOCVXB7N54TXV5HQJANCNFSM4S666SDQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@Manishsinghrajput98 Thanks for replying. Can you explain more on adding multiple checks? Sorry but i forgot to mention that i am using MTCNN as my facial detector. I am now testing out on images instead of video(frames) my biggest restrain is still on how can i add new users (facial embeddings), without retraining the whole classifier SVM. Or should i just use the method i described above? - Using cosine similarity to compare embeddings. Is there a more efficient and productive way? |
@marcolyh you have a database of embeddings where each person has multiple embeddings? When you try to classify person in image you compare its embedding to the whole database? Retraining of classifier is usually very fast. I had a dataset with ~1000 embeddings (images), retraining lasted a second or two. Why is this a bottleneck for you? |
can you share the percentages of accuracy. and how much images needed for training and also how much class we can use ?
The text was updated successfully, but these errors were encountered: