Title: Keras different size images
Tags: python;tensorflow;keras;conv-neural-network
Question: I have a list of 670 different size RGB images(X_train)
tensorflow backend
X_train=[]
img = imread(path  + '/images/' + id_ + '.png')[:,:,:3]
X_train.append(img)
inputs = Input((None, None, 3))
results = model.fit(np.array(X_train), np.array(Y_train),
validation_split=0.1, batch_size=8, epochs=30)
Error when checking input: expected input_14 to have 4 dimensions, but
got array with shape (670, 1)
How can i use different size images with keras?
Thanks for any help.
Comment: Possible duplicate of [Can Keras deal with input images with different size?](https://stackoverflow.com/questions/39814777/can-keras-deal-with-input-images-with-different-size)

Comment: You can resize them to a specific size, i.e. the input size of your model.

Comment: yes, but it'll decrease iou, due to double resize(input and output)
and full conv models can work with different size images



{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 0, 'CommentCount': 3, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2018:00:04/05/18', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<python><tensorflow><keras><conv-neural-network>', 'Title': 'Keras different size images', 'ViewCount': 473, 'id': 49679602, 'user_AboutMe': None, 'user_AccountId': 13303270.0, 'user_DisplayName': 'Дмитрий Митюра', 'user_Reputation': 31.0, 'user_Views': 1.0, 'user_id': 9604044.0}}