I seem to have a problem modelling my CNN network. I want to extract from features vector from different sized images. Whats consistent with the images is the y-axis, and the color dimension, but the x-axis is not constant. Depending on the length of the x-axis will the length of the feature vector also be altered. I already know how long they should be, but not the ratio between the length of the x-axis and length of the feature vector, I guess one does exist. Is it possible to train a CNN network such that it can alter the feature vector length depending on the length of the input of the x-axis of the image?
Problem designing CNN network
convnet;keras
It is not really possible to alter input feature array size per example on normal CNNs. Instead this is fixed when the model is built for the first time, before you start training.Depending on your goal, it might be possible to work around that using some kind of pipeline that worked with image patches (taking multiple slightly randomised patches to augment the training data can improve results and doing the same with prediction inputs can also drive up classifier accuracy). Or a more complex variant using RNN/CNN hybrid to consume an image as a sequence of parts, which might also be used for multi-object recognition.However, these solutions are complex, and state-of-the-art results in image classification can be achieved by simpler techniques such as taking a centre crop and/or padding. Provided your training data is also treated the same way, and aspect ratios are not extreme this can work adequately.