1
$\begingroup$

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?

$\endgroup$
2
  • $\begingroup$ The idea behind using images of certain sizes are based on how the architecture has been implemented. The minimum size ensures the results that are achieved is good. $\endgroup$
    – Nischal Hp
    Nov 16, 2017 at 14:20
  • $\begingroup$ Thanks for your answer @NischalHp. I was wondering if there was an explanation for the specific minimum size in this model (139px). All input equal or larger than 139px is accepted by the model, what exactly in this specific model makes it (potentially) perform poorly for 138px or smaller sized input? $\endgroup$
    – Robin
    Nov 16, 2017 at 14:28

1 Answer 1

0
$\begingroup$

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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