zhishenhuang / mri

4 stars 1 forks source link

provide mask files #1

Open listar0810 opened 2 years ago

listar0810 commented 2 years ago

thx for providing codes,could u provide mask files especially codes in unet_train.py # Mar 14, try fixed Loupe mask maskfile = '/mnt/shared_a/checkpoints/leo/mri/loupe_mask_8fold.pt' fix_mask = torch.load(maskfile)['mask'] could u provide "loupe_mask_8fold.pt“ mask files. Many thx

NorthernPeach commented 1 year ago

Hello, Zhi Shen, have the same request, could you provide the "loupe_mask_8fold.pt“ mask files, please.

zhishenhuang commented 1 year ago

The file loupe_mask_8fold.pt was generated by applying a trained loupe model on the data to obtain corresponding masks. I have provided the loupe model training files in this repo as well.

I do not have the exact file I used back in March this year at hand after I moved to a new institution.

NorthernPeach commented 1 year ago

The file loupe_mask_8fold.pt was generated by applying a trained loupe model on the data to obtain corresponding masks. I have provided the loupe model training files in this repo as well.

I do not have the exact file I used back in March this year at hand after I moved to a new institution.

After I train LOUPE via loupe_train_v2.py, the "loupe_8fold_base_8_epoch_0.pt" files are obtained I do after that "alternate_train_v3.py" with the random initialization for U-Net and MNet, however, seems like some part of the steps before running alternate training is missing. During the training process, there is no improvement for the generated masks but degradation. Could you, please, tell in what the correct order is for running your code?

zhishenhuang commented 1 year ago

I do not think you need loupe_mask_8fold.pt in the alternating training framework. That file in the unet_train.py seemed to be an attempt to train an Unet that can denoise images masked by provided 'fixed masks' from Loupe procedure. One can certainly comment out those two lines.

The alternating training framework functions by its own (i.e. the file alternate_train_v3.py). It does not necessarily depend on the output from another file. You might want to pre-process your dataset by normalising each images to a moderate numerical range such as [0,1]. I should have provided most details in the writeup.