Answers.Body: <p>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)</p>
  
  <p>It means that maybe you need also a more deeper network, and then, more computation.</p>
  
  <p>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.</p>
  
  <p>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 !</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-10T10:03:11.833Z
Answers.LastActivityDate: 2018-10-10T10:03:11.833Z
Answers.UserDisplayName: Jérémy Blain
Body: <p>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.</p>
  
  <p>Most examples out there use very small images.</p>
  
  <p>The image size seems large, but I not too sure. </p>
  
  <p>Any thoughts on the feasibility of 1mb images? If not what can I do to compress programmatically?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-10-09T15:07:14.770Z
Comments.Text: 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...)
Comments.UserDisplayName: Jérémy Blain
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-10-09T15:11:17.333Z
Comments.Text: @JérémyBlain Ah I see. Thank you, any idea of acceptable resolution size?
Comments.UserDisplayName: Nicholas Porter
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-10-09T15:13:45.133Z
Comments.Text: 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.
Comments.UserDisplayName: Jérémy Blain
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-10-09T20:55:54.673Z
Comments.Text: @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.
Comments.UserDisplayName: Nicholas Porter
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-10-09T21:49:16.987Z
Comments.Text: 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.
Comments.UserDisplayName: Nicholas Porter
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-10-10T07:14:23.593Z
Comments.Text: Yes, maybe for classes that are similar like trees, maybe the prediction on low resolution image affect the prediction a lot. I guess 336x252 is enough, though ! Imagenet, with a lot of classes which are similar (dogs for example) has images of resolution 224x224. As usual, in machine learning, you need to try to see the result ! good luck
Comments.UserDisplayName: Jérémy Blain
Tags: <convolutional-neural-networks><image-recognition><training><tensorflow><datasets>
Title: Is 1mb an acceptable memory size for images being trained in a CNN?
UserDisplayName: Nicholas Porter
ThreadText: # Is 1mb an acceptable memory size for images being trained in a CNN?
  
  (Asked by: username_0 on 2018-10-09)
  
  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?
  
  **Tags:** convolutional-neural-networks, image-recognition, training, tensorflow, datasets
  > **Comments:**
  > **username_1**: 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...)  
  > **username_0**: @JérémyBlain Ah I see. Thank you, any idea of acceptable resolution size?  
  > **username_1**: 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.  
  > **username_0**: @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.  
  > **username_0**: 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.  
  > **username_1**: Yes, maybe for classes that are similar like trees, maybe the prediction on low resolution image affect the prediction a lot. I guess 336x252 is enough, though ! Imagenet, with a lot of classes which are similar (dogs for example) has images of resolution 224x224. As usual, in machine learning, you need to try to see the result ! good luck  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-10-10. Score: 1 | Accepted answer
  
  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 !
  
  
  ---
  
  