Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Hi @KaimingHe ,
Experimentation seems to indicate the same preprocessing as used in VGG works?
def preprocess(img): VGG_MEAN = [103.939, 116.779, 123.68] out = np.copy(img) * 255 out = out[:, :, [2,1,0]] # swap channel from RGB to BGR out[:,:,0] -= VGG_MEAN out[:,:,1] -= VGG_MEAN out[:,:,2] -= VGG_MEAN return out
Now caffe's implemenation is Crop (img - mean) in data_transformer.cpp. With simple modification, the test phase can be done with Caffe's code.
MODEL_ORIGINAL_INPUT_SIZE = 256, 256
net = caffe.Classifier(
im = caffe.io.load_image(name)
but, we got following results.
our result is slight lower than yours.
Please, give me comments and advices.