I am new at Machine Learning and reading about it I wonder if it is possible (and convenient) to use decision trees to classify images.

For instance, to classify faces

  • 2
    $\begingroup$ Yes it's possible to use decision trees to classify images. However, your question is quite broad, can you provide some more context? What questions do you exactly want answered? $\endgroup$ Dec 5, 2019 at 19:17
  • $\begingroup$ Should it be a good choice to identify faces? $\endgroup$ Dec 5, 2019 at 19:39

2 Answers 2


If you're looking to classify faces, you can use decision trees, however, they are not expected to provide extremely good results. Why?

Images, and especially faces heavily rely on local relationships between features (i.e. pixels close to each other). Decision trees do not take this into account, and therefore, results may not be great, or may be heavily affected by noise.

Also, trees are powerful, but typically, they are useful when concise, which requires features to be meaningful. However, images have some of the least meaningful features out there (pixels)


Yes, you can use decision trees or random forests for this task and this was even the state-of-the-art approach until the early/mid 2010's. For example, here is a paper from 2010 in which exactly this was done. Nowadays, we use convolutional neural networks (CNN's) as they usually yield a higher accuracy and are more convenient to train, as long as you have a lot of images and decent computational ressources.

The most convenient thing about CNN's is that they implicitly create the features by themselves during the training process, while other machine learning techniques, e.g. decision trees, require you to create a set of features beforehand.

For example, in the referenced paper, the authors had to generate the local binary patterns of the images and then used them to train their decision tree. With a CNN they would have simply used the original images and would most probably got a higher accuracy. However, note that they would have needed more images to train a CNN than to train a decision tree.


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