You would need to transform the annotation masks to class indices by e.g. mapping the color codes to class indices, depending on your current mask format. The linked image seems to show a binary mask, so I’m unsure if you are using 3 binary masks now or a single mask with different colors/values.