Using cropped background images as background class

Hello.

I’m currently working on a binary image classification problem using high resolution (up to 6000x4000 pixels) images with complex backgrounds, and CNN transfer learning.

In order to reduce Images size and complexity, I applied an offline crop to all images in a way that keeps the Region Of Interest (ROI) distinguishable. This resulted with three types of cropped images:

  1. images with background only,
  2. images with ROI only, and
  3. images with both ROI and background.

Only images of type 1 and 2 were used to train validate and test the CNN model.

I want to use the background-only images (type 1) as a background class in order to make my model fucus only on ROI and ignore backgrounds. How can I deal with the background class (number of images, loss function…) ?

Thanks.

Hi for reducing complexity you can just resize the image to a lower resolution this way you don’t loose valuable information.
An ideal scenario would be that you have the entire frame with your focus object in frame and also the entire frame without your focus object in frame.
If you can please elaborate on what you are trying to classify I think I can help you better.