Skip to content

A simple and effective method for detecting out-of-distribution images in neural networks.

License

Notifications You must be signed in to change notification settings

wizardbc/odin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ODIN: Out-of-Distribution Detector for Neural Networks

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.

Running the code

Dependencies

Tested on:

  • pytorch==1.13.1
  • torchmetrics==0.11.1
  • tqdm, matplotlib, ...

Downloading

In the root of the repository, run

sh download.sh

Out-of-Distribtion Datasets

facebookresearch/odin provide download links of five out-of-distributin datasets:

Neural Network Models

We can use any pytorch model.

facebookresearch/odin provide download links of four pre-trained models.

DenseNet-BC models print some warnings, but they work. Wide ResNet models need 3 GPUs and older version of pytorch (NOT tested).

Running

See ODIN.ipynb.

About

A simple and effective method for detecting out-of-distribution images in neural networks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 93.0%
  • Python 6.6%
  • Shell 0.4%