A Node.js API for face comparison using TensorFlow.js and face-api.js.
- Node.js (v14.15.4) or (22.12.0) Tested on
docker build -t face-detection-api .
docker run -p 3000:3000 face-detection-api
- Run
npm installto install the dependencies - Run
npm startto start the server
- Install CUDA and cuDNN according to TensorFlow requirements
- Run
npm install @tensorflow/tfjs-node-gputo install GPU-enabled TensorFlow - Replace the TensorFlow import in script.js:
const tf = require('@tensorflow/tfjs-node-gpu');
- Run
npm startto start the server