Skip to content

Latest commit

 

History

History
42 lines (37 loc) · 1.2 KB

File metadata and controls

42 lines (37 loc) · 1.2 KB

SFusion: Self-attention based N-to-One Fusion Block

[Paper] [Code] MICCAI 2023

✅ Tested at commit: 8359e49

Requirements

Code was tested using:

python==3.10.12
torch==2.7.1

How to run

Run mmFormer using the same Python environment and data preprocessing setup as IM-Fuse. Please refer to that guide for detailed instructions on how it is done.

cd SFusion
source ../IMFuse/imfuse_venv/bin/activate

Training

Run the training script train_sfusion.py with the following arguments:

python train_sfusion.py \
  --datapath <PATH>/BRATS2023_Training_npy \   
  --num_epochs 200 \                           
  --dataname BRATS2023 \                       
  --savepath <OUTPUT_PATH> \                    
  --batch_size 1                               
  --feature_maps 16                            

Test

Run the test script test_sfusion.py setting the data path and the path to the checkpoint in the script.

python test_sfusion.py --datapath <DATASET_DIRECTORY>
--resume <CHECKPOINT_PATH>
--savepath <RESULTS_FILE_PATH>