Open eze-villegas opened 2 years ago
Following the API documentation, the detectSingleFace method is expecting a TMediaElement type. I have the same issue by using react-webcam and capturing the reference of the component with useRef.
https://justadudewhohacks.github.io/face-api.js/docs/globals.html#tmediaelement
You might consider to use a DOM query selector just like the example in the High Level Api section of the face-api readme.
https://github.com/justadudewhohacks/face-api.js/#high-level-api
Hi, my name is Ezequiel and I am a student therefore I am new to programming. I am trying to make a system with face-api that recognizes a face on the webcam and compares it with that of an image. But when I try to print by console
const detections = await faceapi.detectSingleFace(video.current)
it returns the following result:My code:
This is an app component created with Create-React-App. I don't understand why throw an error but after throwing a correct result. Does anyone have any idea of what the problem is? Thanks for help!