How to use SegmentationClass in dataset voc2012

I am a newer in semantic segmentation, so I want to know how to use SegmentationClass in dataset voc2012?
I want to use those images for training, that means I want to convert the pixel value of the image to 0-20.

I still have a problem, the image pixel value obtained through network prediction is between 0 and 1. Suppose my data has 35 categories, so how should I get the final image? Multiply by 35 directly?