I am getting the below 'unshiftedLandmarks' error when trying to process iphone camera photos. I think there may be an issue with rotating the image or perhaps compressing the size? Any idea how I could fix this?
I have tried to reduce the image size first, with the below code, but it still does not seem to help.
document.getElementById("original-Img").src=image.src;
var canvas=document.createElement("canvas");
var context=canvas.getContext("2d");
canvas.width=image.width/4;
canvas.height=image.height/4;
context.drawImage(image,
0,
0,
image.width,
image.height,
0,
0,
canvas.width,
canvas.height
);
ErrorUncaught (in promise) TypeError: Cannot read property 'unshiftedLandmarks' of undefinedat Object.resizeResults (face-api.js:5652)
Can you show me the relevant code? The error is apparently thrown in faceapi.resizeResults. The error may indicate that you are passing invalid stuff into faceapi.resizeResults, maybe undefined?
Hi,
I am getting the below 'unshiftedLandmarks' error when trying to process iphone camera photos. I think there may be an issue with rotating the image or perhaps compressing the size? Any idea how I could fix this?
I have tried to reduce the image size first, with the below code, but it still does not seem to help.
document.getElementById("original-Img").src=image.src; var canvas=document.createElement("canvas"); var context=canvas.getContext("2d"); canvas.width=image.width/4; canvas.height=image.height/4; context.drawImage(image, 0, 0, image.width, image.height, 0, 0, canvas.width, canvas.height );
Error Uncaught (in promise) TypeError: Cannot read property 'unshiftedLandmarks' of undefined at Object.resizeResults (face-api.js:5652)
Thanks.