Answer the question
In order to leave comments, you need to log in
The most technically simple method of searching in the database by photo?
Greetings,
I want to try to make a miserable semblance of a face search in my database (which is not at all normalized, and rubo speaking, I have it like a temporary shed) using a pre-calculated hash / checksum based on the characteristics of the face, as many have already done in their time) in general, I found an interesting and very simple face-recognition module ( https://pypi.org/project/face-recognition/) but I could not find if it can calculate for faces something like a hash / checksum that I can use for further quick search in the database?
The database currently stores photos in base64 (I agree that the option is far from the best :) ) the size of the database is 40gb, the question was how to add face search to it (even if in the most primitive and crutch form), what solution do I see so far:
1. upload each photo in base64 in a loop
2. collect photos from base64
3. use the face-recognition module to compare with the reference photo.
The only thing is that it won’t be fast (although it’s like a powerful PC and the speed will not be so terrible) since the photo is more lama ... but I think it will work as the most crutch option .. On the other hand, I won’t do a search often. Tell me a technically more correct and most importantly quick solution, ideally I would like to get a miracle checksum for each found face in the photo and just use it in the database with the usual SELECT to make a selection.
Answer the question
In order to leave comments, you need to log in
How would you do it yourself:
You can do this:
1. The average color of the pixels of all horizontal lines.
2. Average pixel color of all vertical lines.
We get 2 arrays: average colors horizontally, average colors vertically.
If the photo size is 100x100, we get the data size 100+100.
We compare these 2 arrays with the photo to be checked and balance, we minimize the difference of discrepancies when comparing, shifting one of the arrays to the left or right.
After balancing the two arrays from the database to the two arrays from the compared photo, we will get the percentage of the overall match of the images.
This is not a neuron, but the result is similar.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question