dmlc / mxnet-model-gallery

Pre-trained Models of DMLC Project
Other
266 stars 75 forks source link

Different pre-processing pipelines for different models? #13

Open jonbakerfish opened 8 years ago

jonbakerfish commented 8 years ago

I noticed that there are different image pre-processing pipelines for different models.

For Inception-BN, the images should be normalized with the mean_224.nd:

mean_img = mx.nd.load("Inception/mean_224.nd")["mean_img"]
normed_img = sample - mean_img.asnumpy()

For Inception-V3, the images should be:

normed_img = sample - 128.
normed_img /= 128.

For Inception-BN-21k, the images should be:

normed_img = sample - 117.

Am I correct with the above settings?