qic999's picture
Upload folder using huggingface_hub
28e6f98 verified
Raw
History Blame Contribute Delete
2.5 kB
mamba activate diffmri
cd /home/cbtil3/hao/repo/Frequency-Diffusion
# cd STEP1.AutoencoderModel2D
#git stash
git pull
datapath=/home/hao/data/medical/Brain/
# /gamedrive/Datasets/medical/Brain/
dataset=Brain
domain=BraTS-GLI-T1C # T1C
aux_modality=T1N # T1C, T1N, T2W, T2F
num_channels=1
# T1: T1-weighted MRI; T1c: gadolinium-contrast-enhanced T1-weighted MRI;
diffusion_type=twobranch_kspace # Easy NaN
time_step=30
image_size=480 #128
sampling_routine=x0_step_down_fre # x0_step_down_fre # x0_step_down_fre # default | x0_step_down | x0_step_down_fre
loss_type=l1 # l2 1 # l2 | l1 | l2_l1, l1 is better
tag=new_norm #add_blur_transformer # x0_step_down | x0_step_down_fre
deviceid=1 # specify the GPU ids
# fre_before_attn + l1
train_bs=2 # 4 | 32 | 24 | 36
save_folder=./results/${diffusion_type}_${sampling_routine}
datapath=/home/hao/data/medical/Brain/
datapath=/gamedrive/Datasets/medical/Brain/brats/Processed/
mode=train
# Train
python main.py --time_steps $time_step --train_steps 700000 \
--save_folder $save_folder --tag $tag \
--data_path $datapath --dataset $dataset \
--domain $domain --aux_modality $aux_modality \
--sampling_routine $sampling_routine \
--remove_time_embed --residual --image_size $image_size \
--diffusion_type $diffusion_type --train_bs $train_bs \
--num_channels $num_channels --deviceid $deviceid \
--kernel_std 0.15 --loss_type $loss_type --debug --mode $mode # --debug, --discrete
# FSM Brain
/gamedrive/Datasets/medical/FrequencyDiffusion/image_100patients_4X
BraTS20_Training_099_99_t1.png
BraTS20_Training_099_99_t2.png
mode=test
checkpoint=results/52_twobranch_kspace_x0_step_down_fre_new_norm/model.pt
deviceid=1 # deviceid=1
# test
python main.py --time_steps $time_step --train_steps 700000 \
--save_folder $save_folder --tag $tag \
--data_path $datapath --dataset $dataset \
--domain $domain --aux_modality $aux_modality \
--sampling_routine $sampling_routine \
--remove_time_embed --residual --image_size $image_size \
--diffusion_type $diffusion_type --train_bs $train_bs \
--num_channels $num_channels --deviceid $deviceid \
--kernel_std 0.15 --load_path $checkpoint --debug --mode $mode # --debug, --discrete
# Knee
/gamedrive/Datasets/medical/Knee/fastMRI/