Theoretical Computer Science Stack Exchange is a question and answer site for theoretical computer scientists and researchers in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If you go to FFFFOUND! and click on some image you will notice that on the new page, under the image, there is a section called "You may like these images." which suggests 10 images that look similar to the original.

What would be a good algorithm to achieve this functionality for a collection of images?

Any documentation, books, etc. related to such algorithms is very appreciated. Also algorithms for finding similar images that yield better results than those seen on FFFFOUND! website are also welcome.

share|cite|improve this question
Have you seen this StackOverflow post? – M.S. Dousti Nov 3 '10 at 10:52
@Robert: Let me clarify my previous comment. I've just been on FFFFOUND! for the second time. Looking at the similar images suggested, I see that in most cases such similarity is a very high-level semantic similarity, rather than a similarity in colors, brightness, contrast... (for example, on page 2 there is a picture of Barbie together with a picture of a McDonald restaurant at night). Discovering such abstract similarities involves many complex AI tasks (both low-level such as edge detection, and high-level such as knowledge representation and reasoning), it is probably AI-complete and, ... – Giorgio Camerani Nov 4 '10 at 11:08
@Robert: far as I know, it is out of reach for modern AI. That's why I suspected that the grouping of images on that site is based on something simpler such as tagging or (as Jeffrey suggested below) analysis of the users behaviour. – Giorgio Camerani Nov 4 '10 at 11:16
@Robert: You are most welcome. My personal sensation is that, if machines will be ever able to achieve complex intelligent behaviours like the one described above, this would be thanks to a combination of both low-level processing and high-level processing (see the Connectionism vs. Computationalism debate on Wikipedia). Wavelet Transforms would be certainly helpful for the low-level processing (the information they provide could be used as some of the inputs to higher level tasks such as shape detection, object recognition, object classification), but... – Giorgio Camerani Nov 4 '10 at 13:45
@Robert: ...I doubt they would solve the problem alone (of course, if you are looking for low-level similarities they could be enough to satisfy your needs). Trying to make progress on complex problems like that is a very broad affair, which spans over several topics (and which could be itself the subject of an entire PhD experience). Concerning that technique of scaling an image down to a small size, although certainly interesting, it is certainly very basic, too (what if you have 2 copies of the same image, the second being rotated 90 degrees?): it may work only for color similarities. – Giorgio Camerani Nov 4 '10 at 14:02

You could take a collective intelligence approach and try to determine similarity between various users based on their tastes of other images. If I like a bunch of images and another user likes majority of the same images, then it could be said that I will most likely like pictures the other user likes.

You might want to try and find information on Collaborative Filtering, Euclidean Distance/Pearson correlation (within the context of social networks.)

share|cite|improve this answer
Thank you. This turns out to be very useful. – please delete me Nov 4 '10 at 9:09

Depends on how you define similarity.

Two images may be similar in context. But that also depends on how you define the context.

Another metric of similarity may be some mathematical distance function such as euclidean distance.

I guess you want algorithms which categorize an image using some information about the context of the image, such as tags. The field of Machine Learning deals with this type of problem.

A more interesting approach, but much harder and not so well developed, is to also learn the tags. That also falls in the field of Machine Learning.

share|cite|improve this answer

One possible approach would be to see who has saved the image (below it) and use that as an algorithm for finding other images, similarly to how Facebook suggests friends.

Upon examination, my theory holds for a few elements.

share|cite|improve this answer

this is a recent breakthrough google research result where a large distributed network running stochastic gradient descent optimization (SGD) and working with unlabeled images (from random youtube videos and frames) was able to develop highly meaningful emergent feature detectors including facial recognition and other object recognition (cats, human bodies, etc). as the researchers note in the article, this was previously considered impossible by conventional wisdom. most prior experiments tend to focus on labelled data samples or supervised algorithms. note however the training phase is extremely CPU intensive.

it seems likely the technology will have wideranging applications in the future including eg, most basically, for detecting similarity of images, but with much more advanced possibilities such as for cutting edge problems in AI.

based on its operational similarity to an old biological evidence/observations/speculation sometimes referred to as "grandmother neurons" (ie high level "feature detectors") it is seen as not so merely "ad hoc" and may have some real relation to actual "algorithms" used by the human brain for image recognition (or perhaps even deeper or more general cerebral processing).

presented at ICML 2012: 29th International Conference on Machine Learning, Edinburgh, Scotland, June, 2012.

[1] Building High-level Features Using Large Scale Unsupervised Learning by Le et al

[2] How Many Computers to Identify a Cat? 16,000 by John Markoff/NYT

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.