by pwdisswordfish9 · 4y ago · 0 comments
async function setup() {
await faceapi.tf.setWasmPaths('https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@3.12.0/dist/');
await faceapi.tf.setBackend('wasm');
await faceapi.tf.enableProdMode();
await faceapi.tf.ENV.set('DEBUG', false);
await faceapi.tf.ready();
const model = await set_and_get_filter('gigachad');
await faceapi.nets.tinyFaceDetector.load('./faceapi-models');
};Conversely, wasm can be transpiled to JS, and asm.js is also a thing.