2
$\begingroup$

I'm new to machine learning and need some help.

I need image classification to tell if an image is a car or not. Is there any working example or guidance or a book for this particular question? preferably in Java.

My problem is that those cars are in various orientations, have various sizes on pictures and are not always in center.

Thank you

$\endgroup$
3
  • 1
    $\begingroup$ Please narrow your question down. This is too broad to be answerable here. $\endgroup$ Commented Jul 15, 2015 at 13:54
  • $\begingroup$ I started recently working on this problem and I'm interested what are up to date algorithms and methods for solving it. I want to invest my time in right direction :) $\endgroup$
    – lasha
    Commented Jul 16, 2015 at 10:36
  • $\begingroup$ I see the question is quite old, but the problems you described are excellently handled by Convolutional Neural Network. In this link you can find a nice example of image classification with Tensorflow. It is in Python and uses a pretrained neural network. I do not know so much Java, but at this link you can find a tutorial about the installation of Tensorflow in Java. $\endgroup$
    – Jonny_92
    Commented Mar 24, 2023 at 11:36

1 Answer 1

4
$\begingroup$

As far as I can see there are two issues in your question.

First, the question of the classifier: learn a classifier to detect cars. This is typical image classification. I suppose you're dealing with supervised learning. What you might want to do is something like, given you training database: resize all your images, extract features from them - look for Sift features e.g. -, and learn a classifier - (kernerl) SVM, Logistic Regression, ...

On the other hand, you have a second issue which is: given a picture, is there a car inside. For this, you have to slide you image - sliding windows with different sizes -, resize those patches to match the input of your classifier, run the feature extraction on them and then classify them.

This is a very naive pipeline but it should get the work done pretty easily and fast. You can go much farther - especially for feature extraction! The fact that your cars can be rotated, of different sizes etc. should be dealt with the feature extraction (Sift is designed for those issues).

As for some java implementation, you will find implementations easily with the key words above on Google, I'm not afraid about this =) This library is quite good I think: http://java-ml.sourceforge.net/ but I would rather recommend if you can to use http://scikit-learn.org/stable/ on Python which is really a great machine learning library! (along with openCV, https://opencv-python-tutroals.readthedocs.org/en/latest/, for Sift extraction)

$\endgroup$
1
  • $\begingroup$ Thanks for your answer! I will follow this pipeline and see what i can make of it :). Thanks again! $\endgroup$
    – lasha
    Commented Jul 16, 2015 at 9:03

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