Closed zhujiawen1994 closed 5 years ago
Following previous works(e.g., EDSR、RCAN), our model was trained on RGB images, and the reconstructed images are RGB images. For benchmark datasets, all our SR results are evaluated on the Y channel of transformed YCbCr space. You can use MSRN-PyTorch/MSRN/Test/Prepare_TestData_HR_LR.m to generate test images, and use MSRN-PyTorch/MSRN/Test/Evaluate_PSNR_SSIM.m to test PSNR and SSIM. Noticed that our model was trained on bicubic degenerate images.
Thanks for your reply. In OriginalTestData/Set14, I got the correct PSNR and SSIM values(same as you provided) except for the image bridge(the third image). I found that the image bridge is a single-channel image and the output of the network is a RGB image. So, I convert the output RGB image into a YCbCr image, take the Y channel, and then measure the psnr value with the bridge image in OriginalTestData/Set14. But I got this psnr and ssim: x2 3 bridge.png: PSNR= 26.207258 SSIM= 0.839023 this is what you provide: x2 3 bridge_MSRN_x2.png: PSNR= 29.516140 SSIM= 0.869215 I mean how to measure the PSNR and SSIM just on this bridge image in OriginalTestData/Set14? Thanks again.
我用中文回复你可能更清楚一点~ Set14中的 bridge 图像确实是单通道的灰度图,但因为EDSR、RCAN以及我们的MSRN都是基于RGB3通道进行训练的。所以我们都做了一个处理,那就是对于单通道的图像,我们都先扩展到了3通道,然后再送入到网络中进行重建。最后网络的输出也都是3通道的图像,然后在测试PSNR和SSIM的时候,遵循前人都只对比Y通道的原则,我们将着5个数据集重建后的图像全部转到了YCbCr空间,然后取Y通道进行测试。
Prepare_TestData_HR_LR.m 这个脚本中 if size(im_ori, 3) == 1 im_ori = cat(3, im_ori, im_ori, im_ori); end 该语句会对图像进行扩展。如果你不用该脚本准备测试集也没事,你输入到网络中的时候,重建代码也有一样的通道扩展代码。所以我们的代码都会先把单通道图像扩展为3通道的图像,再进行重建。
在测试bridge这张图的时候,其HR图像也是经过扩展成3通道的,最后在转换为YCbCr空间,取Y通道,与SR的Y通道进行比较。而不是拿bridge重建后的图像的Y通道和bridge的原图进行比较,因为原图实质上是gray image,并不是YCbCr空间上的Y通道图像
噢噢 明白了 爱你么么哒
你好。不好意思又一次打扰你。 我想问一下,option.py 里的参数resume和load是什么关系。resume是加载模型所用,那load是什么用呢? 谢谢你啦^_^
如果你想加载预训练好的模型,或者想加载训练一半的模型,直接使用 --pre_train 参数就行,其他参数用不到
Hi, thanks for your working. Why is the psnr value on Set14/bridge I get with _Test/model/MSRNx2.pt not so good? this is psnr, it different from you provided: x2 3 bridge.png: PSNR= 26.207258 SSIM= 0.839023
how do you compute the PSNR and SSIM on this bridge image? It is gray image, but the output of net is RGB image.