Skip to content

weiserjpaul/WALINET

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WALINET: A water and lipid identification convolutional Neural Network for nuisance signal removal in 1H MR Spectroscopic Imaging

Description

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.

Strategy

The problem can be formulated using two distinct inputs $x_1$ and $x_2$: 1) the original MRS spectrum ($x_1$) containing metabolite signal $m$ contaminated with lipid $l$ and water $w$ signal, and 2) the spectrum ($x_2$) subjected to a projection onto the lipid subspace $1-\mathcal{L}$ using a L2-lipid regularization 1 approach with $\mathcal{L} = (1+\beta\mathbf{LL^H})^{-1}$,

$$x_1 = m + l + w$$ $$x_2 = (1-\mathcal{L}) x_1$$

The solution ($m$) is obtained in two steps, first estimating the spectrum $y$ exclusively containing the lipid and water signal, which is subsequently removed from the original contaminated MRS spectra,

$$y = l+ w$$ $$m = x_1 -y$$

Architecture

WALINET and LIPNET employ a Y-Net convolutional neural network structure, as presented below.

Data Simulation

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.

Results

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.

Getting Started

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.

Installation

Make sure all the required packages are installed

pip install numpy h5py time torch

Usage

Simulate Training Data

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

Train your own WALINET

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.

Apply provided models

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 prediction

After that you can execute the 'run.py' file similarly as above.

python run.py

Citation

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}
}

References

Footnotes

  1. 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

  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.

  3. 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.

  4. 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages