KAID implementation
Dependency
conda install pytorch=1.8.1 torchvision torchaudio cudatoolkit=10.1 -c pytorch
pip3 install -r requirements.txt
Generate dataset
python3 data_preprecess/brats2021.py
Prepare statistics for FID metric. See ./fid_stats/gen_fid_stats.py for details.
python3 ./fid_stats/gen_fid_stats.py --dataset 'ixi' --source-domain 't2' --target-domain 'pd' --gpu-id 0
Options. See ./configuration/config.py for details.
--fid [default=true]
--noise-type 'slight'/'severe' [default='normal']
--identity [default=true]
--diff-privacy [default=true]
--debug --save-img --single-img-infer
--save-model --load-model --load-model-dir './work_dir/centralized/ixi/Tue Jan 11 20:18:31 2022'
BraTS2021 ['t1', 't2', 'flair']
python3 centralized_training.py --dataset 'brats2021' --model 'cyclegan' --source-domain 't1' --target-domain 'flair' --data-path '/disk1/medical/brats2021/training' --valid-path '/disk1/medical/brats2021/validation'
IXI ['t2', 'pd']
python3 centralized_training.py --dataset 'ixi' --model 'cyclegan' --source-domain 'pd' --target-domain 't2' --data-path '/disk1/medical/ixi' --valid-path '/disk1/medical/ixi'
python3 kaid.py --dataset 'ixi' --source-domain 'pd' --target-domain 't2' -g 1 --data-path '/disk/medical/ixi' --valid-path '/disk/medical/ixi' --nirps-path '/disk/medical/nirps_dataset' --train --num-epochs 30 --method 'normal'
python3 kaid.py --dataset 'ixi' --source-domain 'pd' --target-domain 't2' -g 1 --data-path '/disk/medical/ixi' --valid-path '/disk/medical/ixi' --nirps-path '/disk/medical/nirps_dataset' --validate --method 'normal' --diff 'l2'
IXI ['t2', 'pd']
python3 generate_nirps_dataset.py --dataset 'ixi' --data-path '/disk/medical/ixi' --valid-path '/disk/medical/ixi' --model 'cyclegan' --source-domain 't2' --target-domain 'pd' -g 3 --num-epoch 30
BraTS2021 ['t1', 't2', 'flair']
python3 genrrate_nirps_dateset.py --dataset 'brats2021' --data-path '/disk/medical/brats2021/training' --valid-path '/disk/medical/brats2021/validation' --model 'cyclegan' --source-domain 't1' --target-domain 't2' -g 2 --num-epoch 30
Sereval modes are described in the new settings of FedMed.
To reveal the real-world sitation in hosptials, datastream is organized as follows.
python3 generate_nirps_err_map.py
python3 artificial_scoring_system.py
python3 metric_consistency.py