def __len__(self):
    if isinstance(self.images, list):
        return len(self.images)
    return self.images.shape[0]
def __len__(self):
    if isinstance(self.images, list):
        return len(self.images)
    return self.images.shape[0]