I am using Tensorflow CNN to build an image classification/prediction model. Currently all the images in the dataset are each about 1mb in size.

Most examples out there use very small images.

The image size seems large, but I not too sure.

Any thoughts on the feasibility of 1mb images? If not what can I do to compress programmatically?

  • $\begingroup$ I don't heard of any network trained on high resolution images sized, but I guess it will be slow to train... Don't forget the more pixels you have, the more computation you need. (and maybe more deeper the network need to be, and so the computation time increase again...) $\endgroup$ Commented Oct 9, 2018 at 15:07
  • $\begingroup$ @JérémyBlain Ah I see. Thank you, any idea of acceptable resolution size? $\endgroup$ Commented Oct 9, 2018 at 15:11
  • 1
    $\begingroup$ I saw a paper (or an article) from google which stated that low resolution image are fine for prediction. I don't have the actual size, nor a good limit, but I think they resized image to a 32x32 size (or something similar) and the prdiction was actually almost the same. I don't remember the paper (or article) so I can't link it there, unfortunatly.... Think of the CIFAR dataset with 32x32 images size... it's enough for a good prediction, even for the 100 classes one. $\endgroup$ Commented Oct 9, 2018 at 15:13
  • $\begingroup$ @JérémyBlain Ok interesting. For example, I imagine for a model that does tree/plant specification where a lot of classes (leaves/trees) are similar yet completely different classifications, that reducing the image quality will most certainly have a detrimental effect on the quality of the model. Not entirely sure about that, just my intuition. I'll need to do more research. $\endgroup$ Commented Oct 9, 2018 at 20:55
  • $\begingroup$ I'm going to try and use image size of 336X252 and see how that performs. The image quality will certainly have a correlation to the training quality in the type of dataset I am using. $\endgroup$ Commented Oct 9, 2018 at 21:49

1 Answer 1


1 MB by images is too much. It means that you have a lot of pixels to compute in the inputs, and your images have more features that are not very useful for the classification (we human don't need high resolution images for recognize objects, it's the same for model)

It means that maybe you need also a more deeper network, and then, more computation.

In your particular case, you have a dataset of trees, so images are somewhat similar and then, maybe the classification is harder. So, images need enough information in pixels to have a good prediction.

You should resize your whole datsets to more common size because 1mb are too much (I don't know the resolution, but I think it could be around thousand for both dimension). Imagenet have images of size 224x224, and there are 1000 classes, which some of them are close. For examples, there are many dogs classes (boxer, american terrier, ...), cats classes (tiger, egyptian, ....), thus I think size of a few hundred would be enough. In your comment you said you will try with 336x252, I think it can be a good start. Of course you will need some experimentation in this regard. Maybe you can try to train some models in a few epoches with different image sizes, to see the best one, and keep it to train the model further !


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .