Skip to content

xubin471/PSP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

76 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

[MICCAI 2026] PSP: Harnessing Position and Shape Priors for Cross-Domain Few-Shot Medical Image Segmentation

πŸŽ‰Our paper is accepted to MICCAI 2026 !!!

🚩Abstract

Few-Shot Medical Image Segmentation (FSMIS) offers a powerful solution to data scarcity but struggles to generalize across different imaging modalities. This performance collapse stems primarily from the drastic texture discrepancies between domains, which mislead models trained on source-specific intensity distributions. While existing methods attempt to align frequency or local texture features, they often fail to decouple semantic structure from domain-specific appearance. To address this, we identify a critical invariance: despite distinct imaging physics, the position and geometric shape of organs remain robustly consistent across modalities. Therefore, we propose a novel framework that harnesses Position and Shape Priors (PSP) for cross-domain FSMIS. Specifically, PSP first introduces a Position Coordinate Embedding (PCE) module to inject relative spatial coordinates for rapid organ localization. Subsequently, a Shape Prototype Modulation (SPM) module constructs domain-invariant structural prototypes via explicit shape priors, effectively filtering out texture noise. Furthermore, the Hybrid-Prototype Prediction (HPP) module adaptively calibrates the support prototype to the query feature distribution, mitigating feature misalignment. Extensive experiments on two public medical imaging datasets demonstrate that PSP significantly outperforms state-of-the-art methods.

πŸ’‘Motivation

We observe a key medical characteristic: although imaging textures vary drastically across modalities, the anatomical position and geometric shape of the same organ remain highly consistent between support and query images. This indicates that position and shape serve as ideal "cross-domain invariants". Effectively harnessing these anatomical priors can guide the model to break free from excessive reliance on domain-specific features, thereby achieving robust segmentation. Regardless of the domain, the support and query images exhibit high consistency in position (centroid coordinates) and shape (visualized by Turning Functions).

πŸ”Overview of PSP

πŸ—οΈQuick start

πŸ”–1. Dependencies

Please install the following dependencies:

dcm2nii
json5==0.8.5
jupyter==1.0.0
nibabel==2.5.1
numpy==1.24.4
opencv_python==4.11.0.86
Pillow>=8.1.1
sacred==0.8.7
scikit_learn==1.3.2
scikit-image==0.18.3
SimpleITK==2.5.2
torch==2.4.1
torchvision==0.19.1
matplotlib==3.7.5
scipy==1.16.0

πŸ“‹2. Datasets and Pre-processing

  1. Download Datasets:
  1. Data Pre-processing:
  • Pre-processing is performed according to Ouyang et al. and we follow the procedure on their GitHub repository.
  1. Directory Structure: The final data should be stored in the ./data directory. The structure is as follows:
./data
β”œβ”€β”€ ABD
β”‚   β”œβ”€β”€ ABDOMEN_CT
β”‚   β”‚   β”œβ”€β”€ sabs_CT_normalized
β”‚   β”‚   └── supervoxels_5000
β”‚   └── ABDOMEN_MR
β”‚       β”œβ”€β”€ chaos_MR_T2_normalized
β”‚       └── supervoxels_5000
β”œβ”€β”€ Cardiac
β”‚   β”œβ”€β”€ bSSFP
β”‚   β”‚   β”œβ”€β”€ cmr_bssFP_normalized
β”‚   β”‚   └── supervoxels_5000
β”‚   β”œβ”€β”€ LGE
β”‚   β”‚   β”œβ”€β”€ cmr_LGE_normalized
β”‚   β”‚   └── supervoxels_5000
β”œβ”€β”€ Prostate
β”‚   β”œβ”€β”€ NCI
β”‚   β”‚   β”œβ”€β”€ tcia_p3t_normalized
β”‚   β”‚   └── supervoxels_......
β”‚   └── UCLH
β”‚       β”œβ”€β”€ biopsy_normalized
β”‚       └── supervoxels_.......

πŸ“Download ResNet Pre-trained Weights

resnet50-imagenet https://download.pytorch.org/models/resnet50-19c8e357.pth
resnet50-coco https://download.pytorch.org/models/deeplabv3_resnet50_coco-cd0a2569.pth
resnet101-imagenet https://download.pytorch.org/models/resnet101-63fe2227.pth
resnet101-coco https://download.pytorch.org/models/deeplabv3_resnet101_coco-586e9e4e.pth
  1. Download the resnet50-coco weights as our pre-trained model.
  2. Create a checkpoint directory and place the downloaded model inside it. The directory structure should look like this:
\checkpoint
└── deeplabv3_resnet50_coco-cd0a2569.pth
  1. (optional) You can download our pre-trained models for different tasks:

After downloading, update the path accordingly in the test script.

πŸ”₯Training and Inference

There are 6 training tasks:

  1. Abdomen CT (train)-> MR(inference)
  2. Abdomen MR (train)-> CT(inference)
  3. Cardiac LGE(train) -> bSSFP(infernce)
  4. Cardiac bSSFP (train) -> LGE(inference)
  5. Prostate NCI (train) -> UCLH(inference)
  6. Prostate UCLH (train) -> NCI (inference)

The training and inference commands for each task are listed in the table below:

