Prior-Guided Selective Parameter Fine-Tuning for Source-Free Domain Adaptive Medical Image Segmentation
PyTorch implementation of our source-free unsupervised domain adaptation method with prior-guided selective parameter fine-tuning.
Ensure your data directory follows this structure:
data_root/
├── Domain1/
│ ├── train/ROIs/
│ └── test/ROIs/
├── Domain2/
│ ├── train/ROIs/
│ └── test/ROIs/
└── Domain3/
├── train/ROIs/
└── test/ROIs/
First, train the model on the source domain:
python train_source.py \
--gpu 0 \
--dataset Domain3 \
--data-dir /path/to/your/data \
--batch-size 8 \
--max-epoch 200Then, perform source-free domain adaptation on the target domain:
python train_target.py \
--gpu 0 \
--model-file /path/to/source/model.pth.tar \
--out /path/to/output/directory \
--data-dir /path/to/your/data \
--dataset Domain2 \
--batch-size 8 \
--epoch 30 \
--keep-ratio 0.1 \
--import-ratio 0.1