Could you try to run your code with one or two images-mask pairs and see how your model is behaving then?
I still don’t see any obvious errors in your code, so we might have a look if the data is somehow corrupted/changed, even though you are not calling anything after the train() call, right?