Open Sparviero-Sughero opened 4 years ago
I'm having the same issue mostly focusing on an efficient way to save the face encodings. What i did though is use the pickle library to dump out a list of face encodings to a file and load it rather than encoding them again every time you start it. The only thing i'm not sure about with this is if it would scale up well or not since i'm not entirely sure if i have a huge list of encodings saved out to a file would loading it through pickle be slow or efficient
Good luck, I'll update you with my results
tnx for answer ziadkadry99 I've downloaded py code from https://www.pyimagesearch.com/2018/09/24/opencv-face-recognition/ I'm not a py developer but the code it's simple and maybe it's possible to remove Xserver's stuff and reach our objective.
I consulted the stackoverflow community with my ideas here's a link to the answer i got:
The pickle module would indeed be a good simple solution as well as MongoDB
I'm using recognize.py from https://www.pyimagesearch.com/2018/09/24/opencv-face-recognition/
I've modified the py code after proba = preds[j]
with this
name = le.classes_[j]
text = "{} ({:.2f}%)".format(name, proba * 100)
print "[FOUND]",text,"(",args["image"],")"
cv2.waitKey(0)
I'm having the same issue mostly focusing on an efficient way to save the face encodings. What i did though is use the pickle library to dump out a list of face encodings to a file and load it rather than encoding them again every time you start it. The only thing i'm not sure about with this is if it would scale up well or not since i'm not entirely sure if i have a huge list of encodings saved out to a file would loading it through pickle be slow or efficient
Good luck, I'll update you with my results
I liked your @ziadkadry99 idea of saving encoding to a file. What happens when you need to load a new face would it encode all faces again? or can i append in the previous file? Can you share your code which writes encoding to a file?
Here is my way, face of 128d features to mssql database.
It is an interesting topic .will keep my eyes on .
Another approach can be let a neural network "study" the face encodings. I've used this approach in PyRecognizer. The time to predict the face is instant (few milliseconds) with a dataset of 311
people (celebrities), and a total of 5425
photos.
@HAKANMAZI anyways to make it save from a live webcam ? i mean when it sees my face it saved in a file that it saw my face
Description
face_detection need to scan "known_people" directory every time. in "known_people" directory I've 20 people and face_detection need a lot of time to "learn" before search known peoples inside new photos (unknown_pictures directory contain 2 photos). it's possible to cache "learn" analisys to emprove performances?
What I Did