/Step

This is an pytorch implementation of STEP: Out-of-Distribution Detection in the Presence of Limited In-Distribution Labeled Data

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Step

This is an pytorch implementation of STEP: Out-of-Distribution Detection in the Presence of Limited In-Distribution Labeled Data

Requirements

Install conda environment via environment.yaml.

Out-of-distribution Dataset

Download out-of-distributin datasets provided by ODIN: Google Drive

For example, you can download Imagenet.tar.gz into ./data/ directory and run script tar -xvzf Imagenet.tar.gz.

Pre-trained Model

For a quick start, you can download our pre-trained model to ./files/ directory.

Download Link: Google Drive

You can also run the following scripts to train your own pre-trained model.

python SimCLR.py --out-dataset=LSUN --in-dataset=Cifar10

Usage

Choose the datasets you want and run the script: python Step.py --out-dataset={LSUN, LSUN_resize, Imagenet, Imagenet_resize} --in-dataset={Cifar10, Cifar100}. For example, you can run the following script:

python Step.py --out-dataset=LSUN --in-dataset=Cifar10

When the training stage is over, the final model will be stored in ./files/, and the result will be printed and stored in ./results/.