This is an pytorch implementation of STEP: Out-of-Distribution Detection in the Presence of Limited In-Distribution Labeled Data
Install conda environment via environment.yaml
.
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
.
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
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/
.