XinWang-99 / SA-INR

An arbitrary-scale SR method for reducing MR slice spacing.
MIT License
12 stars 1 forks source link

Typos and Errors in testing files #1

Open Qazalbash opened 1 year ago

Qazalbash commented 1 year ago

Hi there,

I read your paper and it is a wonderful work. Recently, I have tried to run your pre-trained model and found some errors in importing modules.

  1. First one is about the module SA_INR which is imported as SA-INR.

Second one comes as one tries to run the pre-trained model by running the test.py file with the appropriate parameters. I was running the file in the SA-INR directory. The errors were due to the relative imports of modules. I have identified the files that are,

  1. network/model.py, which I changed to,
from network.edsr import conv_2d, conv_3d, make_edsr_baseline
from network.mlp import MLP
from network.NLSA import NonLocalSparseAttention
from utils import make_coord,input_matrix_wpn,to_pixel_samples
from network.AttentionLayer import AttentionLayer
  1. network/edsr.py,
from network.NLSA import NonLocalSparseAttention

I assume you have import them using the relative path, but it would be great if you use conditional inclusion to import the modules by using try and except clause, and keep both type of imports. In my opinion this may cover some edge cases. Have a great day!

XinWang-99 commented 1 year ago

Thanks for pointing out the problem. I believe it would be very helpful for other testers.