bug cropping in data layer
Cropping an image the same size of the original results in a crash: I have created a leveldb where all the images have been resized to 227. In the data layer, I have defined the crop_size to be 227 as well. This results in a crash upon starting the training process : "Floating point exception (core dumped) When I chage the crop_size to 226 it runs fine. As a sanity check, changing it to 228 also crashes, but more gracefully, with a message about the datum size being incompatible with the crop size. Thanks, -Amir
I think the requirement is your crop size to be smaller than your image size. That is why when you have image size = 227, crop size >=227 it crashes. Try to resize the image to 256 and crop to 227. I think that is the standard AlexNet cropping.
Sounds a bit odd, what If I am interested in the entire image? Why do I need to "waste" one pixel on the crop? Or is there a way to avoid the cropping altogether?
If you don't want to crop, then don't set the crop field. https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto#L346-L347
On Fri, Mar 13, 2015 at 12:37 AM, Amir Rosenfeld [email protected] wrote:
Sounds a bit odd, what If I am interested in the entire image? Why do I need to "waste" one pixel on the crop? Or is there a way to avoid the cropping altogether?
— Reply to this email directly or view it on GitHub https://github.com/BVLC/caffe/issues/2019#issuecomment-78850028.