Supplementary code for "Noise Learning of Instruments for High-contrast, High-resolution and Fast Hyperspectral Microscopy and Nanoscopy"
Noise-learning is a python package containing code for denoising micro- and nano- Raman spectra. This repository is still under construction.
- System requirements
- Installation guide
- Demo
- Instructions for use
Software:
- Python = 3.8.13
- PyCharm Community = 2022.1.3
Python packages:
- PyTorch = 1.5
- numpy
- scipy
- matplotlib.pyplot
- math
- random
- os
We recommend the users to install the python environment and relevant python packages via Anaconda3.
The typical install time should be around one hour.
After setup the running environment, download and unzip the code.
We provide Raman spectra dataset and pretrained AUnet model for model inferencing. Users can download them in the master branch of this repository.
Steps for runding demo:
- Download the pretrained AUnet model and Raman spectra dataset.
- Set the model and test dataset path in the config.py script.
- Run the main.py in PyCharm (or other IDEs such as Vscode, Spyder, JupyterNotebook), you will obtain the denoised Raman spectra.
The default output is .mat file that can be directly loaded in Matlab for visualization. You can also save the results as .npy or .txt files, and plot the curves in matplotlib.pyplot, or Origin to check the spectra before and after denoising.