JiahuiYu / wdsr_ntire2018

Code of our winning entry to NTIRE super-resolution challenge, CVPR 2018
http://www.vision.ee.ethz.ch/ntire18/
598 stars 123 forks source link

Issues about WDSR Baseline result reproduce? #19

Closed ChaofWang closed 5 years ago

ChaofWang commented 5 years ago

hi jiahui. I want to reproduce your WDSRA Baseline x2 result 34.77 dB. I used EDSR-Pytorch framework to train and set n_res_blocks=16, n_feats=32, n_block_feats=128, lr = 1e-3, output patch_size=96, batch size=16, epochs=300,lr_decay at 200 and 250 with decay gamma=0.1. But only got about 34.62~34.65 dB for each attempt. This result is not very satisfactory. Can you give me some train advice?

JiahuiYu commented 5 years ago

Hey, I am here to help. Actually 34.62-34.65 is around the performance of EDSR. So I wonder have you checked that you are calling WDSR model? Can you print the model size (which should be the same as our report)?

We do have end-to-end training code on tensorflow. It could be a good reference for your implementation.

ChaofWang commented 5 years ago

I am sure that WDSR is set. the model and parameters will be printed for each train. I have tried to reproduce several times, but each time the results obtained is 36.65dB. I don't know if this is related to OS (mine is win10). In addition, can you provide the args setting in option.py that you get 36.77dB? THX

JiahuiYu commented 5 years ago

@ChaofWang Hey, we already provide the args settings that we changed based on EDSR. In your case on your OS, what's the performance of EDSR?

ChaofWang commented 5 years ago

Yeah,I tried EDSR several times, and the results were 34.55-34.57 dB, which also are lower than README report. It may be related to OS. I will reinstall my OS and continue to try on Ubuntu 16.04.

JiahuiYu commented 5 years ago

@ChaofWang Since the improvement of WDSR is consistent compared with EDSR, there may be some other issues with your code base. Please let us know if you have further question.

ps: my personal feeling is that OS may not be the reason. Maybe you can check your dataset, python version, opencv version and other potential bugs. You can also try our tensorflow version re-implementation on your windows which provides an end-to-end training-validation pipeline.

ChaofWang commented 5 years ago

@JiahuiYu I reinstall my OS and retrain both WDSR baselinex2 and EDSR baselinex2 in your table1. Actually,you are right,OS is not the reason. But now, I can reproduce the 34.61dB of EDSR and the 34.68dB of WDSR. The result of WDSR is the same as keras version, both EDSR and WDSR without self-ensemble . But I found after WDSR used self-ensemble, the result just is 34.772dB. So I think that your description of Table 1 about WDSR without self-ensemble may be a mistake, or can you provide the pre-training model for pytorch? These results are reproduced in the framework of EDSR-Pytorch, and both in WIN10 and ubuntu16.04 used python3.5, CUDA9.0, cudnn7.1. Another interesting thing, in the same CUDA environment, including the same disk, ubuntu16.04 training is twice as fast as win10.

JiahuiYu commented 5 years ago

We do have tensorflow pretrained model available. You can probably convert it to pytorch using other tools. We are not using self-ensemble in table 1.

By the way, if you have time, can you try to reproduce table 2 (or maybe some settings in table 2), and let me know the results?

ChaofWang commented 5 years ago
Model Number of Residual Blocks Parameters PSNR
EDSR 3 409755 33.997 dB
WDSRA 3 227476 34.107 dB
EDSR 5 557467 34.218 dB
WDSRA 5 375572 34.325 dB
EDSR 8 779035 34.434 dB
WDSRA 8 597716 34.504 dB

@JiahuiYu,This is my implementation result of Table 2. All results are lower than yours, but it also proves that WDSR is better. In addition, I don't care about the difference between tensorflow and pytorch, nor whether it can achieve this result on tensorflow. I just want to know why the results of your pytorch implementation are higher than mine. Is there any tricks in training here? Or, can you tell me your training details on pytorch? This has bothered me for a long time. THX

JiahuiYu commented 5 years ago

@ChaofWang Hey, thanks for verifying the improvements. In fact, I also want to help you achieve better results. But indeed I don't have any other secret tricks. Did you implement SR framework by yourself, or based on EDSR-Pytorch?

ChaofWang commented 5 years ago

@JiahuiYu yeah,Those result are all based on EDSR-Pytorch. Are your results based on EDSR-pytorch?

JiahuiYu commented 5 years ago

@ChaofWang Yes, it is kind of strange that a performance gap exists.