I've been working on integrating TensorFlow Facemesh into my Angular application. After importing all the necessary modules and experimenting with different models, I am currently using:
import * as tf from '@tensorflow/tfjs';
import * as facemesh from '@tensorflow-models/facemesh';
The function causing issues is as follows:
const faceEstimate = await model.estimateFaces(video));
console.log(faceEstimate);
The exact error that I'm encountering is:
(in promise): TypeError: t.toFloat is not a function
TypeError: t.toFloat is not a function
at facemesh.esm.js:17
I am using Angular 10 for this project. Any assistance would be greatly appreciated.
Update: I also attempted to use a Different Model with MediaPipe, but unfortunately encountered the same error.