deepinsight / deepinsight/insightface

How to increase face recognition quality on my data?

Open
#1,994 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
29.7k
Forks
6.1k
PR merge metrics
No merged PRs in 30d

Description

Hi! Thanks for awesome repo!
I try to use it on my data and something get wrong. Pls, help me with that

1) I make some face embeddings with "R100 | Glint360K onnx" recognition model
For embedding I use `cv2.dnn.blobFromImage` with `scalefactor=1.0 / 128.0, mean=(127.5, 127.5, 127.5), size=(112, 112), swapRB=True`
(face and flip face with a ~20px face paddings **1 QUESTION**: _should I do paddings here?_)





NOT ONLY THAT PHOTO (SORRY BRUCE)!

2) I detect "new face" on the photo (RetinaFace)

3) I do 2 new face embeddings (face and flip face)

4) I try to calculate emb distance with sqeuclidean metric with all persons:
- "new face" & each person
- "new face" & flip each person
- flip "new face" & each person
- flip "new face" & flip each person

for example:
1. new face & Bruce1 face
2. new face & flip Bruce1 face
3. flip new face & Bruce1 face
4. flip new face & flip Bruce1 face
5. new face & Bruce2 face
6. new face & flip Bruce2 face
7. flip new face & Bruce2 face
8. flip new face & flip Bruce2 face

(And the same for each photo and person)

5) I get mean(all person distances) and get final distance number (for each person)

6) I labeling "new face" with "nearest person" by distance number form 5)

What could be the problem with my data? (Oh, questions... Finaly!)

**1) Should I do paddings for face embedding?
2) bad jpg quality original image?
3) Should I do all this embedding manipulations or did I misunderstand something?
4) Should I align face?
5) How head turns affect quality?
6) how lighting and background affect quality?
7) Should I train the model on my data to improve the quality?**

P.S. Thanks in advance! Sorry for my bad English :)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.