Skip to content

Latest commit

 

History

History
69 lines (58 loc) · 2.24 KB

README.md

File metadata and controls

69 lines (58 loc) · 2.24 KB

CVAD

This repository contains PyTorch implementation of the following paper: CVAD: A generic medical anomaly detector based on Cascade VAE (https://arxiv.org/abs/2110.15811)

1. Table of Contents

2. Installation

  1. First clone the repository
    git clone https://github.com/XiaoyuanGuo/CVAD.git
    
  2. Create the virtual environment via conda
    conda create -n cvad python=3.7 
    
  3. Activate the virtual environment.
    conda activate cvad
    
  4. Install the dependencies.
    pip install --user --requirement requirements.txt
    

3. Experiment

To train the model on CIFAR10/SIIM-ISIC datasets, run the following commands:

CIFAR10
python -u main.py cifar10 CVAD ./ --channel 3 --cvae_n_epochs 100 --cls_n_epochs 20 --normal_class 0 
SIIM-ISIC

To use the model for SIIM-ISIC dataset, please download the data from https://www.kaggle.com/c/siim-isic-melanoma-classification/data into ./data/ folder.

python -u main.py siim CVAD ./ --channel 3 --cvae_n_epochs 100 --cls_n_epochs 20 

RSNA-Breast

python -u main.py breast CVAD --channel 1 --capacity 4 --cvae_n_epochs 100 --cls_n_epochs 20

python -u main.py breast CVAD --channel 1 --capacity 4  --cvae_n_epochs 100 --cls_n_epochs 20 --cvae_lr 0.000001 --cls_lr 0.000001

Try Data set

python -u main.py try CVAD --channel 1 --capacity 4  --cvae_n_epochs 20 --cls_n_epochs 8 --cvae_lr 0.000001 --cls_lr 0.000001

python -u main.py try CVAD --load_cvae_model True --cvae_model_path /mnt/storage/breast_cancer_kaggle/CVAD/weights/try/

4. Citing CVAD

If you use this repository or would like to refer the paper, please use the following BibTeX entry

@article{guo2021cvad,
  title={CVAD: A generic medical anomaly detector based on Cascade VAE},
  author={Guo, Xiaoyuan and Gichoya, Judy Wawira and Purkayastha, Saptarshi and Banerjee, Imon},
  journal={arXiv preprint arXiv:2110.15811},
  year={2021}
}