These are two different things, detecting a face in a photo is different to recognising who it is.
Have you looked at facedetection.com
Using a web service might be a better option
Having thought about this a little bit more you should be able to use
a good example can be found at