Is it possible to use "mean_value" attribute with "ImageData" Layer?

626 views
Skip to first unread message

Saeed Izadi

unread,
Oct 29, 2015, 12:55:04 PM10/29/15
to Caffe Users
Hi, 
I want to use ImageData layer for parsing my own dataset and I have channel-wise mean_value for my dataset. As I see in caffe.proto, ImageData layer only supports "mean_file". Is there any way to use mean_value in ImageData layer?

Evan Shelhamer

unread,
Oct 29, 2015, 4:46:28 PM10/29/15
to Saeed Izadi, Caffe Users
The ImageData layer makes use of the same TransformationParameter field as DataLayer: https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto#L396-L417. The old `mean_file` field was deprecated: https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto#L695-L699

The flickr fine-tuning example uses `transform_param`: https://github.com/BVLC/caffe/blob/master/models/finetune_flickr_style/train_val.prototxt#L10-L14 and you can replace `mean_file` with `mean_value` instead like in this example: https://github.com/BVLC/caffe/blob/master/models/bvlc_reference_caffenet/train_val.prototxt#L15-L22

Evan Shelhamer



On Thu, Oct 29, 2015 at 9:55 AM, Saeed Izadi <saeed.i...@gmail.com> wrote:
Hi, 
I want to use ImageData layer for parsing my own dataset and I have channel-wise mean_value for my dataset. As I see in caffe.proto, ImageData layer only supports "mean_file". Is there any way to use mean_value in ImageData layer?

--
You received this message because you are subscribed to the Google Groups "Caffe Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to caffe-users...@googlegroups.com.
To post to this group, send email to caffe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/caffe-users/1f2e0ef8-fcde-44db-8e4f-5c257e3ee70b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Beatriz G.

unread,
Feb 27, 2017, 6:31:51 AM2/27/17
to Caffe Users, saeed.i...@gmail.com
Hi.

I am learning how caffe works, and I would like to transofrm my input data in the following way: (x-128)/160, So my data would be in [-0.8, 0.8] range.

For reading the data, I use Data layer because my input data is leveldb. I think that I should use as transform_params: scale=1/160 and mean_value=0, but I am not sure if it is OK.

Thank you for you help.

Regards.

Beatriz.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages