Quick search of the face descriptors in the db

我与影子孤独终老i 提交于 2019-12-23 19:17:51

问题


I want to implement something like face recognition application using neural networks. So I found this incredible article.

When we put the face image in the OpenFace network we get 128 measurements which we can use to compare faces.

But here we get the main question: how we can quickly find the same face in the database with the closest 128 values?

If we will use SVM(as it is written in the article) we should to retrain the classifier every time when we put the new face in the db, but it's inexpedient.

So I would to know what is the best approach for this issue? How services like Facebook compare these descriptors in the millisecond?


回答1:


If you have a face and want to search a database of faces for the closest match(es) there's actually only two steps (assuming you've already gotten the 128 OpenFace measurements - which I'll call the OpenFaceRep):

  1. For each face in your database, subtract its OpenFaceRep from the OpenFaceRep of your seed photo. We'll call this diff
  2. Get the dot product of that diff with itself. If you're in Python, it would look something like np.dot(diff,diff), and we'll call that the similarity.

The face with lowest similarity will be the best match. Note that your accuracy will vary quite a bit depending on the quality of your photos, lighting, etc. OpenFace has achieved an accuracy of about 92% on the LFW benchmark.



来源:https://stackoverflow.com/questions/41272915/quick-search-of-the-face-descriptors-in-the-db

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!