MoDIP
March 20, 2026 · View on GitHub
Quantitative Susceptibility Mapping through Model-Based Deep Image Prior
NeuroImage 2024 | deepMRI collection
MoDIP performs QSM reconstruction using a model-based deep image prior (DIP) framework, combining a forward physical model with a data-driven prior without requiring training data.
Overview

Requirements
- Python 3.7+, PyTorch
- NVIDIA GPU
Installation
git clone https://github.com/sunhongfu/MoDIP.git
cd MoDIP
conda create -n MoDIP python=3.8
conda activate MoDIP
pip install torch nibabel numpy scipy
Quick Start
python recon.py \
--data_path sample.nii \
--save_path ./result \
--z_prjs 0 0 1 \
--vox 1 1 2 \
--input_type phi
Arguments
Input:
| Argument | Description |
|---|---|
--data_path | Path to input NIfTI file |
--is_fieldmap | Set if input is a field map (not raw phase) |
--input_type | Input type: phi (raw phase), pure (axial field map), or noise |
DFO (Data Fidelity Optimization):
| Argument | Description |
|---|---|
--iter | Number of DFO iterations |
--alpha | DFO step size |
DIP (U-net):
| Argument | Description |
|---|---|
--depth | U-net depth |
--base | Base channel number |
--decoder_block_num | Number of decoder blocks |
Other:
| Argument | Description |
|---|---|
--z_prjs | B0 direction (z-projections), e.g. 0 0 1 for axial |
--vox | Voxel size in mm, e.g. 1 1 2 |
--crop_background | Crop background (mask background to 0 beforehand) |
--padding_mode | Padding mode for QSM forward calculation |
Memory tip: Decrease
--base(channel number) and increase--iterif GPU memory is insufficient.
Citation
@article{modip2024,
title={Quantitative susceptibility mapping through model-based deep image prior},
journal={NeuroImage},
year={2024},
doi={10.1016/j.neuroimage.2024.120...}
}