davidsandberg / facenet

Face recognition using Tensorflow
MIT License
13.8k stars 4.81k forks source link

Compare different face images #353

Open yun-long opened 7 years ago

yun-long commented 7 years ago

Hi,

I am trying to separate many face images into different classes. e.g., identify all faces of a person, named "Sarah", and put all identified face images into one folder.

Firstly, I download this model (20170511-185253) from this repository. Secondly, I forward all my face images into this model and save the embedding of faces. Thirdly, I calculate the L2 distances with the embedding, between unknown faces and my reference face "Sarah".

Finally, I got this result shown in below figure. The first image is my reference image, "Sarah", the numbers are the distances, the images with red border are identified "Sarah".

sarah

But, the problem is that, the distances, d1 = "reference Sarah" - "real Sarah", d2 = "reference Sarah" - "not Sarah" are quite the same.

Does anyone known how can I improve it?

huan commented 7 years ago

+1

That's the same problem I'm facing to...

davidsandberg commented 7 years ago

Hi, What input pipeline did you use, i.e. image standardization, alignment, etc?

yun-long commented 7 years ago

@davidsandberg hello, the pipeline looks like this:

some image => face detection => crop face => pre whiten => neural network => face representations => euclidean distance

I did't use face alignment. Should I use it? Thanks

shangwenxiang commented 7 years ago

@davidsandberg +1,That's the same problem I'm facing to...

GuiUzeda commented 6 years ago

I'm having the same problem. The euclidean distance seams to be very low for all the faces compared to the facenet paper. In my case, I used face align with dlib

A provisional workaround for me was to lower the threshold to a point where I didn't get false positives anymore. I can see that your code might have a threshold equal to 0.04. If you lower that to 0.03 you will probably eliminate the false positive, but you would have more false negative.

+1 to that problem, could not solve this particularly well yet

axmadjon commented 6 years ago

@davidsandberg

At me too such problem. how can you solve this problem? Who knows?

rexlow commented 6 years ago

+1 Any innovative ideas yet?