Currently there is no pure JavaScript library performing face recognition. Real time face detection however is possible using one of the following libraries:
-
For face and face element detection as well as object detection in general, you could use js-objectdetect or tracking.js which include ports of the OpenCV object detector based on Haar-like features. Also consult this performance comparison chart for ten popular JavaScript face detection libraries.
-
The very first face detection algorithm on the web found in ccv also deserves a mention. Its SURF classifier is fast but not very reliable.
-
The headtrackr library used for face tracking might also be of interest since it implements the camshift algorithm found in OpenCV. Also have a look at clmtrackr of the same author.