Code Monkey home page Code Monkey logo

Comments (16)

hanlinwu avatar hanlinwu commented on June 25, 2024

I found that there may be some bugs in the latest version of the code. I tried to switch the code to the previous version(2e1a266) and got a PSNR value similar to that in the paper.

from meta-sr-pytorch.

hcwang95 avatar hcwang95 commented on June 25, 2024

Thanks a lot, @hanlinwu! I will try it soon and update here if it works well.

from meta-sr-pytorch.

hcwang95 avatar hcwang95 commented on June 25, 2024

Here is the update. By rolling back to the commit as @hanlinwu pointed out, I successfully achieved around 41dB PSNR on the Set5 validation set. However, when I test the pre-trained model on B100 (which I created myself by Octave rather than Matlab), the PSNR is even lower (around 27dB).

I found that I could not actually reproduce the input image by running the dataset generation script in MATLAB using Octave. @XuecaiHu Would you mind if you could share the B100 dataset that you use for the training or sharing the Matlab version that you run? Thanks a lot!

from meta-sr-pytorch.

reddandelion217 avatar reddandelion217 commented on June 25, 2024

Did you solve this problem?@hcwang95

from meta-sr-pytorch.

hcwang95 avatar hcwang95 commented on June 25, 2024

@reddandelion217 No, I've tried one another training dataset and still cannot reproduce the performance in the paper. Not sure where is the problem.

from meta-sr-pytorch.

reddandelion217 avatar reddandelion217 commented on June 25, 2024

@hcwang95 After analyzing the file history, I think the problem comes from the code below in file trainer.py, because there is no reason to do this:
i = 1
h, w,_ = pos_mat.size()
while(pos_mat[i][0][0]<= 1e-6 and i<h):
i = i+1

    j = 1
    #pdb.set_trace()
    h, w,_ = pos_mat.size()
    while(pos_mat[0][j][1]<= 1e-6 and j<w):
        j = j+1

    pos_mat_small = pos_mat[0:i,0:j,:]

and the code below in file metardn.py:
local_weight = self.repeat_weight(local_weight,scale_int,x.size(2),x.size(3))

from meta-sr-pytorch.

supercaoO avatar supercaoO commented on June 25, 2024

@hcwang95 Hello, have you solved the reproduction problem?
I have a similar problem with you. I used the script ./generate_LR_metasr_X1_X4_idealboy.m to prepare the B100 dataset. Then I used the downloaded model_1000.pt to evaluate the PSNR and SSIM results.
What I got at scales 1.1 ~ 2.0 is as follows:

X1.1 X1.2 X1.3 X1.4 X1.5 X1.6 X1.7 X1.8 X1.9 X2.0
PSNR 27.71 27.73 27.69 27.26 27.98 27.23 27.10 27.02 26.97 28.33
SSIM 0.8412 0.8417 0.8380 0.8223 0.8424 0.8147 0.8086 0.8030 0.7975 0.8398

The PSNR results I got are much lower than that from the paper. @XuecaiHu Could you please help solve the problem? Thank you!

from meta-sr-pytorch.

henrycliang avatar henrycliang commented on June 25, 2024

@hcwang95 Can you provide some details about how you solve the low-PSNR problem? I meet the same problem with you. I feel confused about @hanlinwu 's comment -- on the preview version

from meta-sr-pytorch.

XuecaiHu avatar XuecaiHu commented on June 25, 2024

@supercaoO can you check the output of the h_project_coord and w_project_coord?

from meta-sr-pytorch.

XuecaiHu avatar XuecaiHu commented on June 25, 2024

and show me the results @supercaoO

from meta-sr-pytorch.

supercaoO avatar supercaoO commented on June 25, 2024

@XuecaiHu Thanks for your reply. I have emailed you ([email protected]) the results.

from meta-sr-pytorch.

supercaoO avatar supercaoO commented on June 25, 2024

@liangheng96 Hello. After cloning the repository, maybe you can try git reset --hard 2e1a266832ab3a2dd855c98c34387c47a4ebec01 to switch it to the previous version of the repository. I think that is what @hanlinwu means.

from meta-sr-pytorch.

henrycliang avatar henrycliang commented on June 25, 2024

@supercaoO Thank you! I know what @hanlinwu means by now. Now I swith to the previous version, and then I can get the similar results to the paper. Thank you very much!

from meta-sr-pytorch.

henrycliang avatar henrycliang commented on June 25, 2024

I think @reddandelion217 's comment is right. I delete these codes and then get the right PSNR.

@hcwang95 After analyzing the file history, I think the problem comes from the code below in file trainer.py, because there is no reason to do this:
i = 1
h, w,_ = pos_mat.size()
while(pos_mat[i][0][0]<= 1e-6 and i<h):
i = i+1

    j = 1
    #pdb.set_trace()
    h, w,_ = pos_mat.size()
    while(pos_mat[0][j][1]<= 1e-6 and j<w):
        j = j+1

    pos_mat_small = pos_mat[0:i,0:j,:]

and the code below in file metardn.py:
local_weight = self.repeat_weight(local_weight,scale_int,x.size(2),x.size(3))

from meta-sr-pytorch.

LILIXIYA avatar LILIXIYA commented on June 25, 2024

Hi, do you see any errors in meta.py, saying 'ValueError: only one element tensors can be converted to Python scalars'? Thanks!@hcwang95

from meta-sr-pytorch.

dflateau avatar dflateau commented on June 25, 2024

Any updates on this?

from meta-sr-pytorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.