Detecting a given face in a database of facial images I'm working on a little project involving the faces of twitter users via their profile pictures.
A problem I've encountered is that after I filter out all but the images that are clear portrait photos, a small but significant percentage of twitter users use a picture of Justin Bieber as their profile picture.
In order to filter them out, how can I tell programmatically whether a picture is that of Justin Bieber?
 A: You could use a method like eigenfaces, http://en.wikipedia.org/wiki/Eigenface.
The following has a good walk through of the procedure as well as links to different implementations. 
http://www.pages.drexel.edu/~sis26/Eigenface%20Tutorial.htm 
From here it is common to use this in a classification approach, train a model and then predict cases.  You could do this by training on a bunch of known celebrities and if you predict a face from twitter as one in your trained model of celebrities, remove it.  Similar to this http://blog.cordiner.net/2010/12/02/eigenfaces-face-recognition-matlab/
This suffers from constant amendments.  Soon there will be a new Justin Bieber that wont be in your trained model, so you cant predict it.  There is also a case like Whitney Houston, you may have never thought to add her before but she may be a common image out of respect and admiration for a few weeks.  You will not have the downside of baby pictures as mentioned above though.  To over come these problems you could use more of a hierarchical clustering approach.  Removing the first few sets of clusters that are very close if they reach a certain level of support, your first cluster has 15 items before a second is constructed.  Now you don't have to worry about whose in your training model but you will fall to the baby pictures issue.
A: If you want to do it yourself, I would recommend using Intel's free and open source OpenCV (CV for computer vision) project. 
http://opencv.willowgarage.com/
http://oreilly.com/catalog/9780596516130
A: A better idea might be to trash all images that appear in the feed of more than one user - no recognition needed.
A: You need to put on an algorithm detecting which person that picture is referring to. You can build a model based on different portrait pictures of famous personality and use classifiers to ensure that this picture is referring to one of your database picture. You need to use a certain classifier based on different parameters liked to the face, like distance between eyes or other parameters to rise up the accuracy of your model. 
There is also skin analysis.
The most important is to build a good classifier. This method can be vulnerable.
But there is also a very good project working on face recognition http://opencv-code.com/Opencv_Face_Detection
A: You could try locality sensitive hashing.
A: I have a feeling that http://www.tineye.com/commercial_api may be the solution here.
Simply throw the Twitter profile image to Tineye, see if it returns images (and associated URLs) that can clearly be identified (or automatically scored using simple word-count logic) as being related to (or of) that little sack of **.
Simples!
A: Since you are able to filter to only those that are clear portrait photos, I'm assuming you have some method of feature generation to transform the raw images into features that are useful for machine learning purposes.  If that's true, you could try to train a classification algorithm (there are lots of them: neural networks, etc.) by feeding the algorithm a bunch of known Bieber photos as well as a bunch of known non-Biebers.  Once you have trained the model, it could be used to predict whether a new image is Bieber or not.
This sort of supervised learning technique does require you to have data where you know the correct answer (Bieber or not), but those could probably be found from a Google image search.  It also requires that you have the right sorts of features, and I don't know enough about image processing or your algorithm to know if that is a major drawback.
