Image segmentation training set labeling
If you have the labeled training data with you then, you will have to label each pixel in the training set, compute the loss and backpropagate it. The link given below should help.

Suprevised Image Segmentation