Closed Seth-Julien-de-Lampon closed 5 years ago
Calculating the locations like the example does work fine btw.
Could you create new FaceRecognition per thread? FaceEncoding and FaceLocation use Dnn. It is not thread safe.
That works perfectly! Thanks for the tip!
I'm trying to run the code in parallel on multiple CPU cores, just like the example (https://github.com/takuya-takeuchi/FaceRecognitionDotNet/tree/master/examples/FaceDetection). But the distances that I print out with the following code (see down below) are not between 0 and 2 and actually do not make any sense.
Do I miss a thing or is the Encoding calculation just not possible to run in Paralell?
I am using the cpu nuget package in a .Net Core console app.
Result:
77330,4555392426 116594805,513795 3905512926785,24 99675592693821,5 9,99817851362896E+15 8,02151826515965E+17 8,16535264000558E+18 7,76799579452464E+18 NaN NaN NaN NaN NaN NaN NaN NaN 2442073,74932843 7821815,3598267 106,853336907902 106,854189097259