Is it necessary to preprocess the images the same way as they were during the training of pretrained models in our finetuned model to use it for a different classification task ? Say, I have a pretrained VGG16 model which I am finetuning to use it for a different classification task ? Now, before feeding my dataset to this finetuned model, should I necessarily use vgg16.preprocess_input() for training on this dataset or I can use my own preprocess_input ?
If a network was trained let's say on centered input values (i.e. ranging from -1 to 1) with subtracted mean channel values computed on the ImageNet, it is desirable to keep this preprocessing to make fine-tuning easier.
From other hand, CNN sometimes can be surprisingly robust to this kind of input fluctuations and, unless you freeze the pre-trained part, can adapt to the changes in the input. So, if you just change mean channel values from default [103.939, 116.779, 123.68] to [128, 128, 128] this should work ok. Otherwise, just compare how the accuracy is improving during fine-tuning using the vgg16 preprocessing and your method.