Task Training Command Inference Command
1. CT-> MR ./scripts/train_on_ABDOMEN_CT.sh ./scripts/test_ABDOMEN_CT2MR.sh
2. MR->CT ./scripts/train_on_ABDOMEN_MR.sh ./scripts/test_ABDOMEN_MR2CT.sh
3. LGE -> bSSFP ./scripts/train_on_Cardiac_LGE.sh ./scripts/test_Cardiac_LGE2bssFP.sh
4. bSSFP -> LGE ./scripts/train_on_Cardiac_bSSFP.sh ./scripts/test_Cardiac_bssFP2LGE.sh
5. NCI -> UCLH ./scripts/train_on_Prostate_NCI.sh ./scripts/test_Prostate_NCI2UCLH.sh
6. UCLH -> NCI ./scripts/train_on_Prostate_UCLH.sh ./scripts/test_Prostate_UCLH2NCI.sh

Taking CT->MR as an example:

Training:

./scripts/train_on_ABDOMEN_CT.sh # Ensure the file has execution permissions

Inference:

./scripts/test_ABDOMEN_CT2MR.sh

Experiment

Quantitative Comparison on Cross-Modality Dataset

Comparison of different methods in Dice scores (%).
Bold: Best results; Underlined: Second best results.

Method Ref. Abd CT β†’ MRI Abd MRI β†’ CT
Liver LK RK Spleen Mean Liver LK RK Spleen Mean
SSL-ALP TMI'22 70.74 55.49 67.43 58.39 63.01 71.38 34.48 32.32 51.67 47.46
ADNet MIA'22 50.33 39.36 37.88 39.37 41.73 64.25 37.39 25.62 42.94 42.55
PATNet ECCV'22 57.01 50.23 53.01 51.63 52.97 75.94 46.62 42.68 63.94 57.29
CATNet MICCAI'23 44.58 43.67 50.27 46.34 46.21 54.52 41.73 40.24 45.84 45.60
RPT MICCAI'23 49.22 42.45 47.14 48.84 46.91 65.87 40.07 35.97 51.22 48.28
IFA CVPR'24 48.81 45.79 51.46 51.42 49.37 50.05 36.45 32.69 43.08 40.57
RobustEMD AIIM'25 60.16 66.34 70.26 53.71 62.61 69.82 63.79 50.34 59.88 60.95
FAMNet AAAI'25 73.01 57.28 74.68 58.21 65.79 73.57 57.79 61.89 65.78 64.75
DSM TIP'25 72.94 61.59 69.52 59.00 65.76 77.69 56.60 56.45 59.63 62.59
PSP(Ours) - 70.24 69.96 78.70 58.56 69.36 73.44 64.48 69.17 65.91 68.25

Comparison of Dice scores (%) on Cardiac dataset.
Bold: Best results; Underlined: Second best results.

Quantitative Comparison on Cross-Sequence Dataset

Method Ref. Cardiac LGE β†’ b-SSFP Cardiac b-SSFP β†’ LGE
LV-BP LV-MYO RV Mean LV-BP LV-MYO RV Mean
SSL-ALP TMI'22 83.47 22.73 66.21 57.47 65.81 25.64 51.24 47.56
ADNet MIA'22 58.75 36.94 51.37 49.02 40.36 37.22 43.66 40.41
PATNet ECCV'22 65.35 50.63 68.34 61.44 66.82 53.64 59.74 60.06
CATNet MICCAI'23 64.63 42.41 56.13 54.39 45.77 43.51 46.02 45.10
RPT MICCAI'23 60.84 42.28 57.30 53.47 50.39 40.13 50.50 47.00
IFA CVPR'24 64.04 43.22 74.58 62.28 68.07 36.07 60.42 54.85
RobustEMD AIIM'25 75.32 51.32 72.86 66.50 73.19 50.02 60.29 61.16
FAMNet AAAI'25 86.64 51.84 76.26 71.58 77.37 52.05 54.75 61.39
DSM TIP'25 85.27 50.74 73.20 69.74 71.27 53.62 63.65 62.85
PSP(Ours) - 90.26 61.30 84.33 78.63 74.51 56.41 62.10 64.34

Ablation

Unless otherwise specified, all our experiments were conducted on the task Abd-MR -> Abd-CT.

Effect of each module.

PCE SPM HPP Mean Dice (%)
62.08
βœ”οΈ 63.45
βœ”οΈ βœ”οΈ 66.71
βœ”οΈ βœ”οΈ βœ”οΈ 68.25

Effect of the number of low frequency components.

Impact of the saling factor $\alpha$ in HPP module

Impact of scaling factor $\alpha$ in HPP module on the performance of PSP (Abd-MR β†’ CT) in Dice Score (%).

Scaling factor Abd-MR β†’ CT
Liver LK RK Spleen Mean
5 74.43 63.36 66.56 64.34 67.17
10 73.96 64.79 67.10 64.58 67.59
15 72.73 68.82 67.73 65.66 68.73
20 73.44 64.48 69.17 65.91 68.25
25 70.86 66.62 66.95 66.17 67.65
30 71.23 66.53 65.97 65.42 67.29

Visualization

To demonstrate the superiority of our model, we compared the visual segmentation results of RobustEMD, FAMNet, and DSM with our PSP.

Abd-CT -> Abd-MR

Abd-MR -> Abd-CT

Cardiac-bssFP -> Cardiac-LGE

Cardiac-LGE -> Cardiac-bssFP

🌹Acknowledgements

Our code is built upon the works of SSL-ALPNet, ADNet and QNet, we appreciate the authors for their excellent contributions!

About

PSP: Harnessing Position and Shape Priors for Cross-Domain Few-Shot Medical Image Segmentation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors