I am writing a python classifier using the pre-trained models (MNIST and CIFAR10) available in Caffe.
I am following this tutorial:
For both classifiers, I will be feeding images (in png or pgm format most likely).
I am confused about the input preprocessing steps.
First, about the HWC->CHW, I know Caffe uses NCHW format, so is this transformation always needed?
Second, about the set_mean. I read that it improves classification accuracy in some cases, but is it true for all models?
How to know if this is needed?
Third, about the RGB->BGR swap. If I use a pre-trained model, how can I ensure if I need this transformation?
In the linked example, the caffemodel determines this. But how can I check this for the CIFAR model.
Also, I think this is not required for MNIST. Is that right?
The raw_scaling: I think I need to inverse this (scale images from 0 to 255 -> 0 to 1) because the models were by multiplying a scaling factor.
Thanks.