examples/pytorch/semantic-segmentation/run_semantic_segmentation.py/ReduceLabels/__call__
class ReduceLabels:    def __call__(self, image, target):
        if not isinstance(target, np.ndarray):
            target = np.array(target).astype(np.uint8)
        # avoid using underflow conversion
        target[target == 0] = 255
        target = target - 1
        target[target == 254] = 255

        target = Image.fromarray(target)
        return image, target