Isolating an item from image?

As part of a bigger project, I am trying to identify garbage and specifically garbage bottles.

Google images for garbage bottles is giving me images of where content is many garbage bottles together. My intuition is that this will be bad for training as the images I’ve seen for training in classification problem is where the labeled, training data is just one instance of whatever class the image is supposed to contain.

I was thinking one strategy would be to do a canny edge detection, get edges, reverse map those indexes and make new images where background is white, whatever and content is just that one bottle. So one google image of a garbage bottle can become like 20 individual images. I am not sure if this is an acceptable approach, will do it anyway out of curiosity

Not really Edgar. I had worked on datasets where there were multiple items of same type stacked together in 1 image and the algorithm worked just fine. Something like this.

BEANS0022

if there are multiple classes in the same photo, then it can become a problem.

What your approach does is vastly increase the dataset. A form of data augmentation, which is very helpful. Would be great to know how it goes. Do share once you are done