What format is the 'mean file' in?

171 views
Skip to first unread message

perceptor

unread,
Apr 11, 2015, 1:16:22 AM4/11/15
to caffe...@googlegroups.com

...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 ch, 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:

1) Do I really need a mean_file to train my samples?
2) If I do, is it simply another image containing the mean value of every pixel, (ie, is it an c x h size 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?  
3) Either way, where/what are the instructions for how I go about creating a mean.binaryproto file?

Thanks in advance.

Kevin Berney

unread,
Apr 16, 2015, 11:56:30 PM4/16/15
to caffe...@googlegroups.com
1. I believe it is good practice to have a mean_file which I believe has to do with baselining / normalizing the image set.

2. I honestly do not know the format,

3. but there is a a function in build/tools/ called compute_image_mean.  It takes as an argument an input_db which can created by convert_imageset

checkout the shell scripts in examples/cifar10/*.sh -- though they use what I can only assume are precursor functions which are example specific.

Kevin
Reply all
Reply to author
Forward
0 new messages