WryBin / DRECT

3 stars 0 forks source link

Fast and High-Resolution Reconstruction for Laplace NMR based on Deep Learning

This is the original Pytorch implementation of DRECT in the following paper: High-Quality Reconstruction for Laplace NMR Based on Deep Learning.

image-20221019130652846

Requirements

Dependencies can be installed using the following command:

pip3 install torch==1.11.0 --extra-index-url https://download.pytorch.org/whl/cu113
pip3 install -r requirements.txt

Reproducibility

Test

Train

# For T1T2
python3 main.py --Type T1T2

# For DOSY
python3 main.py --Type DOSY

# For VD
python3 main.py --Type VD

Pre-trained models

Something wrong with git-lfs, you can get the pre-trained models on Google Drive instead.

Parameters

The parameters can be configured in config.py. The details about the parameters are described below.

Parameter name Description of parameter
n_layers Num of encoder layers
n_heads Num of heads
d_ff Dimension of feed forward modules
lr Learning rate
dropout The probability of dropout
label_size Number of points indicating the value of diffusion coefficient
batch_size The batch size of training input data
mul_label Label magnification
max_epochs Max train epochs
n_fre Number of points of chemical shift
o_fre Number of simulated peaks
max_fre Maximum value of simulated chemical shift
num_D Maximum number of simulated molecular components
min_sep Minimum separation between spikes, normalized by signal_dim
dB Noise level
max_b Maximum value of parameter b
num_samples Number of simulated samples (including training and evaluation)
max_D Maximum value of simulated diffuision coefficient
ratio Ratio of validation dataset in all data
sig Width of the simulated peak of Gaussian distribution.
signal_dim Dimension of the input signal
sig_lorz Width of the simulated peak of Lorentz distribution.
gpu The gpu no, used for training and test
base_D Minimum value of diffusion coefficient
lr_scheduler learning rate scheduler(Cosine or ReduceLR)

Others

Raw data for VD available at DOI: 10.15127/1.303820.(https://www.escholar.manchester.ac.uk/uk-ac-man-scw:303820 ), It needs to be processed by DOSYToolbox and our preprocessing module(MATLAB/Data/VD/Solve_data.m) after downloading.

Contact

If you have any questions, please contact us through Email (33320211150312@stu.xmu.edu.cn) or Github issues. Pull requests are highly welcomed!