Hello. This is not exactly an issue. But I hope I can get some answers here as I'm a beginner.
First of all thanks for building this awesome library. So here's my question.
I'm building a very simple, moderate traffic facial recognition system. Maybe just less than 2000 faces a day. At midnight, the face list will reset to zero.
I found out how to get face descriptor from webcam using this library.
What I'd like to do is to save the descriptor in backend array in memory. So from my understanding, I can use euclideanDistance.
Let's say I've already added 100 descriptors in the array X in memory. So in order to find detect if a given face exists in the array, I can do this (pseudocode)
function findFace(newfacedescriptor) begin
for each descriptor in X begin
distance = calculate euclideanDistance(descriptor, newfacedescriptor)
if (distance < threshold) begin
showmessage("Found one !!")
exit;
end
end
end
is my understanding correct? I'm kinda confused on the difference between euclideanDistance function and findBestMatchf unction. I assume findBestMatch is an encapsulation of euclideanDistance function
second question, what sort of hardware do you recommend for better performance? would something like jetson nano or a pc with 3d gpu be advantageous ?
any help is greatly appreciated !!
yes, findBestMatch() is just an encapsulation to find the best match using same euclideanDistance() function.
do note that euclideanDistance() is not a gpu-accelerated operation, it simply runs a sum of squares of each item in face descriptor array and returns a square root of the final sum - that is the definition of Euclidean distance, not specific to face-api library. so general-purpose cpu will handle it better than specialized board like jetson. on the other hand, you do need a decent hardware acceleration (jetson or a pc with a gpu) to run facial detection and grab all the descriptors in the real time to start with.
thanks very much for the help ! so much clearer to me now!
Most helpful comment
yes,
findBestMatch()is just an encapsulation to find the best match using sameeuclideanDistance()function.do note that
euclideanDistance()is not a gpu-accelerated operation, it simply runs a sum of squares of each item in face descriptor array and returns a square root of the final sum - that is the definition of Euclidean distance, not specific to face-api library. so general-purpose cpu will handle it better than specialized board like jetson. on the other hand, you do need a decent hardware acceleration (jetson or a pc with a gpu) to run facial detection and grab all the descriptors in the real time to start with.