How does general image background removal AI work?
In image segmentation the target is actually an image, with the same dimensions as the input, where each pixel has a label depending on which class it represents. It is not uncommon for such a dataset to have a &quot;background&quot; class that essentially consists of the pixels not belonging to any other class. If not you can always group together classes typically associated with background (e.g. &quot;sky&quot;, &quot;cloud&quot;, &quot;grass&quot;, &quot;mountain&quot;, etc.) to form the class &quot;background&quot;. Likewise you could group all other possible classes of interest (e.g. &quot;person&quot;, &quot;car&quot;, &quot;horse&quot;, etc.) into the class &quot;foreground&quot;. With this dataset you could train an image segmentation model that predicts if a pixel belongs to the background or the foreground, without actually classifying it into a &quot;person&quot; or a &quot;car&quot;.
So suppose you want to make your own removal.ai, you could:

find one or more diverse image segmentation datasets (it needs to be diverse so that it will work on any generic photo uploaded to the site)
check all the unique classes in the labels
group all classes associated with backgrounds into class 0 (i.e. &quot;background&quot; class)
group all classes associated with foregrounds into class 1 (i.e. &quot;foreground&quot; class)
train an image segmentation model with these two classes
profit