Git Product home page Git Product logo

diffcmr's Introduction

DiffCMR

Tianqi Xiang*, Wenjun Yue*, Yiqun Lin, Jiewen Yang, Zhenkun Wang, Xiaomeng Li, "DiffCMR: Fast Cardiac MRI Reconstruction with Diffusion Probabilistic Models" MICCAI2023 CMRxRecon Workshop

Data preparation

Download the CMRxRecon dataset from the official website.

Prepare Task 1 data

Open data_task1.ipynb and modify 2 variables:

original_dataset_path = "/<your path>/MICCAIChallenge2023/ChallengeData"
save_prepared_dataset_path = "/<your path>/MICCAIChallenge2023/Task1"

Run data_task1.ipynb to get preprocessed data and 6 pair files for Task 1.

Prepare Task 2 data

Open data_task2.ipynb and modify 3 variables:

dataroot = "/<your path>/MICCAIChallenge2023/ChallengeData"
saveroot = "/<your path>/MICCAIChallenge2023/Task2"
pair_dir = "/<your path>/MICCAIChallenge2023/Task2_pair"

Run data_task2.ipynb to get preprocessed data and pair files for Task 2.

Note that pair files are generated to record the absolute paths of preprocessed data, as long as the path for preprocessed data remains unchanged, you can relocate the pair files at your convience.

Train

Task 1

Open train_task1_diff.py, modify the variable trainpairfile to the path of pair file for Task1 AccFactor 04/08/10.

python train_task1_diff.py

Task 2

Open train_task2_diff.py, modify the variable trainpairfile to the path of pair file for Task2 AccFactor 04/08/10.

python train_task2_diff.py

After training, model weights are stored in logdir set in the training files. Note that you will be running 6 times to conduct the entire experiment for both tasks and all coil numbers.

Inference

Open inferece.py, modify 3 variables:

result_dir = "<path to store results>"
model_path = "<path of model weights>"
val_pair_file = "<validation pair file>"

Execute inferece.py. Results are listed in the result_dir.

diffcmr's People

Contributors

xtqzcm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

diffcmr's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.