What is the reason behind the minimum image size in the Keras InceptionResNetV2 model?

In Keras' documentation for the InceptionResNetV2 model, it says the following:

input_shape: (...). It should have exactly 3 inputs channels, and width and height should be no smaller than 139.

I'm trying to figure out the reason behind the minimum size of 139px for this model, because I'm looking to train this model on smaller images (128px for starters).

I can't find any clues in the model's source code or in the paper which describes the model.

Assuming this number is not arbitrary, what is the reason behind this minimum size of 139px?

Topic inception keras convolutional-neural-network

Category Data Science


So here's the schema for inception resnet v1(basically the same thing as V2). You can see that in the input layer the image size starts at 299x299. By the time it reaches Inception-resnet-C it has been reduced to 8x8 because of all of the convolution and pooling layers it went through. Now if you input smalled images that final layer will decrease from 8x8 to like 5x5 or something. Eventually there is an image size that will start being reduced to 0x0 which just breaks the model.So I imagine at 139x139 you start having layers that output 0x0. If you really want to use inception resnet v2 you would have to go through and change all of the the kernel sizes so that they work with that image size. That is way to time consuming though so I would just zero pad your image to be atleast 139. It's a really good model so I think you would still see good results.

Inception ResNet V1 schema

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.