Skip to content
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

Have you ever trained SRCNN with RGB three channels image? #14

Open
YoungMagic opened this issue Dec 27, 2018 · 8 comments
Open

Have you ever trained SRCNN with RGB three channels image? #14

YoungMagic opened this issue Dec 27, 2018 · 8 comments

Comments

@YoungMagic
Copy link

YoungMagic commented Dec 27, 2018

I changed the ‘load_img' function in file ‘dataset.py’ to load RGB images. And the parameter 'num_channels' in 'build_model' function in 'solver.py' to 3. And the 'super_resolve.py' to load the model and generate HR. But the result is weird. Do you have any idea?

bsd100_007out_srf_4_22 808_0 6693

If I train only with Y channel, the final RGB image don't get much better compared with the bicubic interpolation. I guess it's caused by the fact that reconstruction with one channel and the other two using bicubic to form the final RGB image.
set5_003srcnn

I'd like to train with RBG channels. But the final result is a bit unpleasing. Did I miss to change something?Do you have any suggestions? Thanks!

@amazingyyc
Copy link

i got the same problem like you. Maybe the algorithm does not fit for colorful image.
amtsx4xbh3n21

@soapisnotfat
Copy link
Owner

I got this issue too, but I don't know what causes this problem. RIght now I rarely have time diving into the papers to find out a solution. Maybe looking for some other implementation online?

@amazingyyc
Copy link

amazingyyc commented Mar 26, 2019

My result is based on another implement for FSRCNN. Maybe lost some algorithm detail. Maybe it does not works well for colorful image, Not sure....

@m-sche
Copy link

m-sche commented Nov 22, 2019

Happened to me too and it was caused by a color channel overflow (I have been scaling pixel vales from [0, 1] to [0, 255] and due to some rounding errors I sometimes got 255.00...1, which turned to 0). That's why this artefact happens mostly in bright areas. Solution is to clip the values to valid range with numpy.clip(img, 0, 1) or numpy.clip(img, 0, 255).

@wfxiaobo
Copy link

Hello
There is a problem makes me confused that how to train FSRCNN model for scale 2 or scale 4 on basic of scale 3

@543877815
Copy link

Happened to me too and it was caused by a color channel overflow (I have been scaling pixel vales from [0, 1] to [0, 255] and due to some rounding errors I sometimes got 255.00...1, which turned to 0). That's why this artefact happens mostly in bright areas. Solution is to clip the values to valid range with numpy.clip(img, 0, 1) or numpy.clip(img, 0, 255).

I solve the problem using this too.

@liujie316316
Copy link

Hello There is a problem makes me confused that how to train FSRCNN model for scale 2 or scale 4 on basic of scale 3

I have encountered the same problem. How did you solve it?

@wfxiaobo
Copy link

wfxiaobo commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants