Official code for the publication:
Deep learning corrects artifacts in RASER MRI profiles
Moritz Becker, Filip Arvidsson, Jonas Bertilson, Elene Aslanikashvili, Jan G. Korvink, Mazin Jouda, Sören Lehmkuhl
Magnetic Resonance Imaging, Volume 115, January 2025, 110247
https://doi.org/10.1016/j.mri.2024.110247
- Project Overview
- Project Structure
- Dataset
- Installation & Dependencies
- Usage
- Reference
- Citation
- Contact
This repository provides the code for a deep learning pipeline that corrects severe artifacts in RASER MRI images using a two-step approach:
- 1D Correction: CNN for 1D RASER projections (nonlinear distortion correction)
- 2D Enhancement: U-net for 2D image enhancement
Models are trained on synthetic data but generalize to experimental data, enabling artifact correction in otherwise unusable RASER MRI images.
raser_mri_ai/
AI.py # Model training & evaluation (1D/2D)
image_AI.py # Image reconstruction & inference
image_data_processing.py # Data preprocessing
NN_architectures.py # PyTorch model definitions
utility_functions.py # Helper functions
models/
config_models.py # Pydantic experiment/model configs
LICENSE
pyproject.toml
README.md
The dataset (synthetic & experimental RASER MRI data) is openly available:
See the dataset repository for structure and terms.
Install dependencies (using Poetry):
poetry installOr with pip:
pip install .All main scripts use a Pydantic config object (RaserConfig), with an optional cnn field for CNN hyperparameters (kernel size, filters, activation, etc.). Adjust the initial_config variable in each script to control experiment setup, model, and training options.
- Script:
raser_mri_ai/image_data_processing.py - Purpose: Preprocess raw/simulated data into NumPy arrays for training/testing.
- How to use:
- Edit
initial_configinimage_data_processing.pyfor your dataset/system. - Run:
python -m raser_mri_ai.image_data_processing
- Processed
.npyfiles are saved to the output directory.
- Edit
- Script:
raser_mri_ai/AI.py - Purpose: Train 1D/2D neural networks and evaluate performance.
- How to use:
- Edit
initial_configinAI.pyfor model/data/training options. - Run:
python -m raser_mri_ai.AI
- Results and trained weights are saved in the output directory.
- Edit
- Script:
raser_mri_ai/image_AI.py - Purpose: Apply trained models for image correction and evaluation.
- How to use:
- Edit
initial_configinimage_AI.pyfor model/input/output settings. - Run:
python -m raser_mri_ai.image_AI
- Outputs reconstructed images and evaluation results.
- Edit
See the paper for detailed methods, datasets, and results:
Deep learning corrects artifacts in RASER MRI profiles
Moritz Becker, Filip Arvidsson, Jonas Bertilson, Elene Aslanikashvili, Jan G. Korvink, Mazin Jouda, Sören Lehmkuhl
Magnetic Resonance Imaging, Volume 115, January 2025, 110247
https://doi.org/10.1016/j.mri.2024.110247
If you use this code or data, please cite:
Becker, M., Arvidsson, F., Bertilson, J., Aslanikashvili, E., Korvink, J. G., Jouda, M., & Lehmkuhl, S. (2025). Deep learning corrects artifacts in RASER MRI profiles. Magnetic Resonance Imaging, 115, 110247. https://doi.org/10.1016/j.mri.2024.110247
For questions or collaborations, contact the corresponding author as listed in the paper.