Answers.Body: <p>"The problem here is that if i use the whole image when training, my model will not learn that the interest area is only in the center of the image" <strong>Yes, it will, if you have enough samples and they are all classified based on this area only</strong>.</p>
  
  <p>"but on the other hand if i crop the images to be of size 32x32 i am loosing a lot of information which can help the model to train on" . I don't understand what information you are loosing if you only care about the center 32x32 area.</p>
  
  <p>In the end, you need to ask yourself how will the test input look like and work based on that. If you only care about an area of 32x32 which is always is (and will be) at the center of all images, ignore everything and train and evaluate based just on that area (why add extra unnecessary calculations to the model?). If the size and location of the area might change, don't crop the image.</p>
  
  <p>Bottom line, the test set and the train set need to be of the nature (shape) for the model to work properly.  </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-31T15:14:29.930Z
Answers.LastActivityDate: 2018-12-31T15:14:29.930Z
Answers.UserDisplayName: Mark.F
Body: <p>I have the following binary classification problem, my labeled dataset contains images 96x96 px. Now in every image the interest area is of size 32x32 px in the center of the image, and the images are labeled based on that 32x32 px area. If whatever i am trying to detect is in the outer region of the 32x32 px area the label of that image is not affected.</p>
  
  <p>The problem here is that if i use the whole image when traing, my model will not learn that the interest area is only in the center of the image but on the other hand if i crop the images to be of size 32x32 i am loosing a lot of information which can help the model to train on. I found out that i am getting the best results if i crop the images to be of size 64x64 (kind of a trade of).</p>
  
  <p>Now going to the test set, for the test set it doesn't make sense to use this trade of because the model is not learning anything anyways so i would rather crop the test images to 32x32 but then the test set and train set sizes are not the same.</p>
  
  <p>Has anyone came across this problem before? Can i just pad the test images to the size of the train images? is this a good way to go?</p>
  
Tags: <convolutional-neural-networks><image-recognition>
Title: Smaller interest area for images than the size of the image in classification neural networks
UserDisplayName: Mihai
ThreadText: # Smaller interest area for images than the size of the image in classification neural networks
  
  (Asked by: username_0 on 2018-12-31)
  
  I have the following binary classification problem, my labeled dataset contains images 96x96 px. Now in every image the interest area is of size 32x32 px in the center of the image, and the images are labeled based on that 32x32 px area. If whatever i am trying to detect is in the outer region of the 32x32 px area the label of that image is not affected.
  
  The problem here is that if i use the whole image when traing, my model will not learn that the interest area is only in the center of the image but on the other hand if i crop the images to be of size 32x32 i am loosing a lot of information which can help the model to train on. I found out that i am getting the best results if i crop the images to be of size 64x64 (kind of a trade of).
  
  Now going to the test set, for the test set it doesn't make sense to use this trade of because the model is not learning anything anyways so i would rather crop the test images to 32x32 but then the test set and train set sizes are not the same.
  
  Has anyone came across this problem before? Can i just pad the test images to the size of the train images? is this a good way to go?
  
  **Tags:** convolutional-neural-networks, image-recognition
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-12-31. Score: 3 | Accepted answer
  
  "The problem here is that if i use the whole image when training, my model will not learn that the interest area is only in the center of the image" **Yes, it will, if you have enough samples and they are all classified based on this area only**.
  
  "but on the other hand if i crop the images to be of size 32x32 i am loosing a lot of information which can help the model to train on" . I don't understand what information you are loosing if you only care about the center 32x32 area.
  
  In the end, you need to ask yourself how will the test input look like and work based on that. If you only care about an area of 32x32 which is always is (and will be) at the center of all images, ignore everything and train and evaluate based just on that area (why add extra unnecessary calculations to the model?). If the size and location of the area might change, don't crop the image.
  
  Bottom line, the test set and the train set need to be of the nature (shape) for the model to work properly.
  
  
  ---
  
  