Update ilsvrc_2012_mean.mat to W x H x C, update demo and add comments#2527
Merged
shelhamer merged 1 commit intoBVLC:masterfrom May 30, 2015
Merged
Conversation
Merged
0d2682b to
a399dea
Compare
Member
Author
|
It seems that travis install failed It seems that travis failed to download |
a399dea to
cb3cb25
Compare
Member
|
@ronghanghu it was probably a passing network issue. I just toggled the PR to re-trigger the tests -- not that this PR should change the results anyway. |
Member
Author
|
@shelhamer But I cannot download the LMDB in travis_install.sh either from my laptop or kraken machine. There seems to be something wrong with it. Maybe http://www.openldap.org/ is under maintenance at this moment. Update: the link above seems to have resurrected a few minutes ago |
cb3cb25 to
fd4ab97
Compare
Merged
Update previously ilsvrc_2012_mean.mat stores 'image_mean' variable in H x W x C with BGR channels, which is inconsistent with Caffe's data format and inconsistent with caffe.io.read_mean(..). Replace 'image_mean' with 'mean_data' variable in W x H x C and update classification_demo.m. Also add some comments.
fd4ab97 to
97b4c14
Compare
shelhamer
added a commit
that referenced
this pull request
May 30, 2015
switch ilsvrc_2012_mean.mat to W x H x C, update demo and add comments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses #2505 (comment)
In MatCaffe, there are currently two (conflicting) ways to load mean:
image_meanvariable in height x width x 3, BGR channels. This is inconsistent with the way caffe stores data (WxHxCxN in Matlab).caffe.io.read_mean('./data/ilsvrc12/imagenet_mean.binaryproto'), which is also inherited from old wrapper, returnsmean_datain width x height x 3 (also BGR channels), which is consistent with the way a caffe's blob stores data.The inconsistency in ilsvrc_2012_mean.mat is very likely to confuse users when doing mean subtraction. Although this issue also existed in the old Matlab wrapper, it should be addressed somehow.
So this PR permute height and width in caffe/matlab/+caffe/imagenet/ilsvrc_2012_mean.mat, use a new variable name
mean_datainstead ofimage_meanin that file, and update classification_demo.m. Also, some comments are added in classification_demo.m and io.m (and also handle grayscale images).