I'm using CNN, RNN and OpenCV to identify people and cars within images, once I identify several images I'm cropping them and dividing them in cars and people.

I would like to group all same-looking cars and all same-looking people. What would be the best approach to do so?

I'm recollecting these images from an IP camera, so I cannot base my code in colors, because the light is not the same when is day and night. Plus the cars aren't always looking at the same direction. I guess SVM would work nice, but I would need classify some data by hand first. I'm looking for something to make clusters of similar images without a supervising method.

Would something like k-means work?

  • 1
    $\begingroup$ I don't see why k-means wouldn't work. More importantly, what's the distance measure? $\endgroup$ – SmallChess Apr 13 '16 at 4:13
  • $\begingroup$ What do you mean by similar images than? Same shape? Check: pdfs.semanticscholar.org/d600/… $\endgroup$ – armatita Apr 13 '16 at 15:02
  • $\begingroup$ @StudentT I tried k-means but it has a lot of inaccuracy, different cars were groupped in same clusters. $\endgroup$ – Carlos C Apr 13 '16 at 15:05
  • $\begingroup$ @armatita Yes, shape, and color differences too. Because the camera doesn't see a car the same color at daylight and night. $\endgroup$ – Carlos C Apr 13 '16 at 15:07
  • $\begingroup$ If k-means didn't work immediately you may need to look at the structure of your CNN. This will decide what/how many features are used to cluster your data. $\endgroup$ – CatsLoveJazz Apr 14 '16 at 10:48

Try t-SNE (http://lvdmaaten.github.io/tsne/), it can help you group pictures that have the same properties via dimensionality reduction. You can see an example here http://cs.stanford.edu/people/karpathy/cnnembed/ where t-sne is applied on various imagenet samples.

This will group images with similar content close to each other (dogs near dogs, black dogs near black dogs...). However, if your black dog is yellowish because of the lighting, i suspect it will not be close to the same black dog under normal lighting condition. For that, maybe you can try black and white pictures? or add a black & white layer on top of your RGB input.

I did not experiment it myself, but you may also want to have a look at DeepBit http://www.iis.sinica.edu.tw/~kevinlin311.tw/cvpr16-deepbit.pdf "an unsupervised deep learning approach to learn compact binary descriptor for efficient visual object matching".


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.