Skip to content

sanuwanihewa/MultiFieldDiff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multi-Task Diffusion-Adapter Model for MRI Synthesis Across Multiple Field Strengths

Abstract
MRI across different field strengths presents distinct trade-offs in cost, accessibility and diagnostic quality. For instance, low-field scanners provide a portable and cost-effective method but produce images with a lower signal-to-noise ratio, while ultra-high-field scanners give higher resolution imaging yet remain limited in access. Deep learning-based synthesis can bridge these quality gaps, but existing methods address each field-strength transition independently, as multiple synthesis directions within a single framework are challenging due to different degradation characteristics, requiring distinct recovery strategies across the enhancement tasks. To address this, we propose an adaptive multi-task diffusion approach that supports multiple cross-field synthesis. As each task demands different forms of structural recovery, we introduce context-aware feature modulation conditioned on the noise level to regulate coarse reconstruction and fine-detail refinement during the synthesis. We also introduce region-specific anatomical constraints to further ensure the structural fidelity of the synthetic results. Experiments on paired 64mT, 3T, 7T brain MRI demonstrate accurate synthesis across field-strength transitions, with downstream task performance further validating the effective enhancement.

Architecture

alt text

System Requirement
All the experiments are conducted on Ubuntu 20.04 Focal version with Python 3.8.

To train the model with the given settings, the system requires a GPU with at least 40GB. All the experiments are conducted on two Nvidia A40 GPUs. (Not required any non-standard hardware)

Installation Guide
Prepare an environment with python>=3.8 and install dependencies

pip install -r requirements.txt

Dataset Preparation
The experiments are conducted on an in-house paired 64mT-3T and 3T-7T dataset,

First, extract the middle axial slices of each nifti file normalize and save as .npy To derive high-field segmentations, use SynthSeg++ and similarly save segmentations as .npy


data/
├── T1/
│   ├── train/
│   │   ├── lf_t1.npy
│   │   └── hf_t1.npy
│   │   └── 3T_t1.npy
│   │   └── 7T_t1.npy
│   │   └── hf_segs.npy
│   │   └── uhf_segs.npy
│   ├── test/
│   │   ├── lf_t1.npy
│   │   └── hf_t1.npy
│   │   └── 3T_t1.npy
│   │   └── 7T_t1.npy
│   ├── val/
│   │   ├── lf_t1.npy
│   │   └── hf_t1.npy
│   │   └── 3T_t1.npy
│   │   └── 7T_t1.npy

Train Model
To train the model on the multi-field datasets.

python train.py --image_size 256 --exp exp_multiField --num_channels 1 --num_channels_dae 64 --ch_mult 1 2 4 --num_timesteps 4 --num_res_blocks 2 --batch_size 3 --num_epoch 30 --ngf 64 --embedding_type positional --ema_decay 0.999 --r1_gamma 1. --z_emb_dim 256 --lr_d 1e-4 --lr_g 1.6e-4 --lazy_reg 10 --num_process_per_node 3

Hyperparameter Setting

Task Contrast PSNR (dB) SSIM (%) MAE (%) Timesteps λc λs λR Batch size
ULF → HF T1w 20.54 ± 1.71 75.74 ± 5.88 4.78 ± 1.17 4 1.0 1.0 0.3 1
ULF → HF T2w 22.40 ± 1.54 79.64 ± 7.58 3.75 ± 0.94 4 1.0 1.0 0.3 1
HF → UHF T1w 19.38 ± 1.25 72.71 ± 5.87 5.48 ± 1.40 4 1.0 1.0 0.3 1
HF → UHF T2w 21.30 ± 1.71 68.86 ± 10.10 5.53 ± 1.48 4 1.0 1.0 0.3 1

Test Model

python test.py --image_size 256 --exp exp_multiField  --num_channels 1 --num_channels_dae 64 --ch_mult 1 2 4 --num_timesteps 4 --num_res_blocks 2 --batch_size 1 --embedding_type positional  --z_emb_dim 256  --gpu_chose 0 --input_path '/data/T1' --output_path '/results'

Acknowledgements
This repository makes liberal use of code from Tackling the Generative Learning Trilemma and SynDiff

About

Repository for Multi-Task Diffusion-Adapter Model for MRI Synthesis Across Multiple Field Strengths

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors