Caffe Croping Layer

28 views
Skip to first unread message

Somayyeh Ataei Kachouei

unread,
Aug 14, 2017, 3:36:56 AM8/14/17
to Caffe Users
Hi everybody!

What is the difference between using a caffe crop layer in network or just set crop_size for transformation_param in data layer?? the same question for caffe mirroring layer??

thanks, inadvance

Jonathan R. Williford

unread,
Aug 14, 2017, 4:23:55 AM8/14/17
to Somayyeh Ataei Kachouei, Caffe Users
Not all data layers will necessarily have the transformation_param (especially custom python layers). In these cases, it can be helpful having access to separate layers that can perform the transformations.

Best,
Jonathan

--
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+unsubscribe@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/3e744529-04e3-4a9d-a47e-d7fc0752da98%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Somayyeh Ataei Kachouei

unread,
Aug 14, 2017, 5:53:40 AM8/14/17
to Caffe Users, somayye...@gmail.com
thanks Jonathan,

but there is a big difference in run time for me, for a net with just set crop_size it run for 20 minute but for a net with crop layer it get about 5 hours, both on GPU.


On Monday, August 14, 2017 at 12:53:55 PM UTC+4:30, Jonathan R. Williford wrote:
Not all data layers will necessarily have the transformation_param (especially custom python layers). In these cases, it can be helpful having access to separate layers that can perform the transformations.

Best,
Jonathan
On Mon, Aug 14, 2017 at 9:36 AM, Somayyeh Ataei Kachouei <somayye...@gmail.com> wrote:
Hi everybody!

What is the difference between using a caffe crop layer in network or just set crop_size for transformation_param in data layer?? the same question for caffe mirroring layer??

thanks, inadvance

--
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.

Jonathan R. Williford

unread,
Aug 14, 2017, 3:23:55 PM8/14/17
to Somayyeh Ataei Kachouei, Caffe Users
That definitely doesn't sound right. Would you mind sharing the prototxts? Are you needing to use the crop and/or mirror layers, or are you just curious?

Best,
Jonathan

To unsubscribe from this group and stop receiving emails from it, send an email to caffe-users+unsubscribe@googlegroups.com.

To post to this group, send email to caffe...@googlegroups.com.

Jonathan R. Williford

unread,
Aug 15, 2017, 7:24:59 AM8/15/17
to Somayyeh Ataei Kachouei, Caffe Users
Actually, there is a pretty big difference between the two. The transformation_param performs random cropping (a form of data augmentation). The CropLayer performs cropping with a predefined position (specified by offset). I don't think the latter can perform random cropping.

The documentation for these are mainly in caffe.proto.

You can read the docs of the CropLayer at:
in the prototxt quoted section. Make sure you understand what the first and second bottom blobs do.

The details of the Transformation param can be found at or around:

Jonathan

To unsubscribe from this group and stop receiving emails from it, send an email to caffe-users+unsubscribe@googlegroups.com.

To post to this group, send email to caffe...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages