I am trying to use RestNet50 (keras). I want to execute it with several images
of varying sizes since the default size of ResNet50 is 224x244. I have tried to change the argument include_top
to False
but it still does not work.
Asked
Active
Viewed 4,744 times
1

Dan
- 59,490
- 13
- 101
- 110

Ali Jaddoa
- 11
- 1
- 4
-
Please include a [Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve) of your code so the problem can be reproduced. Please also include you full error. – CAta.RAy Oct 02 '18 at 16:26
1 Answers
1
You can use the preprocessing function included in applications.resnet50 as described here: preprocessing images generated using keras function ImageDataGenerator() to train resnet50 model
This will generate images form your inputs that are compatible with ResNet50
from keras.applications.resnet50 import preprocess_input
train_datagen=ImageDataGenerator(preprocessing_function=preprocess_input)
train_generator = train_datagen.flow_from_directory(directory, batch_size, shuffle=True, target_size, class_mode)

CAta.RAy
- 504
- 4
- 21
-
thank you for that, but what i want is " using include_top= False, so i can specify my input image not for training but got identifying. for example using input shape 200,200, 3 rather than the default (e.g. 224,224,3). – Ali Jaddoa Oct 03 '18 at 08:15