New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Color shift with srgan model #30
Comments
Can you please be more specific?
|
Honestly, I cannot see a color shift by plain visual inspection. I asked for some samples to make sure there are no gross distortions but from what you provided these do not exist. Can you quantify this red-shift and tell if it is significant? |
Having tested lot of more images - I will close this issue. Thank you |
I had the same issue with https://github.com/Tencent/Real-SR so I guess that color shift is not (yet) considered a real issue in SR methods but the community (only PSNR takes into account color shift, SSIM and LPIPS consider it a minor disturbance). Here’s how I remove the color-shift from super-resolved images: downscale the SR image, compute the difference with the LR image, Gaussian blur, upscale, add to the SR image. All computation is done in linear color space.
|
Thanks for the useful comment @devernay. Wasn't aware of that. Can you quantify the impact of this correction has on PSNR? |
@krasserm sorry no, I didn't measure that, as I was mainly interested by the visual quality, and the color difference between SR-then-downscaled and the original image in my case was too large to get unnoticed (I first noticed it on vegetation and on various textured textiles). Why this happens still escapes me, and I haven't looked into details, but if the training data is generated by processing gamma-compressed (sRGB) pixel values rather than linear colors, that may be an explanation. Any image resizing, blurring, convolution, etc should be done in linear color space (Eric Brasseur has the best explanation on the topic, and Helmut Dersch's explanation also helps). You will notice in my G'MIC command-line above that srgb2rgb is the first thing I do, and rgb2srgb is the last thing. All processing is done in floating-point arithmetic. The deep network could "learn" to do the SR properly (in linear rather than gamma space), but it still needs to have the right training data to do so. |
Hello
First of all, thank you for your work on this.
I've noticed a slight color shift on inference from srgan model.
Tried tweaking and normalize methods to modify with div2k mean values and retrain the mode, but did not improve the results.
Thank you
The text was updated successfully, but these errors were encountered: