Use this Javascript via HTML5 Canvas to identify a face within an image:
The algorithm is implemented on top of a JS port of a C-based computer vision library by the same author. It works off a grayscale version of the image, and seems to be quite reliable in detecting faces in photographs.
The demo then draws a red box around each face in the picture, but the library could be used to do much more interesting things with this data.
It’s on github for your use!