What format is the 'mean file' in?
...and do I need it for training on my own data?
The story is that I have about 1000 images of a particular fruit (positives), and I have about 1000 negatives images. (They are all RGB). Therefore, I have N = 2000 images in total. Let us assume that each image is of size c x w x h, where c is the number of channels, (3 because they are RGB), w is the width in pixels, and h is the height in pixels.
As a simple learning exercise I would like to take the "bvlc_reference_caffenet", lop off the beginning and the end layers in order to make my own deep network classifier. However, one thing that I noticed in the 'train_val.prototxt' was that they give a "mean_file", as such: mean_file: "data/ilsvrc12/imagenet_mean.binaryproto".
Thus my question is three fold:
- Do I really need a mean_file to train my samples?
- If I do, is it simply another image containing the mean value of every pixel, (ie, is it an
cxwxhsize image, where each pixel corresponds of all the mean values of all pixels from that location), OR is it simply 3 numbers, by which we subtract the red, green, and blue channels by? - Either way, where/what are the instructions for how I go about creating a mean.binaryproto file?
Thanks in advance.
Please ask on the caffe-users group and see the ImageNet example http://caffe.berkeleyvision.org/gathered/examples/imagenet.html. It is simply an "image" of mean values but even a mean pixel (single value per channel) can work just as well.
Did someone created a meanfile. Can you share the process? Thanks!
If you converted the training images to a lmdb file, just run
$<caffe installation folder>/build/tools/compute_image_mean <lmdb folder> mean.binaryproto