I'm having trouble classifying images using a random forest.

The images all have a very similar scale, but they may be rotated arbitrarily around a fixed point in the image.

The core problem is that the images of the test set vary somewhat from the training images. But in this case, it is crucial to train based on the given training set and to test it on the given test set(!).

It's thus easily concluded that, I "simply" need a very robust random forest.

The classes are:

  • class 0: images that show an certain plane part (the inside of the engine)
  • class 1: images that don't show that part

My learners (node functions) are simple intensity comparisons, that check if a pixel value is lower than another pixel value in the same image:

  • I(u1,v1) < I(u2,v2) -> true/false

My current configuration is:

  • supervised learning, all class lables available
  • number of positive samples: 100 000
  • number of negative samples: 100 000
  • image size: 160x120
  • tree depth = 6
  • number of trees: 400

Do you have any suggestions for me?

  • 1
    $\begingroup$ Perhaps try a covnet instead of a random forest: github.com/fchollet/keras/blob/master/examples/cifar10_cnn.py $\endgroup$ – Zach Jan 12 '16 at 15:27
  • $\begingroup$ Since the RF is working good but not good enough, I think some tuning should do it. If possible I'd prefer not switching the classifier! $\endgroup$ – S.H Jan 12 '16 at 15:35
  • 2
    $\begingroup$ Try more trees (e.g. 4,000), deeper tress, and tuning the mtry parameter (or number of variables considered per split). Test all these parameters out of sample. $\endgroup$ – Zach Jan 12 '16 at 15:36
  • $\begingroup$ What means "Test all these parameters out of sample"? $\endgroup$ – S.H Jan 12 '16 at 15:45
  • 1
    $\begingroup$ @also try different numbers of candidate features at each split. $\endgroup$ – Zach Jan 13 '16 at 16:25

Your Answer

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

Browse other questions tagged or ask your own question.