TFJS port of InsightFace
Repository contains pretrained TFJS graph models for the following InsightFace variations
human-faceres
: included for reference, 6.7MB weightshuman-mobilefacenet
: included for reference, 5.0MB weightsinsightface-mobilenet-emore
: 6.7MB weights, 1.6ms avginsightface-mobilenet-swish
: 12MB weights, 3.0ms avginsightface-ghostnet-strides1
: 7.8MB weighs, 9.3ms avginsightface-ghostnet-strides2
: 7.7MB weights, 7.4ms avginsightface-efficientnet-b0
: 13MB weights, 9.8ms avg[1, 112, 112, 3]
cropped and normalized [0..1]
image of a face as inputDemo app in /src
uses Human
library to detect and crop faces from input images before running InsightFace
models to calculate face descriptors (embeddings)
And yes, you can use any other face detection method
GitHub repository is void of sample images, beforing running demo place any number of images of any resolution containing one or more faces into /assets/samples/
Use built-in dev server to compile sources and start a web server:
npm run dev
similarity
in (%) from raw distance
face.scale
per model