yilmazkorkmaz1 / SSDiffRecon

Official TensorFlow implementation of Self-Supervised MRI Reconstruction with Unrolled Diffusion Models
MIT License
25 stars 0 forks source link

error when try with undersampled data #2

Open linshuijin123 opened 11 months ago

linshuijin123 commented 11 months ago

hi, I had successfully reappeared your erxperience with fastmri train data, and get the inference with fastmri test data{-r09.tfrecords}, as far as I know, -r09 means 512512, so I try to inference with -r08, which is 256256, I got this error: tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found.

(0) Invalid argument: required broadcastable shapes at loc(unknown) [[{{node while/cond/add}}]] [[Abs/_1463]] (1) Invalid argument: required broadcastable shapes at loc(unknown) [[{{node while/cond/add}}]] 0 successful operations. 0 derived errors ignored.

  1. maybe I need to pad the images before I test?
  2. Additionally, I find images in -r09.tfrecords all have two channels, like 2512512, I don't get why two channels are needed? and is there any relation between these two channels?
  3. I noticed that you mentioned Mapper gets two inputs: time index and extracted information about data (like image contrast, R), how did you get the latter? auto by attention or man-made by adding a condition label? Looking forward to your reply! I can't be more honored to reappear your method.
yilmazkorkmaz1 commented 11 months ago

Hi,

Thanks for your interest.

1) You should try with 512x512 images and it automatically crops images in fastmri according to the label (i.e., contrast).

2) FastMRI gave 2 channels because it has complex images, first channel corresponds to real second channel imaginary component.

3) R can be get easily if you take fourier transform of undersampled image and count the zeros on fourier domain. We did not automate it and labeled by hand since I composed that dataset by using various contrasts/acc. rates I knew the sources.