How train my dataset(shoes) in background code?

I want to remove background but I couldn’t keep shoes like foreground. I thought that is needed train own shoes dataset. I am using following code.

Code

(I couldn’t get good result with this models)
dlab = models.segmentation.deeplabv3_resnet101(pretrained=1).eval()
fcn = models.segmentation.fcn_resnet101(pretrained=True).eval()

How to train my own dataset that is shoes for getting foreground? Could you tell me step by step what I will do ?

Do you want to do segementation and only segment shoes for example?

In that case, you need to have masks for your data. simply use applications such as labelme (There are bunch of other apps and services you can use aside from labelme, check them out here(Awesom dataset tools)) and create yourself a dataset, then train your network on it and you are good to go!

1 Like

I labeled dataset with labelme. How could I train the labeled dataset according following code?
RemoveBackgroundCode