First of all, I hope im in the right stack exchange.

So I'm trying to build a facial recognition system, e.g. one that recognizes a face and compares it to a database of known faces. For the first part, there are a ton of resources available, thats not the problem.

The problem I have is designing the database. How do you make that efficient? Assuming you have to check the recognized face against every known face, even possibly multiple variations of the same face (think 2 versions from different angles), how do you make sure that it's still efficient and doesn't take an hour to do per run, apart from obvious parallelization?

How do you design such a database?

  • See expertly-written answers in: stackoverflow.com/questions/5751114/… and also dba.stackexchange.com/questions/163207/… The answers explain why the task requires storage and retrieval schemes which are different from traditional RDBMS approaches, and also mention the names of some RDBMS systems that implement high dimensional or nonmetric approximate similarity search extensions for these types of applications. – rwong Feb 8 at 23:19

This kind of question is hard to answer, as it depends heavily on face recognition algorithm used. Also, not many people have experience designing this kind of database. Another reason would be that algorithms of such database would be closely guarded secret of whoever developed it and is making money out of it.

But the general idea is to use some form of indexing. Possibly hierarchical. This way, you use fast and efficient comparison to narrow the results from many to few. And then use more precise, but slower algorithm to compare those few against the query. Quite possibly use multiple algorithms along the way.

Good start would be to study how geospatial and temporal databases index their data. Especially spatial ones, as I could imagine a face-data being something like vector of values, so it would become possible to use database that allows storing and indexing N-dimensional data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.