Is the python interface the only way to get crop_param?

84 views
Skip to first unread message

Xin Li

unread,
Apr 25, 2016, 11:52:58 AM4/25/16
to Caffe Users
I am trying to reproduce the FCN models in the model zoo.
And it seems i need to use the python interface along with the python layer to define my network structure now, which is terribly not convenient!

I wonder is this the only way to calculate the crop_param? Is there any straight forward way i can get the crop_param of my network? And can i directly set the crop_param in prototxt?


Evan Shelhamer

unread,
Apr 25, 2016, 1:46:25 PM4/25/16
to Xin Li, Caffe Users
You can determine the crop parameters manually by calculating the coordinate relationships between the layers yourself, but that takes more time and is more error-prone than using the included `coord_map` Python module.

The `crop_param` fields are set in the usual way as shown in the example: https://github.com/shelhamer/fcn.berkeleyvision.org/blob/master/voc-fcn32s/train.prototxt#L491-L501

Likewise if you don't like having a Python data layer, you can make your own hdf5/lmdb/whatever but it's more work for you.

Evan Shelhamer





--
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/f2dfcd2a-4032-449c-975e-fdfe0889d46d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Xin Li

unread,
Apr 25, 2016, 11:57:05 PM4/25/16
to Caffe Users, lixin...@gmail.com
Thanks for your reply!

I'm still confused about some detail in calculating the crop_param. It seems the crop_offset has nothing to do with the exact spatial size of input?

Besides, i feel it's a little inconvenient to use the python interface to determine the network. For example,
(a)How to combine train.prototxt and val.prototxt into a single trainval.prototxt?
(b)What if a layer name has a dash mark? it becomes a minus sign in python.
(c)How to set mean_value for each channel in Data layer?

Currently, I need to use the python interface to get the crop_param, and then 'refine the prototxt' by myself, it's a little cumbersome.



在 2016年4月26日星期二 UTC+8上午1:46:25,Evan Shelhamer写道:
Reply all
Reply to author
Forward
0 new messages