I have made a Super Resolution model and it is learning pretty well but for some reason these artifacts appear. It seems like some pixels that should be white are mostly yellow and some pixels that should be black or dark are mostly blue. Does someone know what can cause these artifacts to appear?
It little bit late for answert, but for next seeker of solution for same problem. Today similar problem appear for me too. After investigation I found that model’s output tensor is not clamped for range [0; 1]
some values have little bit more or less values out of that range. I use PIL for tranforming input/output images. Obviously PIL (and torchvision.transforms.ToPILImage()
) demands clamped values of tensor. In that case you can use torch.clamp(tensor, 0, 1)
for clamping tensor.