<p>I think <em>Spatial Pyramid Pooling (SPP)</em> might be helpful. Checkout this <a href="https://arxiv.org/abs/1406.4729" rel="nofollow noreferrer">paper</a>.</p>

<blockquote>
  <p>We note that SPP has several remarkable properties for deep CNNs: </p>
  
  <p>1) SPP is able to generate a fixed-length output regardless of the input size, while the sliding window pooling used in the previous deep networks cannot;</p>
  
  <p>2) SPP uses multi-level spatial bins, while the sliding window pooling uses only a single window size. Multi-level pooling has been shown to be robust to object deformations;</p>
  
  <p>3) SPP can pool features extracted at variable scales thanks to the flexibility of input scales. Through experiments we show that all these factors elevate the recognition accuracy of deep networks.</p>
</blockquote>

<p><br>
<code>yhenon</code> has implemented <a href="https://github.com/yhenon/keras-spp" rel="nofollow noreferrer">SPP for Keras on Github</a>.</p>
Fully convolutional network - different size of images in training data
<p>I am trying to model a fully convolutional neural network using the Keras library, Tensorflow backend. </p>

<p>The issue I face is that of feeding ]differently sized images in batches to <code>model.fit()</code> function. The training set consists of images of different sizes varying from 768x501 to 1024x760. </p>

<p>Not more than 5 images have the same dimensions, so grouping them into batches seems to be of no help. </p>

<p>Numpy allows storing the data in a single variable in list form. But the keras <code>model.fit()</code> function throws an error on receiving a list type training array. </p>

<p>I do not wish to resize and lose the data as I already have a very small dataset. </p>

<p>How do I go about training this network?</p>