Giter Site home page Giter Site logo

Comments (8)

chaithyagr avatar chaithyagr commented on June 26, 2024

Can you please tell what is the exact reproducible code you ran?
Also, please let us know the exact environment you used (tensorflow version etc).

from fastmri-reproducible-benchmark.

chaithyagr avatar chaithyagr commented on June 26, 2024

To me, on seeing your output, it is quite bizarre to have that high loss initially... Are you using density compensation?
How did you set up the data?
From what I remember you need to convert the fastmri dataset into tfrecords to have preprocessed data (kspace data, smaps, density compensation, etc).

from fastmri-reproducible-benchmark.

SivaHitesh047 avatar SivaHitesh047 commented on June 26, 2024

I ran the nc_train.py from the training_scripts folder keeping all the parameters as it is. I used python -m nc_train command to run the file. I am not using density compensation.

The dataset I used for train set are the .h5 files.

Here are some of the module versions I used in the environment.

tfkbnufft - 0.2.4
tensorflow -2.8.0
tensorflow-gpu - 2.4.1
tensorflow-nufft - 0.7.3
scikit-image - 0.19.3
keras - 2.8.0
keras-preprocessing - 1.1.2

from fastmri-reproducible-benchmark.

chaithyagr avatar chaithyagr commented on June 26, 2024

Thank you for the info:

The dataset I used for train set are the .h5 files.

Do you mean from fastMRI dataset? I am afraid that is not right. See here how the dataset needs to be organized:

if self.multicoil:
if self.density_compensation:
kspace, ktraj, smaps, shape, dcomp, = inputs
else:
kspace, ktraj, smaps, shape = inputs
else:
if self.density_compensation:
kspace, ktraj, shape, dcomp = inputs
else:
kspace, ktraj, shape = inputs

Ideally you will need to generate the tfrecords dataset using: https://github.com/zaccharieramzi/fastmri-reproducible-benchmark/blob/master/fastmri_recon/data/scripts/multicoil_nc_tf_records_generation.py
(Assuming you want to run multicoil in 2D)

I am not using density compensation.

I Highly recommend you use density compensation. You can have scaling issues otherwise which can affect the convergence. See the paper Sec III D where the importance of it, particularly for non-Cartesian MRI is discussed.
By default we do use density compensation.

from fastmri-reproducible-benchmark.

SivaHitesh047 avatar SivaHitesh047 commented on June 26, 2024

Hey, thank you so much chaithya! It's working now. I was trying out the single coil only.

from fastmri-reproducible-benchmark.

SivaHitesh047 avatar SivaHitesh047 commented on June 26, 2024

I was wondering about adding k-space network (dual layers) to the NCPDNet (similar to how it is in the PDNet). Can you please suggest me on what to do? Also, is there any reason why you didn’t implement dual layers in NCPDNet.

from fastmri-reproducible-benchmark.

chaithyagr avatar chaithyagr commented on June 26, 2024

Usually k-space doesnt exactly satisfy the same properties of equivariance in image domain and hence such a direct network would not exactly help the cause in my opinion. However, if u still want to do the same, see that NCPDNet is derived from CrossDomainNet, which is exactly network in k-space then in image space.

What you would need to do is to modify here:

self.kspace_net = [measurements_residual for i in range(self.n_iter)]
def measurements_residual(concatenated_kspace):
current_kspace = concatenated_kspace[..., 0:1]
original_kspace = concatenated_kspace[..., 1:2]
return current_kspace - original_kspace

Note that currently we only have data consistency here. I would recommend you to have this, and in addition add your k-space network.
Do let us know if you see any improvements over the baseline, and after benchmarking, we would not mind adding it as a feature.

from fastmri-reproducible-benchmark.

zaccharieramzi avatar zaccharieramzi commented on June 26, 2024

I am going to close this issue since it seems resolved for now (at least the original nan problem).
Thanks @chaithyagr for handling it.

from fastmri-reproducible-benchmark.

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.