facebookresearch / fastMRI

A large-scale dataset of both raw MRI measurements and clinical MRI images.
https://fastmri.org
MIT License
1.34k stars 373 forks source link

ssim score for unet model #47

Closed asaksena98 closed 4 years ago

asaksena98 commented 4 years ago

Hello, I am training the baseline unet model on the provided singlecoil data but even after 40 epochs, the ssim score remains relatively unchanged at around 0.667 (same with the nmse which is roughly around 0.033). Is this the expected result? The results of the paper distinguish between PD and PDFS, and different acceleration factors, but I assume that the singlecoil training data includes all of these differences and aggregates the results.

tianweiy commented 4 years ago

@asaksena98 you can specify the acquisition type in the evaluation. I also can't reproduce the result using the latest repo, though the earlier version of unet can give 31.9 PSNR 0.722 ssim for singlecoil.

asaksena98 commented 4 years ago

thank you for letting me know. how and where can I specify the acquisition type?

tianweiy commented 4 years ago

https://github.com/facebookresearch/fastMRI/blob/f0ee2155baf6cfb1326ece1a8b0cd0d695df35b3/common/evaluate.py#L111

asaksena98 commented 4 years ago

Thank you for the clarification. I still keep running into the issue where the code converges to an ssim score of around 0.667 very quickly (within 10 epochs) and doesn't change at all from there. I am using the version of the code from April 24th. Perhaps this issue was fixed in a later commit?

tianweiy commented 4 years ago

I use 14562052eb3f37dd1f23f694bddfc3b8d456d571 to avoid using pytorch lightning. Recent commits also can't reproduce result

asaksena98 commented 4 years ago

sure, thank you for letting me know!

karandeep96 commented 4 years ago

Hello, i am training a unet model for classification task, and when i go to train my model i get the following error

ValueError: Shapes (None, 2) and (None, 512, 512, 1) are incompatible

for training data i have a numpy array of images and the labels are a numpy array using categorical mode. could you please help me.

mmuckley commented 4 years ago

Hello @karandeep96 - are you still having trouble with this? If so, please open a new issue.

@asaksena98 did you use the U-Net with the default parameters? The one from the paper might be larger.

karandeep96 commented 4 years ago

Hello @mmuckley thanks for the reply, problem is now sorted.

asaksena98 commented 4 years ago

@mmuckley thank you for your response. I ran it with the default number of channels (32) and with the following command: python3 models/unet/train_unet.py --mode train --num-epochs 50 --challenge singlecoil --data-path data --exp unet --mask-type random --gpus 2