Skip to content

junho1ee/pyssl_sers

Repository files navigation

PySSL_SERS

Implementation of PySSL_SERS

Requirements and installation

We will set up the environment using Miniconda. Clone the current repo

git clone https://github.com/junho1ee/pyssl_sers.git

This is an example for how to set up a working conda environment to run the code (but make sure to use the correct pytorch, cuda versions or cpu only versions):

conda create --name pyssl_sers python=3.9
conda activate pyssl_sers
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
pip install lightning==2.0.9

Dataset

Download

If you want to train our models with the data then:

  1. download it from links:
  2. unzip the directory and place it into data such that you have the path data/bacteria-id/org and data/covid/org

Preprocess

If you want to preprocess the data then:

python preprocess/data_preprocess_bacteria.py
python preprocess/data_preprocess_covid.py

Running the code

Pretraining a new model

python lightning_pretrain_ssl.py --pre byol --augtype phys

Finetuning and test a pretrained model

python lightning_finetune_pred.py --pre byol --task class30 --augtype phys --fold 0

Code references

Our implementation referred to thre following repositories:

Contact

If you have any questions, please contact

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages