Regarding the first question, I did not try to open the images in any viewer. Except opening them using PIL library and visualising them using plt.imshow.
Regarding the second question, yes, I am visualising images and masks in training and validation sets exactly with the similar code.
Can you help me? I really need to visualise these masks in my work. I even tried the implementation of pytorch:
dataset = Cityscapes('./data/cityscapes', split='test', mode='fine',
                     target_type= 'color')

img, col = dataset[0]

But I couldn’t visualise the masks.