hey,
PIL.Image.NEAREST doesn’t seem to solve the problem.
i tried
    mask = TF.rotate(mask, deg,resample=PIL.Image.NEAREST )


and also:
    mask = TF.rotate(mask, deg,resample=PIL.Image.NEAREST ,fill=0)

still getting weird interpolations. what is more strange is that for some runs i’m getting more pixels than i should.
what i mean is that i count the non-zero elements before and after transform and getting more non-zero after tranform for some pictures, less non-zero for others, and also sometimes getting the right amount.
what is more surprising is the fact i don’t see anyone else having trouble with this. is there an easy solve-around?