Answers.Body: <p>You're not wrong, but you're also missing a couple of risky aspects that makes the idea not the best.</p>
  <p>The part you're right are:</p>
  <ul>
  <li>forcing a model to focus on specific regions of interest of an image will improve a model performance.</li>
  </ul>
  <p>The points you should pay attention to are:</p>
  <ul>
  <li>using the same background for every image will make your dataset biased, i.e. you won't be able to use your model in any real application cause the model will work only on images with specific backgrounds.</li>
  <li>the power of deep learning relies in the fact that models learn features automatically. Many times these features capture correlations that are totally invisible to us, correlations that might involve part of the background as well. So before jumping to  conclusions an inspection of feature maps and maybe feature importance using some explainable ai tool is always required.</li>
  <li>feature extraction is always a good practice (if we can help a model with some prior knowledge, why not?) but it should aim at adding information rather than removing it. So I would personally try other roads. For example testing different color spaces where the color of the pasta become more visible from the water/pot ones, or use some form of <a href="https://arxiv.org/pdf/2111.07624.pdf" rel="nofollow noreferrer">attention</a> and let the model learn where to focus.</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-18T09:37:58.670Z
Answers.Text: Your suggestions seem valid to me. I would also differentiate between training "performance" (which is somehow a vague term and might refer to the accuracy) and generalisation, which you mention implicitly in the first point. For the last point, you may also mention data augmentation.
Answers.UserDisplayName: nbro
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-18T09:20:37.073Z
Answers.LastActivityDate: 2022-03-18T09:20:37.073Z
Answers.UserDisplayName: Edoardo Guerriero
Body: <p>I am training a CNN that detects if a there is a pot of boiling water vs if there is a pot of boiling water with pasta inside. My hypothesis is that having the same background for both a positive and negative class image will improve model accuracy because it will force it to look exclusively at the foreground for hints. Is this hypothesis reasonable?</p>
  
Tags: <deep-learning><convolutional-neural-networks><computer-vision><image-recognition><binary-classification>
Title: Does Using the Same Background for Binary Classification Improve Model Accuracy?
UserDisplayName: Joel Castro
ThreadText: # Does Using the Same Background for Binary Classification Improve Model Accuracy?
  
  (Asked by: username_0 on 2022-03-17)
  
  I am training a CNN that detects if a there is a pot of boiling water vs if there is a pot of boiling water with pasta inside. My hypothesis is that having the same background for both a positive and negative class image will improve model accuracy because it will force it to look exclusively at the foreground for hints. Is this hypothesis reasonable?
  
  **Tags:** deep-learning, convolutional-neural-networks, computer-vision, image-recognition, binary-classification
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-03-18. Score: 0 | Accepted answer
  
  You're not wrong, but you're also missing a couple of risky aspects that makes the idea not the best.
  
  The part you're right are:
  
  * forcing a model to focus on specific regions of interest of an image will improve a model performance.
  
  The points you should pay attention to are:
  
  * using the same background for every image will make your dataset biased, i.e. you won't be able to use your model in any real application cause the model will work only on images with specific backgrounds.
  * the power of deep learning relies in the fact that models learn features automatically. Many times these features capture correlations that are totally invisible to us, correlations that might involve part of the background as well. So before jumping to conclusions an inspection of feature maps and maybe feature importance using some explainable ai tool is always required.
  * feature extraction is always a good practice (if we can help a model with some prior knowledge, why not?) but it should aim at adding information rather than removing it. So I would personally try other roads. For example testing different color spaces where the color of the pasta become more visible from the water/pot ones, or use some form of [attention](https://arxiv.org/pdf/2111.07624.pdf) and let the model learn where to focus.
  
  > **Comments:**
  > **username_2**: Your suggestions seem valid to me. I would also differentiate between training "performance" (which is somehow a vague term and might refer to the accuracy) and generalisation, which you mention implicitly in the first point. For the last point, you may also mention data augmentation.  
  
  ---
  
  