FaceAPI: AI-powered Face Detection & Rotation Tracking, Face Description & Recognition, Age & Gender & Emotion Prediction for Browser and NodeJS using TensorFlow/JS
added face api packages (npm install). Including tensorflow
Invoked the api to load the models:
await faceapi.nets.ssdMobilenetv1.loadFromUri('/models')
And got the error:
Expected Behavior
It should have loaded the models.
**Environment
Windows 10. Nodejs. React application. Using VS code editor. Browser is chrome/Edge.
Module version?
Built-in demo or custom code? - custom
Type of module used (e.g. js, esm, esm-nobundle)? js
Browser or NodeJS and version (e.g. NodeJS 14.15 or Chrome 89)? - Node v14.13.1, Chrome Version 89.0.4389.90 (Official Build) (64-bit)
OS and Hardware platform (e.g. Windows 10, Ubuntu Linux on x64, Android 10)? Windows 10
Issue Description Getting the following error:
error - ./node_modules/@vladmandic/face-api/dist/face-api.esm.js:8:25031 Module not found: Can't resolve 'fs'
Steps to Reproduce create a nextjs application as given here:
https://nextjs.org/learn/basics/create-nextjs-app/setup
added face api packages (npm install). Including tensorflow Invoked the api to load the models: await faceapi.nets.ssdMobilenetv1.loadFromUri('/models')
And got the error:
Expected Behavior It should have loaded the models.
**Environment Windows 10. Nodejs. React application. Using VS code editor. Browser is chrome/Edge.
js
,esm
,esm-nobundle
)? jsAdditional
package.json