Environment Setup
conda create -n swinunet python=3.8 && conda activate swinunet
pip install -r requirements.txt
Download code from GitHub - HuCaoFighting/Swin-Unet
Pretrained Model & Dataset
Download swin_tiny_patch4_window7_224.pth to pretrained_ckpt/.
Download project_TransUNet.zip, extract data/ to root.
Rename lists/list_Synapse to lists/Synapse, create val.txt with case IDs.
Code Modifications
train.py: adjust--num_classes,--n_class,--num_workers,--batch_sizetrainer.py: setnum_workers=0
Training
python train.py --max_epochs 20 --base_lr 0.05 --batch_size 12
Models saved to output/ as best_model.pth and last_model.pth.