The code plots the probability maps for both classes, not the mask.
If you are only interested on a single class, you can of course just plot the corresponding prediction.
You could use the IoU implementation 25 or a dice score.