Resize and cropsize differences

2,988 views
Skip to first unread message

John Wilson

unread,
Sep 16, 2014, 4:57:16 AM9/16/14
to caffe...@googlegroups.com
Sorry for my novice questions... can someone shed light on this: in most network definitions prototxt files (like this),  I see crop_size to be 227 and new_width & new_height to be 256. Why not just specify a resize of the width and height to be 227 directly? Or is the 227 size used for doing the 10 crops automatically? Thank you.











John Wilson

unread,
Sep 18, 2014, 7:39:09 PM9/18/14
to caffe...@googlegroups.com
My appologies again for the basic question, I'm just learning the ropes - if anyone can point me in the right direction here, much appreciated! Thank you.

Jonathan L Long

unread,
Sep 18, 2014, 9:02:53 PM9/18/14
to John Wilson, caffe...@googlegroups.com
Look around https://github.com/BVLC/caffe/blob/master/src/caffe/layers/data_layer.cpp#L63 (in master; this has moved in dev).

The data layers first resize to 256 x 256, then take _random_ crops of size 227 x 227 (when training, as a form of data augmentation) or just the center crop (when testing).

JLL

--
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/8457016f-20e2-4a0e-be78-6f92bda59819%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages