Face detection is a special case of Haar-wavelets, which are essiantially recognitions that can be 'trained' by reinforcing with positive and negative images.
OpenCV comes with some really well pre-trained Haar-wavelets for recognizing faces. http://opencv.willowgarage.com/wiki/FaceDetection