Yes, by removing it works. I also suggest you to change the MaskRCNN class name for solving num_workers issue.
The only work left is finding the place where values are passed to metrics. So, I can extract mask from dict and use segmentation ones.
I was given some intuition here:
However, I don’t understand where I should do the changes that he suggests me.
I think that he suggest me to create new metrics that do this change.