Skip to content

[MICCAI 2025] Official Pytorch Code for Mono-Modalizing Extremely Heterogeneous Multi-Modal Medical Image Registration

License

Notifications You must be signed in to change notification settings

HyunKyungHan/M2M-Reg

 
 

Repository files navigation

M2M-Reg: Mono-Modalizing Extremely Heterogeneous Multi-Modal Medical Image Registration

Accepted at MICCAI 2025

📄 arXiv Preprint


🔧 Requirements

To set up the environment:

conda env create -f environment.yml
conda activate m2m_reg

📁 Dataset Preparation

This project uses data from the ADNI dataset, specifically:

  • 18F-FBB PET
  • FA (Fractional Anisotropy)
  • T1-weighted MRI

We perform PET-MRI and FA-MRI registration. For each subject, we assume the presence of:

  • A paired image set (PET-MRI or FA-MRI)
  • A segmentation mask derived from the MRI

Note: The segmentation mask is not used during training, but is used for validation purposes only.


🔄 Preprocessing

We assume that image pairs and segmentation masks are already co-registered. This repository includes only the post-registration steps such as resampling and cropping.

Segmentation (e.g., via FreeSurfer) and registration (e.g., via ANTsPy) steps are not released due to external constraints, but can be replicated using the mentioned tools.

Example directory structure (PET-MRI)

data_root/
└── SubjectID/
    ├── 256_PET.nii
    ├── 256_MR.nii
    └── seg_MR.nii

Run preprocessing

  • PET-MRI:
sh preprocess/preprocess_ADNI_FBB.sh
  • FA-MRI:
sh preprocess/preprocess_ADNI_FA.sh

Additional scripts

  • FA skull stripping: preprocess/synthstrip_fa.py
  • Merging DKT-based ROI labels: preprocess/remap_segmentation_label.py

🧬 HDF5 File Generation

Subject metadata must be provided via a Google Spreadsheet with the following required columns:

  • PatientID
  • set
  • exclude

You must provide the spreadsheet URL as the sheet_url argument when generating the HDF5 file.

Expected folder structure after preprocessing (PET-MRI example)

~/M2M-Reg/datasets/ADNI_FBB_preprocessed/
└── SubjectID/
    ├── {SubjectID}_preprocessed_PT.nii
    ├── {SubjectID}_preprocessed_MR.nii
    └── {SubjectID}_preprocessed_seg_map.nii

Generate the HDF5 dataset:

sh preprocess/generate_hdf5_from_sheet.sh

🏋️ Training

Launch training with:

sh scripts/train.sh

Use the num_cano argument to control the training strategy, such as:

  • Unsupervised
  • Semi-supervised (can control the number of pre-aligned pairs used via num_cano)

Refer to the help message for detailed argument usage.


🧪 Testing

Run testing with:

sh scripts/test.sh

The target_pid column in the subject Spreadsheet is required and is used to define subject pairings for evaluation.


🙏 Acknowledgements

This codebase is based on:

About

[MICCAI 2025] Official Pytorch Code for Mono-Modalizing Extremely Heterogeneous Multi-Modal Medical Image Registration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.7%
  • Shell 1.3%