This is a PyTorch implementation of the paper A Cosine Similarity-based Method for Out-of-Distribution Detection. The poster is available here.
How to run the code:
- Install requirements. Run
pip install -r requirements.txt
to install dependencies. - Setup environment variables (dataset and checkpoints paths) to
.env
file. See.env.example
for refference. - Run scripts from
experiment/Benchmark
folder. We use hydra for configuration. Seeexperiment/Benchmark/configs
fornet
and anddetector
options.