Negative of an image using Pytorch transforms

You can use torchvision.transforms.functional.invert() from the torchvision transforms library.

1 Like