face-api.js
face-api.js copied to clipboard
How to improve faceapi.detectAllFaces(image).withFaceLandmarks().withFaceDescriptors() method execution time?
Hi @justadudewhohacks,
I noticed faceapi.detectAllFaces(image).withFaceLandmarks().withFaceDescriptors()
method is taking 6.5s to complete. and in issue #516 it specified that in GPU machine this execution time will improve. I am using GeoForce RTX2080 GPU machine and I couldn't see any improvement, it is still 6.5s in GPU.
Is there any configuration or settings need to enable GPU feature in face-api.js module?
Please help on this. Thank you.
I have this issue as well. The first time is always slow and I have tried it in two systems with diff gpu's and it does seem to load faster on my desktop. You could try loading the first time in the background when the page loads itself. That will speed up your subsequent api calls.
Me, too. The first time I run faceapi.detectAllFaces(image).withFaceLandmarks().withFaceDescriptors()
, the execution time on my devices were
Mac Mini M1 934.9248046875 ms
iPad Air 4 6946.372ms
Is it possible to enable iPad's GPU acceleration for FaceApi.js? Or wrap FaceApi into a WebWorker so at least it won't stop the UI from responding for nearly 10 seconds?