Skip to content

Final code for facial detection and recognition with face-api on live video/webcam

Notifications You must be signed in to change notification settings

robertbunch/face-api-webcam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Facial Recognition with JavaScript using face-api.js

To start up the app:

  1. run npm install in the root directory
  2. The final code uses self signed certificates. You'll need to make them (I do this in the video, or see below)
  3. run node on server.js
  4. go to http://localhost:5000

images in public were generated with fooocus. None are known to have any actual people in them

Loading 5 primary models

    await Promise.all([
        faceapi.nets.ssdMobilenetv1.loadFromUri('./models'),
        faceapi.nets.faceLandmark68Net.loadFromUri('./models'),
        faceapi.nets.faceRecognitionNet.loadFromUri('./models'),
        faceapi.nets.ageGenderNet.loadFromUri('./models'),
        faceapi.nets.faceExpressionNet.loadFromUri('./models'),
    ])

Stock photo I use for recognition (not useful for a match, but is an image for reference):

To use mkcert with this repo:

npm install mkcert mkcert create-ca mkcert create-cert Move the 4 certificates created into the certs folder

About

Final code for facial detection and recognition with face-api on live video/webcam

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published