Face-Detection-JavaScript icon indicating copy to clipboard operation
Face-Detection-JavaScript copied to clipboard

Detect expressions in frames

Open Bea98 opened this issue 6 years ago • 0 comments

Hi! I'm trying to evaluate the face expressions from a video without run it on the html. So I first started to divide the video into frames and now I'm trying to evaluate the expressions on ecah frame and just give the output of that. So this is my frame extarction function: function extractFramesFromVideo(){ let interval = 1 / 25; let currentTime = 0; while(currentTime < video.duration) { context.drawImage(video, 0, 0, w, h); var img = new Image(); img.src = canvas.toDataURL(); console.log(img); let base64ImageData = canvas.toDataURL(); frames.push(base64ImageData); console.log(currentTime) currentTime += interval; } tried to use your function of faceapi.buffertoImage() but it tells me that a blob is expected. Could you give ma any tips on how to detect expressions on the images?

Bea98 avatar Dec 10 '19 13:12 Bea98