New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error at faceapi.drawDetection(canvas, boxesWithText). #130
Comments
You forgot the return statement in your map function: const boxesWithText = results.map((bestMatch, i) => {
const box = fullFaceDescriptions[i].detection.box
const text = bestMatch.toString()
const boxWithText = new faceapi.BoxWithText(box, text)
return boxWithText
}) Fixed the gist... |
Hi, I am attempting to get this example from the blogpost at itnext.io running as well, but have a few issues. Does anyone have the full source code (HTML + JS) for this, so I can see what I am missing? |
const video = document.getElementById('video') Promise.all([ function startVideo() { video.addEventListener('play', async () => {
}, 100) function loadLabeledImages() { |
while running my code,this error shows, please help me to solve this |
There is no faceapi.draw.AgeAndGender. Try this. |
yeah bro its working....... |
script.js:66 Uncaught (in promise) ReferenceError: getFaceDetectorOptions is not defined |
//const video = document.getElementById('video') Promise.all([ ])//.then(startVideo) // function startVideo() { // .then(load) // } // const detections1 = await faceapi.detectSingleFace(input).withFaceLandmarks() async function uploadQueryImage(e) { async function updateReferenceImageResults() { const fullFaceDescriptions = await faceapi if (!fullFaceDescriptions.length) { // create FaceMatcher with automatically assigned labels faceapi.matchDimensions(canvas, inputImgEl) const inputImgEl = document.getElementById('#queryImg') const results = await faceapi faceapi.matchDimensions(canvas, inputImgEl) resizedResults.forEach(({ detection, descriptor }) => { // video.addEventListener('play', () => {
// }, 1000) |
there are many comment line so,sorry for this |
its not the proper solution,i have the same issue |
can you help my ?? thats wrong in my code ? its can detect face, write score but without recognition >(label name)
|
I am trying to implement the use case list on below site
https://itnext.io/realtime-javascript-face-tracking-and-face-recognition-using-face-api-js-mtcnn-face-detector-d924dd8b5740
i am able to do face detection but getting issue in face recognition with some investigation it looks like boxesWithText is giving empty output which is causing drawDetection to fail.
Error
Uncaught (in promise) TypeError: Cannot read property ‘x’ of undefined
at VM1409 face-api.min.js:1
at Array.forEach ()
at Object.t.drawDetection (VM1409 face-api.min.js:1)
at run2 (VM1410 index.js:75)
JS code
The text was updated successfully, but these errors were encountered: