Getting negative (inverted) image in Pytorch

Viewed 868

I want to get the negative of an image straight from the data loader and feed it as a tensor. Are there any libraries that I can use? I have tried torch transforms and didn't find any.

enter image description here

2 Answers

Don't struggle a lot just use 255-image it will give you a negative image...Try it

Related