Influence of image size on CNNs

43 views
Skip to first unread message

Antonio Paes

unread,
Oct 10, 2016, 8:04:49 PM10/10/16
to Caffe Users
Hey guys, 

Is possible train my CNN without normalize the input image?

And following this line, the size of image has influence on accuracy? (disconsidering extreme cases like less then 14x14)

I'm doing some experiments changing the dimensions, one weird thing which happen when I don't use multiples of 2, I train and test the network with size 60x60, but in the test step the network inform which the shape of FC layer mismatch, but I chech both training and test architectures and is identical.

Ideas?


Thank you all.

Ketil Malde

unread,
Oct 11, 2016, 2:09:09 AM10/11/16
to Antonio Paes, Caffe Users

> Is possible train my CNN without normalize the input image?

(Normalize, as in subtracting the average?) I would think so, but I
don't think it is a good idea.

> And following this line, the size of image has influence on accuracy?

My take on this would be that higher resolution will have more detail,
which allows more accurate detection, but increases the complexity of
your network, and thus training times and overfitting risk.

> I'm doing some experiments changing the dimensions, one weird thing which
> happen when I don't use multiples of 2, I train and test the network with
> size 60x60, but in the test step the network inform which the shape of FC
> layer mismatch, but I chech both training and test architectures and is
> identical.

Either a bug in your config, or in caffe?

-k
--
If I haven't seen further, it is by standing in the footprints of giants

Antonio Paes

unread,
Oct 11, 2016, 8:25:52 AM10/11/16
to Caffe Users, ant....@gmail.com
Hi Keitil, 

When I say normalize i means normalize the size of image, for example I've a set of images with different resolutions, I want to train and test using that images without doing some resize to a specific size.

The second bug I fix that, the kernel size of pooling layers they were different,,.. huehue

Alex Orloff

unread,
Oct 13, 2016, 2:48:00 AM10/13/16
to Caffe Users, ant....@gmail.com
Caffe is resizing images automaticly.
And how do you want to use SAME network for different image sizes? Just in theory, do you have any idea?

Antonio Paes

unread,
Oct 13, 2016, 1:55:40 PM10/13/16
to Caffe Users, ant....@gmail.com
So, I'm thinking in something like train various networks using images of different sizes, and after that uses finetuning form each network to construct a final network, I don't know if this has some advantages, mainly because the pooling layers already do downsamling of the images, but i'm with this idea...
Reply all
Reply to author
Forward
0 new messages