This is a fork of facebookresearch/odin written in a morden way with the power of functorch and TorchMetrics.
The method is described in the paper Enhancing The Reliability of Out-of-distribution Image Detection in Neural Networks by S. Liang, Yixuan Li and R. Srikant.
Tested on:
pytorch
==1.13.1torchmetrics
==0.11.1tqdm
,matplotlib
, ...
In the root of the repository, run
sh download.sh
facebookresearch/odin provide download links of five out-of-distributin datasets:
We can use any pytorch model.
facebookresearch/odin provide download links of four pre-trained models.
- DenseNet-BC trained on CIFAR-10
- DenseNet-BC trained on CIFAR-100
Wide ResNet trained on CIFAR-10Wide ResNet trained on CIFAR-100
DenseNet-BC models print some warnings, but they work. Wide ResNet models need 3 GPUs and older version of pytorch (NOT tested).
See ODIN.ipynb
.