Skip to content

ramithuh/bacteria-classification

Repository files navigation

Detection of infection and antimicrobial resistance of bacteria

This repository contains the official python implementation of the paper - https://doi.org/10.1101/2022.07.07.499154

Dataset download link -> Google Drive

Setting up the environment

## create new environment
conda create -n qpm_env python=3.6
source activate qpm_env

## Adding new environment to JupyterLab
conda install -c anaconda ipykernel -y
python -m ipykernel install --user --name=qpm_env

conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=11.1 -c pytorch -c nvidia
conda install -c conda-forge matplotlib
conda install -c conda-forge wandb

#install remaining packages through pip
pip install -r requirements.txt

Directory Structure

  • Modules - supporting python library
  • Notebooks - different experiments
Classification Task Training Notebook Saved Model N bacteria grouped evaluation
Gram Stain Classification Notebook link Notebook
Antibiotic Resistance Prediction Notebook link Notebook
Species Level Classification Notebook link Notebook
Strain Level Classification Notebook link Notebook

Running predicitons on the blind test

After downloading pretrained models and test dataset, you can edit the path in the python scripts below and the dataloader.py using data_dir variable.

Specify the concentration level (N) to be used for prediction in the line below,

Eg. running for N = 3, replace the line with, for N in [3]:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published