def __getitem__(self, i):
    image = cv2.imread(self.images_fps[i])
    image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
    mask = cv2.imread(self.masks_fps[i], 0)

i think here are images and masks created, it works for images but not for masks -.- , they all have same size (512x512)