WALINET: A water and lipid identification convolutional Neural Network for nuisance signal removal in 1H MR Spectroscopic Imaging
WALINET is a neural network developed for the removal of residual lipid and water signal in Magnetic Resonance Spectroscopic Imaging (MRSI). In this repository we want to provide a brief overview of our work and provide a small working example.
The problem can be formulated using two distinct inputs
The solution (
WALINET and LIPNET employ a Y-Net convolutional neural network structure, as presented below.
The training spectra were generated through a multi-step process.
- First, resonance modes for 25 common
${}^1H$ metabolites were computed using a physical model for the coupled spin systems 23. Based on these modes, an extensive dataset of$10^6$ spectra was generated by simulation with a parameter distribution that encompassed a wide range of possibilities. - Subsequently, we extracted a collection of lipid spectra from voxels within the scalp region obtained from in-vivo datasets. To create the training input spectra, the simulated metabolite and collected lipid spectra were randomly combined.
- To generate training data for WALINET, lipid-contaminated spectra were simulated with the water signal overlaid. This involved applying HSVD residual water removal to the same in-vivo datasets as mentioned earlier, to extract samples of the water signal. Subsequently, each simulated spectrum was augmented with a generated water signal.
The figure below presents a qualitative comparison of WALICON and LIPCON to the conventional HSVD4+L2-Lip-Reg.1 on two subjects of metabolic maps such as NAA, glutamate and inositol, residual signal maps of water and lipids and spectral quality by displaying SNR maps including selected spectra with LCModel fit.
This repository provides
- The source code for the simulation of lipid contaminated metabolic spectra in 'LipIDCNN', which can be excuted with the script 'makeTrainData.py'.
- The code to train a neural network in 'src', including a 'run.py' and 'config.py' file. The 'run.py' file is intended for execution, the corresponding parameters can be changed in the 'config.py' file.
- A sample dataset of lipid spectra and the corresponding lipid projection operator are located in the direcotry 'data'
- The trained model WALINET and LIPNET from our paper.
Make sure all the required packages are installed
pip install numpy h5py time torch
We are currently in the process of obtaining permission to upload some of our data. We will update the repository as soon as possible.
Training data is generated from the 'LipProj' (lipid projection operator) and the 'LipStack' (stack of lipid contaminated spectra) file in the 'data' directory. The resulting training dataset will also be located in 'data'. The training data simulation can be initiated with
python makeTrainData.py
To start the training of WALINET with the previously generated data, the 'run.py' file has to be executed.
python run.py
Please modify the 'config.py' file to adjust the number of epochs and other training parameters.
Train models WALINET and LIPNET are provided in the directory 'models'. The easiest way to apply them is by changing the following parameters in the 'config.py' file
params["model_name"] = "WALINET" # or "LIPNET"
# Configurations
params["clean_model"] = False
params["train"] = False # deactivate training
params["predict"] = True # activate predictionAfter that you can execute the 'run.py' file similarly as above.
python run.py
If you find this useful, please cite our work as follows:
@article{weiserwalinet,
title={WALINET: A water and lipid identification convolutional neural network for nuisance signal removal in 1H MR spectroscopic imaging},
author={Weiser, Paul J and Langs, Georg and Motyka, Stanislav and Bogner, Wolfgang and Courvoisier, S{\'e}bastien and Hoffmann, Malte and Klauser, Antoine and Andronesi, Ovidiu C},
journal={Magnetic resonance in medicine}
}
Footnotes
-
Bilgic Berkin, Chatnuntawech Itthi, Fan Audrey P, et al. Fast image reconstruction with L2-regularization. Journal of magnetic resonance imaging. 2014;40(1):181–191 ↩ ↩2
-
Smith SA, Levante TO, Meier Beat H, Ernst Richard R. Computer simulations in magnetic resonance. An object-oriented programming approach. Journal of Magnetic Resonance, Series A. 1994;106(1):75–105. ↩
-
Songeon Julien, Courvoisier S ́ebastien, Xin Lijing, et al. In vivo magnetic resonance 31 P-Spectral Analysis With Neural Networks: 31P-SPAWNN. Magnetic Resonance in Medicine. 2023;89(1):40–53. ↩
-
Barkhuijsen H, De Beer R, Van Ormondt D. Improved algorithm for noniterative time-domain model fitting to exponentially damped magnetic resonance signals. Journal of Magnetic Resonance (1969). 1987;73(3):553–557. ↩

