Here is the code for pretraining the foundation model for spectral analysis, which is now under peer review so that the partial core source code can be uploaded to the project.
utils: The file fold contains general pretraining model weights and usage tools.
Preprocessing: The file fold contains scripts for preprocessing, source files, and results of infrared paraffin removal and SERS NPs removal.
quantify: The file fold contains scripts for quantification and spectral data to be quantified.
ComFilE: The file fold contains scripts and results for the Component Filtering Explanation.
DSCF model is a hierarchical local attention encoder-decoder transformer. The detailed components of the model are described in DSCF_model_pe.py. The following image is the general outline of the general pre-trained model.
Paraffin removal is a general routine in FFPE IR analysis. DSCF model can be tailored for paraffin removal. The following images are results of raw data, paraffin and paraffin-removed data.
Some of the in-silico explaining results are as follows, where highlighted components are ground truth.
The code for detailed downstream tasks is coming soon after the manuscript is formally published.