How are you visualizing the target image and what kind of pixel values does it contain?
If you are dealing with a segmentation use case, each pixel should contain the corresponding class index. In your case if looks like the target has only two classes, thus it should only contain pixel values of 0 and 1.
matplotlib.pyplot usually scaled the colormap, so that you should get a black and white image.