1
$\begingroup$

I wasn't sure where to ask this question so forgive me if the question seems out of place (and please guide me where to ask it !)

I have an archive of 9GAG images and I want to Cluster them based on their content and their similarity... 9GAG images are mostly memes so it's natural that you'd find many of them pretty similar to each other...

I couldn't find any application which does this out of the box (if there is, could you please refer me to it ?) and what I found was a vast number of Papers about Image Clustering but no real application based on them...

I was wondering if there is a Ruby, Python or Java Program which could simply get the directory of the Images and Cluster them into groups (folders) based on their Similarity to each other ?

Thank you very much...

$\endgroup$
1
$\begingroup$

I would impressed if there is already a dedicated 9gag clustering :P

However, you can read this blog post about Hierarchical clustering in Python for images, which is close to what you want. The problem is that the author uses the average color of the image as a feature and it could proved crude and not inefficient. You may find something more interesting to use. But in the end, you need to experiment a lot with your own dataset.

$\endgroup$
  • $\begingroup$ Thank you... Your resource seems to be good enough... haven't got the time to implement it yet but it seems at least applicable enough... I wish there was a clean and ready code just for some simple Image Clustering... $\endgroup$ – Cypher Dec 5 '15 at 8:56
  • $\begingroup$ @Cypher You can download the code of the article directly from there. There is a link in the first paragraph. However, I wouldn't expect a cleaner or simpler code, since clustering images is not the most trivial task. $\endgroup$ – Tasos Dec 5 '15 at 9:01
1
$\begingroup$

Extract color histograms from each image. Then cluster them with ELKI, which has a number of relevant similarity measures for images, such as histogram intersection distance. Maybe start with hierarchical clustering first, then also try OPTICS.

$\endgroup$
  • $\begingroup$ Thanks... but i was really hoping for a piece of code or a software bundle... guess I have to do it myself... but isn't it curious that there is no single free application out there to do some simple Image Clustering (even based on some simple features such as color ?!) $\endgroup$ – Cypher Dec 5 '15 at 8:55
  • $\begingroup$ Maybe it is not as simple, or not as useful? $\endgroup$ – Anony-Mousse Dec 5 '15 at 11:25
0
$\begingroup$

I guess classification is a better term here. One idea would be to calculate histogram of an image. Make 32 bins from the histogram. So if an image has Red, Blue, Green channels, each having 256 values, you will get a vector of 32*3=96 dimensions. You can run SVM or Naive Bayes on it.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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