Specific object detection and segmentation

I have a large number of cars images but some of them are steering wheels, tires, car parts etc…
I need to filter them so I end up only with detected cropped cars images without background.

So if I want to use: ItemList class
there is SegmentationItemList.from_folder but how to tell it to recognize only cars?

Is there any other way, any suggestions or pointers would be highly appreciated!

Training segmentation requires that for each input image, that you have a corresponding mask which the network uses to compute the loss based on its output. Thats ‘how to tell it to recognize only cars’. A mask could contain 0’s in the pixels with no object of interest, and each pixel covering a class, i.e. a car, would contain a number corresponding to the class. If you have a binary case, i.e. no car or car, its a binary mask of 0’s and 1’s. There are probably already datasets out there that have been labeled and there are definitely tools to use for labeling itself. But be aware, its extremely time consuming. I have been told that for segmentation, its less so the number of images that are important for the size of the dataset, and moreso the number of objects. But if you only have a single car in an image, the number of images and objects are equally important. Once you have a trained network and it outputs a mask, you simply “mask” the image to obtain what you want. Hope i didn’t misunderstand your question.

Yeah I though of labeling myself but really there is no need for that. All I want is cropped images of only cars from given bunch of images.
I’ve found out imageai library works ok, but slow, because it’s rendering image by image.
Seeking better solution…

If you already have an object detection and localization network for cars, you can use it to localize the cars with a BBox and then use thresholding scripts within the box. if you havent got any experience with this it might take some time to get an efficient workflow but it would help you.

If I understood correctly, you want to filter out car parts images from car images and then on those car images, you’re trying to build a segmentation model which will segment the car from its background. For the filtering part, I’d say checkout this wonderful site platform.ai and in case you want to build your own dataset for car segmentation, tools like Labelbox might be of big help.