How to choose right offset value in crop layer

699 views
Skip to first unread message

Jiu XU

unread,
Apr 19, 2016, 9:49:58 PM4/19/16
to Caffe Users
Does anybody know how to select proper offset value in crop_param, like:

layer {
name: "score"
type: "Crop"
bottom: "upscore"
bottom: "data"
top: "score"
crop_param {
axis: 2
offset: 19
}
}

I though it is applied for keeping aspect ratio, but cannot find out how to calculate it based on input and output sizes.


Carrie Li

unread,
Apr 26, 2016, 10:07:09 AM4/26/16
to Caffe Users
I am new to FCN and I don't understand the crop layer, but I think you could refer to the Python script "net.py" on https://github.com/shelhamer/fcn.berkeleyvision.org .

Jiu XU

unread,
Apr 27, 2016, 7:31:48 AM4/27/16
to Caffe Users
Hi Li

Thanks for the reply. I've checked the script you mentioned, but still not clear about how to get offset value calculated.

在 2016年4月26日星期二 UTC+9下午11:07:09,Carrie Li写道:

Carrie Li

unread,
May 3, 2016, 5:32:48 AM5/3/16
to Caffe Users

You should write your own net.py according to your demand, then run it , you will get the train.prototxt and val.prototxt with the offset value in crop layer.

在 2016年4月27日星期三 UTC+8下午7:31:48,Jiu XU写道:

Jiu XU

unread,
May 7, 2016, 6:33:53 AM5/7/16
to Caffe Users
Thanks for the reply.

I got the value the way as you mentioned, just cursious about how to calculate the offset.
For example, choosing offset=31 for cropping 440x568 into 366x500 in FCN 8s.

 

在 2016年5月3日星期二 UTC+9下午6:32:48,Carrie Li写道:
Reply all
Reply to author
Forward
0 new messages