This seems like masks is a bool object instead of 2d array. I tried tutorial 3  on maskrcnn, which is what I believe you are trying too and I don’t get that error. Have you done any changes in the dataset class?