Looks like it can accept images of any scale,but i always think keras model inputsize must be determined before i set up model。 When using model prediction,i usually resize the image,but i did not found where this code resize the image,could you tell me why?or where resize the image?
You can set some input dimensions to None which lets Keras know that this dimension can take an arbitrary value. This way you can use for example different image sizes. For the resizing part - this is done in the keras_retinanet.preprocessing.generator.
@Cre1th I see the code set like this:inputs = keras.layers.Input(shape=(None, None, 3))
I don't understand how ResNet50's weights work for images of different sizes. Does the image of different sizes have the same number of model parameters?
i
@CedarYang We are talking about convolutions. So only a kernel is used e.g. 3x3. So you need only 9 weights for every channel no matter how big your image is. And because the number is only depended on the channel number which you have to specify it (3=bgr colors). If you would use a fully connected layers you would need to specify widht and height as well. For more info take a look at cs231n.
@jonla1 For convolutions layers, the width and height of input image could be none. However, the classify subnet and the bbox subnet use fully connected layers, how the model deal with the different image size?
thank you.
See your issue #914. Please do not add duplicates.
Most helpful comment
@CedarYang We are talking about convolutions. So only a kernel is used e.g. 3x3. So you need only 9 weights for every channel no matter how big your image is. And because the number is only depended on the channel number which you have to specify it (3=bgr colors). If you would use a fully connected layers you would need to specify widht and height as well. For more info take a look at cs231n.