deepinsight / insightface

State-of-the-art 2D and 3D Face Analysis Project
https://insightface.ai
23.31k stars 5.41k forks source link

alignment and landmarks for pose analysis #1797

Open juanluisrosaramos opened 3 years ago

juanluisrosaramos commented 3 years ago

I'm experimenting with face recognition to do a people counter from video. Every time I have a new frame it detects faces and uses norm embeddings to compare with previously detected faces. In general, it works pretty well and fast (better than SORT trackers) but I'm seeing now that there are some face poses that his 512 embedding are very "general" and new faces are detected as this face/person Those faces are people with masks getting out from a lift or door (not a frontal view) where we only see one eye like this one

I decided to only keep some pose faces (frontal view) and wanted to use landmarks (distance between eyes) to do it but I see that buffalo_s (or L) 's detection model is "guessing" KPS that are not seen in the image

A face example another face example

A nice face image that I will love to use.

I'm guessing that those false landmarks are returned by the face alignment and I don't want to avoid face alignment so, is there any way to have those kps previous face alignment?

Thank you very much for your work! Juan Luis

juanluisrosaramos commented 3 years ago

Two more examples face1 face2

nttstar commented 3 years ago

You can choose to set a minimum threshold of face.embedding_norm, to filter out invalid face images which likely to have high similarity scores with many other photos. For example, ignore faces with face.embedding_norm<17.0

juanluisrosaramos commented 3 years ago

Thank you very much. I see, I tested it and it's very useful ThankS!