Preprocessing RGB image Masks to Segmentation Masks