deep-learningconv-neural-networkresnetimagenetrescale

Is image rescaling between 0-255 needed for transfer learning


I am working on a classification task using transfer learning. I am using ResNet50 and weights from ImageNet.

My_model = (ResNet50( include_top=False, weights='imagenet', input_tensor=None,
    input_shape=(img_height, img_width, 3),pooling=None))

I didn't rescale my input images between 0-255 but my result is quite good (acc: 93.25%). So my question is do I need to rescale images between 0-255? Do you think my result is wrong without rescaling between 0-255?

Thank you.


Solution

  • No basically your result is not wrong. to give a clue on that, we standardize the pixels values to a range between (0 and 1) just to avoid resulting big values during the calculus in the forward propagation z = w*x + b and then the backward propagation.

    Why we do that ?

    I develop, the optimization algorithm is definitely dependent on the result of the backward prop, so when we start updating our optimization algo with big values of weights/bias, then we need then a lot of epochs to reach the global minimum.