0

I've successfully implemented a face detector app using html and javascript. Specifically this one: https://justadudewhohacks.github.io/face-api.js/docs/index.html. To test it, I run it locally using VS Code extension Live Server, and it works pretty fine and fast. Now, I'm trying to test it on my mobile device and manage to do so after following the steps posted here: How to allow Chrome to access my camera on localhost?.

Now, the issue that I'm facing is that the app runs extremely laggy on my phone. Particularly, I've tested the app just streaming my frontal camera and showing the local time on the corner of it, and it runs fast. The problem appears when I add the face detection part. In the script.js, that part is:

const detections = await faceapi.detectAllFaces(video, new 
faceapi.TinyFaceDetectorOptions()).withFaceLandmarks().withFaceExpressions()

Eventually, my intention is to host this app in a server (I have no previous experience in that matter), so my question is what change do I have to make in the code (or somewhere else) so that the face detection is performed by the server itself and not by the user's phone (I'm assuming that's what's happening in my case)?

Thanks!

EnzoBH
  • 1
  • 1

0 Answers0