ageitgey / face_recognition

The world's simplest facial recognition api for Python and the command line
MIT License
53.45k stars 13.49k forks source link

Face encoding vectors info #816

Open beavcast opened 5 years ago

beavcast commented 5 years ago

First of all, thanks for the amazing library.

Second, I understood from the docs that the 128 dimensions of the face encoding vectors are numbers that have an unknown meaning. My question is: are there some useful info like max, min, variance for these numbers?

Thanks in advance for your help.

NathansLab commented 5 years ago

In order to find that out, you could run the a script classifying a large, open dataset of different images (like these) and visualize the results. I'd be curious to see them!

KrishnaManohar1997 commented 5 years ago
  • face_recognition version: Last
  • Python version: 3.7
  • Operating System: Linux

First of all, thanks for the amazing library.

Second, I understood from the docs that the 128 dimensions of the face encoding vectors are numbers that have an unknown meaning. My question is: are there some useful info like max, min, variance for these numbers?

Thanks in advance for your help.

Like @beavcast asked, can we get some parameters using which we can group some Face encodings based on a single value. Which can be useful for face comparison within that cluster(having a closer value ) making the search faster. @ageitgey can you help with this, it would be very useful. Thanks in advance for your help.

slefforge commented 3 years ago

In order to find that out, you could run the a script classifying a large, open dataset of different images (like these) and visualize the results. I'd be curious to see them!

Here is a primitive tool I made to do this. The pdf below contains the results I got from running this tool on the database you suggested. LFW_Face_Database.pdf

To me some features create clearly distinct groups (i.e. component 64 separating into dark skin tones with clean shaven faces and light skin tones with facial hair), but I was disappointed by the lack of obvious facial characteristics tied to components of the vector (i.e. distance between eyes, nose shape, etc.). However, one notable exception I found was with cheekbones. feature_67 As you can see, the faces that scored the lowest on this component all have very high cheekbones. The cheekbones faces that scored highest for this component are quite a bit more subtle, but it's clear that they lack the high cheekbones of their counterparts.

I'm curious to see if you guys have any insights based on this. Particularly, specific facial features that are tied to components that I missed in my quick glance over these results.