Open 1warpengine opened 6 years ago
By Multithreading/pools. I think u are asking this
It seems like the pool can do face comparing in multiprocessing way. However, the bottleneck of the face recognition computing is face encoding. So is there any way to do face encoding in multi-core way?
THANKs :)
yes. Create a ML model with n_cpus = -1 parameter. Give this model all set of encodings u have. n_cpus = -1 makes use of all the cpus u have to train the encodings.
Excuse me, do you mean creating a model in dlib from scratch? Or is there any ways to do transfer learning to modify dlib’s face recognition model?
Thank you for your reply :)
Actually I think the original issue is about “inference time” but did you mean “traning time”?
If there’s any misunderstanding, please judge me. Thanks
Yes, i understood as training time.
I mean at this step, https://github.com/ageitgey/face_recognition/blob/master/examples/face_recognition_knn.py#L100, add n_jobs = -1 Ref: http://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KNeighborsClassifier.html
Well, even to do inference, the same concept could be used if you dont have a solution to do incremental learning.
what do u think ?
Description
Running the example I noticed it use only 1 CPU, I'm not talinking about the command line face:recognition but using the lib in python.