Clutch

face-api.js  is a JS API for face recognition

face-api.js  is a JS API for face recognition
Average rating: 0
(0 votes)

Facial Recognition APIs are becoming very popular, and for good reason! Computers have never been able to detect human faces as well as they can today, so selecting the best one for your app is important. We can offer you something. face-api.js  is a JS API for face recognition that you will definitely like!

For face detection, this project implements a SSD (Single Shot Multibox Detector) based on MobileNetV1. The neural net will compute the locations of each face in an image and will return the bounding boxes together with its probability for each face. This face detector is aiming towards obtaining high accuracy in detecting face bounding boxes instead of low inference time. The size of the quantized model is about 5.4 MB.

  • The Tiny Face Detector is a very performant, real-time face detector, which is much faster, smaller and less resource consuming compared to the SSD Mobilenet V1 face detector, in return it performs slightly less well on detecting small faces.
  • MTCNN (Multi-task Cascaded Convolutional Neural Networks) represents an alternative face detector to SSD Mobilenet v1 and Tiny Yolo v2, which offers much more room for configuration.
  • For face recognition, a ResNet-34 like architecture is implemented to compute a face descriptor (a feature vector with 128 values) from any given face image, which is used to describe the characteristics of a persons face.
  • The face expression recognition model is lightweight, fast and provides reasonable accuracy. The model has a size of roughly 310kb and it employs depthwise separable convolutions and densely connected blocks.
  • We can use the equivalent API in a nodejs environment by polyfilling some browser specifics, such as HTMLImageElement, HTMLCanvasElement, and ImageData. The easiest way to do so is by installing the node-canvas package. Alternatively, you can simply construct your own tensors from image data and pass tensors as inputs to the API.

Feel free to check it here by yourself.

By the way, if you are interested in the functional reactive programming, meet the RxJS launchpad!

Find more about cool repositories we selected in our Monthly JS digest from March 13!

Rate this article, if you like it

Thanks! You’ve rated this material!

Got a project? Let's discuss it!

*By submitting this form you agree with our Privacy Policy.

Mailing & Legal Address

Syndicode Inc. 340 S Lemon Ave #3299, Walnut CA, 91789, USA

Visiting & Headquarters address
Kyiv Sofiivska 1/2a, 01001, Kyiv, Ukraine
Dnipro Hlinky 2, of. 1003, 49000, Dnipro, Ukraine
Email info@syndicode.com
Phone (+1) 9035021111