-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cropping the mean file #1928
Comments
It's true a lot has changed in the last release, which is why we're shooting for more gradual releases from here on. While the release notes are still coming in at #1849 you can look there for a list of changes with interface differences bolded. With regards to the new
In general this step tried to be less magic while keeping configurability. The coming switch to Re: what to do now about the mean, you could crop it yourself or I suggest taking the mean pixel as in the example. The mean pixel approach simplifies working with images of different size / aspect / resolution and has been shown to work for classification, detection, and segmentation. This is how the BVLC GoogLeNet was learned: https://github.com/BVLC/caffe/blob/master/models/bvlc_googlenet/train_val.prototxt#L13-L15. p.s. Historically the |
Thanks for the quick response, Evan. I had read through that list of changes before and didn't see anything about the mean pixel instead of mean image change. I'll have to look through that more carefully. |
I have the same problem with you, can you tell me have to fix it? Thanks in advance! |
As Evan said, you can look at the classification example Use this (note the mean(1).mean(1) at the end):
|
sorry, I am a beginner with Caffe and don't know how to write my python script yet, I met this problem when run the classify.py file with the 'bvlc_reference_caffenet.caffemodel'. So I need to change the variable in the classify.py file to 'mean=np.load(caffe_root + 'python/caffe/imagenet/ilsvrc_2012_mean.npy').mean(1).mean(1)'? |
Thanks a lot, Have fixed it! :) |
Today I faced this issue(Here is the SO Question) ! the irony is I did as Evan and @lukeyeager instructed! yet I keep getting the infamous error:
wouldn't work either and made me crop the mean file to get rid of that error. Update: |
Since the huge update, I'm having to fix lots of API changes with my python interfaces to caffe. How do I wade through the commit stream to find out what all needs to change?
This is my most recent problem. I try this:
And I get this error:
Apparently, the mean_file has to be cropped before passing it to the Classifier constructor now. How was I supposed to know that? I don't see it in any of these commits. And how am I supposed to do it? Should I be cropping it myself manually, or should I try to use Classifier.transformer.preprocess()?
The text was updated successfully, but these errors were encountered: