soapisnotfat / super-resolution

collection of super-resolution models & algorithms
Apache License 2.0
744 stars 188 forks source link

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

Open YoungMagic opened 5 years ago

YoungMagic commented 5 years ago

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 commented 5 years ago

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

soapisnotfat commented 5 years ago

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 commented 5 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 3 years ago

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 commented 1 year ago

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 commented 1 year ago

We trained other scales based on scale 3 when the model is convergent on scale 3.

魏峰 @.***

 

------------------ 原始邮件 ------------------ 发件人: "soapisnotfat/super-resolution" @.>; 发送时间: 2022年10月8日(星期六) 下午3:15 @.>; @.**@.>; 主题: Re: [soapisnotfat/super-resolution] Have you ever trained SRCNN with RGB three channels image? (#14)

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?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>