You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#PIL reads image in the form of RGB, while cv2 reads image in the form of BGR, mean_vec = [R,G,B]
mean_vec = np.array([123.68, 116.779, 103.939], dtype=np.float32)
mean_vec = mean_vec.reshape(1, 1, 3)
# Rearrange channels to form BGR
im = image[:, :, ::-1]
# Subtract mean
im = im - mean_vec
I think it's a typo, should read mean_vec = [B,G,R] becauase caffe.io.load_image loads image as RGB, then you transform it to BGR and then subtract the means.
The text was updated successfully, but these errors were encountered:
In the code
I think it's a typo, should read
mean_vec = [B,G,R]
becauasecaffe.io.load_image
loads image as RGB, then you transform it to BGR and then subtract the means.The text was updated successfully, but these errors were encountered: