Body: <p>I have a dataset in which the images which don't have the same width and height. How do I perform Image Classification with such images? I am trying as much as possible to steer away from image resizing because in my case it will lead to loss of important data/ give poor results.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-03-23T12:07:07.397Z
Comments.Text: check and if helpful upvote these answers on [fully convolutional networks](https://ai.stackexchange.com/questions/21810/what-is-a-fully-convolution-network) and [pyramid pooling](https://ai.stackexchange.com/questions/32300/best-practice-for-handling-letterboxed-images-for-non-fully-convolutional-deep-l)
Comments.UserDisplayName: Edoardo Guerriero
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-03-23T16:06:11.867Z
Comments.Text: @EdoardoGuerriero checked it out, but to no avail. Any ideas or help specific to my question?
Comments.UserDisplayName: skinnybb
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-03-23T16:35:23.347Z
Comments.Text: could you explain more in details the issue? Both fully convolutional networks and pyramid pooling were precisely designed to tackle the variable input size issue in neural networks so it's not clear to me what else constitute the problem aside from feeding variable sized images to a model.
Comments.UserDisplayName: Edoardo Guerriero
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-03-27T19:26:46.063Z
Comments.Text: @EdoardoGuerriero I will need a fully connected layer in my network since my network has to output probabilities for a specified number of labels. So I will need resize. But what are alternatives to resize, because sometimes resize can cause you to lose data.
Comments.UserDisplayName: skinnybb
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-03-28T06:40:31.020Z
Comments.Text: then again open and read the paper about pyramid pooling in the linked answer, it allows to map an image of generic size **without resizing or reshaping** to a dense layer of specified, fixed size.
Comments.UserDisplayName: Edoardo Guerriero
Tags: <deep-learning><computer-vision><image-recognition><data-preprocessing>
Title: How do I deal with a dataset of Images with variable sizes (width and height) when doing Image Classification?
UserDisplayName: skinnybb
ThreadText: # How do I deal with a dataset of Images with variable sizes (width and height) when doing Image Classification?
  
  (Asked by: username_0 on 2022-03-23)
  
  I have a dataset in which the images which don't have the same width and height. How do I perform Image Classification with such images? I am trying as much as possible to steer away from image resizing because in my case it will lead to loss of important data/ give poor results.
  
  **Tags:** deep-learning, computer-vision, image-recognition, data-preprocessing
  
  > **Comments:**
  > **username_1**: check and if helpful upvote these answers on [fully convolutional networks](https://ai.stackexchange.com/questions/21810/what-is-a-fully-convolution-network) and [pyramid pooling](https://ai.stackexchange.com/questions/32300/best-practice-for-handling-letterboxed-images-for-non-fully-convolutional-deep-l)  
  > **username_0**: @username_1 checked it out, but to no avail. Any ideas or help specific to my question?  
  > **username_1**: could you explain more in details the issue? Both fully convolutional networks and pyramid pooling were precisely designed to tackle the variable input size issue in neural networks so it's not clear to me what else constitute the problem aside from feeding variable sized images to a model.  
  > **username_0**: @username_1 I will need a fully connected layer in my network since my network has to output probabilities for a specified number of labels. So I will need resize. But what are alternatives to resize, because sometimes resize can cause you to lose data.  
  > **username_1**: then again open and read the paper about pyramid pooling in the linked answer, it allows to map an image of generic size **without resizing or reshaping** to a dense layer of specified, fixed size.  
  
  ---
  
  ## 0 answers
  
  