Closed colemakdvorak closed 5 years ago
+1, great find colemakdvorak!
Hey @colemakdvorak,
This issue is a bit tricky. The code you've linked to actually just configures the transformation.
If you look at the caffe transformer implementation you can see that the channels are swapped before subtracting the mean.
Hi,
Just pointing out something I came across while I was reading the code. The image representation is converted from RGB to BGR, but the VGG_MEAN vector that contains the mean pixel value of dataset is in order of RGB.
For reference, the original implementation by Yahoo converts from RGB to BGR after mean normalization.
However, the image loader here scales the mean after reordering the channel. So the R and B values were being subtracted by means of B and R respectively. This is a fix that corrects this behavior.