AFTER-QSM

March 20, 2026 · View on GitHub

Affine Transformation Edited and Refined (AFTER) Deep Neural Network for Quantitative Susceptibility Mapping

NeuroImage 2022  |  deepMRI collection

AFTER-QSM is a dedicated deep neural network for QSM reconstruction from highly oblique and anisotropic resolution scans (down to 0.6 mm isotropic), where standard networks trained on axial data fail due to orientation mismatch.


Requirements

  • Python 3.7+, PyTorch
  • NVIDIA GPU (8 GB+ VRAM recommended)

Tested on: Windows 11.


Overview

Framework

AFTER-QSM Framework

Fig. 1: Overview of the AFTER-QSM training process using affine transformation editing and refinement.

Simulation Results

Simulation


Usage

Training

python train.py \
  --root <training_data_root> \
  --file_path <path_list_file> \
  --depth 4 \
  --recon_base 32 \
  --channel_num 16 \
  --refine_base 16 \
  --block_num 3 \
  --layer_num 4 \
  --batch_size 1 \
  --epoch 100 \
  --gpu_num 1 \
  --lr1 1e-4 \
  --lr2 1e-4

Implement your dataset by overriding path_composition in train.py.

Key training arguments:

ArgumentDescription
--rootRoot directory of training dataset
--depthU-net depth for QSM reconstruction
--recon_baseBase channel number for reconstruction U-net
--channel_numChannels for successive refinement network
--refine_baseBase channels for refinement network
--block_numNumber of RDB blocks
--layer_numLayers per RDB block
--use_denseDense architecture vs. Squeeze-and-Excitation
--paddingZero-padding radius for rotation boundary

Testing

python test.py \
  --field_path <path_to_field_map.nii> \
  --vox <vx vy vz> \
  --z_prjs <x y z> \
  --checkpoint_path <path_to_checkpoint> \
  --save_path <output_dir>

Key testing arguments:

ArgumentDescription
--field_pathPath to testing data
--voxVoxel size of testing data
--z_prjsB0 direction (z-projections)
--use_GPUUse GPU (boolean)
--GPU_NOGPU device index
--save_pathOutput save path
--checkpoint_pathPath to model checkpoint
--segment_numMemory trade-off: 8 for <24 GB, 4 for <12 GB
--data_typefield for direct recon, otherwise forward calc

Citation

@article{afterqsm2022,
  title={Affine transformation edited and refined deep neural network for quantitative susceptibility mapping},
  journal={NeuroImage},
  year={2022},
  doi={10.1016/j.neuroimage.2022.119655}
}

⬆ top  |  deepMRI collection