csho33 / bacteria-ID

Source code and demos for "Rapid identification of pathogenic bacteria using Raman spectroscopy and deep learning"
MIT License
86 stars 36 forks source link

bacteria-ID

This repo contains demonstrations of using convolutional neural networks (CNNs) to identify the Raman spectra of pathogenic bacteria. This repository is adapted from the codebase used to produce the results in the paper "Rapid identification of pathogenic bacteria using Raman spectroscopy and deep learning."

The best place to start is with the Jupyter notebooks which are documented and commented, and should run out-of-the-box. We have provided pre-trained models that have been trained on the reference datasets.

Requirements

The code in this repo has been tested with the following software versions:

We recommend using the Anaconda Python distribution, which is available for Windows, MacOS, and Linux. Installation for all required packages (listed above) has been tested using the standard instructions from the providers of each package. Once Anaconda is installed, it should take no more than 10 minutes to install all of the requirements on a standard laptop or desktop computer.

Data

The data for the experiments can be downloaded here and should be saved in the data subdirectory, which should look like:

data/X_finetune.npy
data/y_finetune.npy
data/X_test.npy
data/y_test.npy
data/X_2018clinical.npy
data/y_2018clinical.npy
data/X_2019clinical.npy
data/y_2019clinical.npy

Files

This repo should contain the following files:

Running the notebooks

Experiment times reported in the notebooks were achieved on a 2018 Macbook Pro. If you find any bugs or have questions, please contact csho@stanford.edu