Fully convolutional network - different image sizes in training data

I am trying to simulate a fully convolutional neural network using Keras library, Tensorflow backend.

The problem I'm running into is feeding] different sized images in batches for the function model.fit()

. The training set consists of images of different sizes from 768x501 to 1024x760.

No more than 5 images are the same size, so grouping them by batch will not help.

Numpy allows you to store data as a single variable as a list. But model.fit()

keras model.fit()

throws an error when getting a list type training array.

I don't want to resize and lose data since I already have a very small dataset.

How do I get trained on this network?

+9


source to share


1 answer


I think Spatial Pyramid Pool (SPP) might be useful. Checkout this paper .

We note that SPP has several remarkable properties for deep CNNs:

1) SPP can generate fixed-length output regardless of the size of the input, while the sliding window pool used in previous deep networks cannot;

2) SPP uses multilevel spatial cells, while the sliding window pool uses only one window size. It is shown that a multilevel union is resistant to object deformations;

3) SPP can combine features extracted at different scales due to the flexibility of input scales. Through experiments, we show that all of these factors increase the recognition accuracy of deep networks.




yhenon

implemented SPP for Keras on Github .

0


source







All Articles