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?
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 and let the model learn where to focus.