guopengf / FL-MRCM

Multi-institutional Collaborations for Improving Deep Learning-based Magnetic Resonance Image Reconstruction Using Federated Learning
MIT License
45 stars 10 forks source link

This is not an issue #8

Open wiildsoul opened 2 years ago

wiildsoul commented 2 years ago

Can you please let me know how to run it Properly . And configure the dataset properly. I am new to this field ... HELP WILL BE APPRECIATED

Thank You Very Much

guopengf commented 2 years ago

Hi, I just upload the conda environment to this repo. Basically, you can run the code by following steps:

  1. Clone this repo to your local computer

git clone https://github.com/guopengf/FL-MRCM.git

  1. Set up conda environment ( for installing conda )

cd FL-MRCM conda env create -f conda_environment.yml conda activate recon

  1. Follow the instruction in README to download the preprocessed data via OneDrive or BaiduYun.

  2. Correct the dataset path

    In main_fl_mr.py Line 23-26, change the path to where you save the datasets. Since HPKS dataset currently is not released, you may remove 'H' dataset for now.

  3. Run the code

python main_fl_mr.py --phase train --dataset mri --model unet --epochs 50 --challenge singlecoil --local_bs 16 --num_users 3 --local_ep 2 --train_dataset BFI --test_dataset B --sequence T1 --accelerations 4 --center-fractions 0.08 --val_sample_rate 1.0 --save_dir 'Dir path for saving checkpoints' --verbose

replace the 'Dir path for saving checkpoints' to your exp folder

  1. Monitor the traning process

tensorboard --logdir 'Dir path for saving checkpoints'

Hopefully, this can help you get started.

wiildsoul commented 2 years ago

THANK YOU

AND WILL COMMENT HERE IF THERE ARE ANY ISSUES