Open jamesclyeh opened 7 years ago
To me it looks like those commands are baked into the network loaded in forward. It does bgr to rgb, scaling, and mean subtraction.
Yes I guess that is true, but that may be because the network was trained when the mean subtraction was still there. If you train from scratch and save now, mean subtraction is probably not there.
How come cafe model uses the mean subtracted image, while tensorflow model uses the original image? caffe_model = load_caffe(img_p, layers) vs. o = sess.run(i, {images: img[np.newaxis, :]})
I dont see _imagenet_preprocess() being used anywhere
I think you may have unintentionally deleted image net preprocessing in this commit https://github.com/ry/tensorflow-resnet/commit/6b42dfa6983bab0a2c1220f48dd451a63b803032