Solved – Non-square images for image classification

conv-neural-network

I have a dataset of wide images: 1760×128. I've read though tutorials and books, and most of them state that input images should be square and if not, they are transformed to square in order to be trained in already trained (on square images) cnns.
Is there a way to train cnn for non square images, or should I look for another option as padding?

Best Answer

There are several ways to solve the problem depending on the classifier. Sliding Windows is the method I'm most familiar with, this is used for the neural network methods. This method involves taking a small sub-image and shifting it up and down with some overlaps. Some issues include finding the optimum shift parameters and multi scale-issues.

The final detection is usually determined by how confident the classifier is that each of the sub-images belong in that class: for example majority vote, total likelihood or total distance from the decision boundary. I have listed some material below, the first one is for the HOG classifier method but the concepts are the same.

  1. Object Detection Sliding Windows
  2. Object Category Detection: Sliding Windows
  3. OverFeat Integrated Recognition, Localization and Detection using Convolutional Networks
Related Question