Problem in training Unet with multi class labels

Should convert the mask image to a 1 channel image . Please check.
And in this mask image, every pixel that has the value of label_id.
The label_id should always start from 0 and go up in increasing order.