Skip to content
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

mean.binaryproto file ambiguity #9

Closed
FrancescoBoi opened this issue Oct 24, 2018 · 2 comments
Closed

mean.binaryproto file ambiguity #9

FrancescoBoi opened this issue Oct 24, 2018 · 2 comments

Comments

@FrancescoBoi
Copy link

I am looking at the model CNRPark-Trained-Models/mAlexNet-on-CNRPark.

It contains the file mean.binaryproto. Loading this file in Python I see it is an array of dimensions: 3x256x256. Does it contain the means of each pixel for all the three channels? If not how to interpret it?

Are the channels in the RGB or BGR format? I could not find any description of it.

It is better in my opinion to save the means in another format since there might be compatibility issues when importing in other frameworks rather than caffe: OpenCV in C++ can load the caffemodel and proto files but not the mean file mean.binaryproto.

Any help will be appreciated.

@fabiocarrara
Copy link
Owner

The zip files have been generated by DIGITS and thus can be imported easily in DIGITS again.
DIGITS relies on Caffe helper binaries, thus the mean file conforms with the format usually adopted by Caffe models: it's a BGR mean image (each pixel is the mean pixel over the training set).

This mean file is automatically included in the zip file when exporting the model to zip file with DIGITS.
However, we did not use mean subtraction when training our models. Thus, you can ignore that file if you want to reproduce our experiments or deploy our trained network.

For completeness, here you can find how to convert binaryproto files to numpy or other Python-friendly formats by using the pyCaffe interface.

@FrancescoBoi
Copy link
Author

So it is the array containing the mean for each pixel and no mean subtraction has been performed on the training set but the file was automatically generated.

Thank you so much for you quick reply and clarification.
Kind regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants