Skip to content

AMRI-Lab/Diffusion-QSM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Diffusion-QSM

This repo contains Matlab codes for generating input data and python codes for running Diffusion-QSM.

Diffusion-QSM: diffusion model with time-travel and resampling refinement for quantitative susceptibility mapping

Setup

Our codes are built upon guided-diffusion, you may install the environment based on guided-diffusion.

  • STISuite 3.0
  • PyTorch 2.4.1
  • Python 3.8

Introduction to files

  1. data_prep

test data preparation, run demo.m to generate data_DiffusionQSM.mat under data_prep/data folder

  1. guided_diffusion

files for DDPM and QSM-related codes, important files include gaussian_diffusion.py and data_consistent.py

  1. weights

trained weight model700000.pt from Google Drive

  1. recon.py

inference code, recommend to adjust only in variable args_params

Usage

Data preparation

  1. Generate test data data_DiffusionQSM.mat containing phi_use, mask, D2 and pad_size based on the demo.m files in data_prep folder. You can download one test data via Google Drive.
  2. Download the trained weight of the network via Google Drive and place it in weights folder
  3. Adjust the args_params in recon.py

Testing

  1. Run recon.py for generating Diffusion-QSM output
  2. The results are saved under data_prep/data/results

Contact

Feel free to contact [email protected] for questions/discussions/suggestions.

About

repo for Diffusion-QSM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published