OpenCV
4.0.0-beta
Open Source Computer Vision
|
This tutorial will show us how to run deep learning models using OpenCV.js right in a browser. Tutorial refers a sample of face detection and face recognition models pipeline.
Face detection network gets BGR image as input and produces set of bounding boxes that might contain faces. All that we need is just select the boxes with a strong confidence.
Network is called OpenFace (project https://github.com/cmusatyalab/openface). Face recognition model receives RGB face image of size 96x96
. Then it returns 128
-dimensional unit vector that represents input face as a point on the unit multidimensional sphere. So difference between two faces is an angle between two output vectors.
All the sample is an HTML page that has JavaScript code to use OpenCV.js functionality. You may see an insertion of this page below. Press Start
button to begin a demo. Press Add a person
to name a person that is recognized as an unknown one. Next we'll discuss main parts of the code.
128
-dimensional unit feature vector by input face image.