Code for training a deep artifact suppression reconstruction method for SMS bSSFP imaging, as described in "Rapid online deep artifact suppression for real-time spiral bSSFP CMR with blipped-CAIPI simultaneous multi-slice imaging at 1.5 T".
Note: The code is currently only compatible with Linux, and requires Visual Studio Code and Docker.
To securely install and run the code in this repository:
-
Clone the Github repository
-
Navigate to the project folder in Visual Studio Code
-
"Reopen the folder in container" to run the devcontainer
To train a model on a subset of the the OCMR dataset (www.ocmr.info):
- Download a subset of multi-slice raw k-space data from the OCMR dataset (www.ocmr.info). In the terminal:
bash download_OCMR.sh
- Prepare the OCMR data by writing it as .npz-files by running:
python prepare_data.py
- Run the training script to train the model. In the terminal:
python training.py
- Navigate to the folder "test_set_images" to see the performance of your model on the test set, as gif:s showing the input image with artifacts, the output image from the network, and the ground truth image, stacked from top to bottom.
To run inference on a prospectively acquired dataset (prospective_example.h5, containing one SMS-2 slice) from the real-time SMS-2 sequence using your trained model and a pretrained model:
- Run the inference script through
python run_inference.py -m NAME_OF_YOUR_TRAINED_MODEL
For example, if you trained model in the folder "training" has the name "my_model_20260110_083618", run:
'python run_inference.py -m "my_model_20260110_083618"'
- Find the reconstructed images from your model and from the pretrained model in the folder "reconstructed_images". The results are saved as mp4:s, where the input image is shown on top and the output image on bottom, as shown here: