Need help with energy_ood?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

wetliu
150 Stars 20 Forks Apache License 2.0 19 Commits 0 Opened issues

Services available

!
?

Need anything else?

Contributors list

# 388,930
Shell
C
C++
cuda
15 commits

Energy-based Out-of-distribution Detection (Energy OOD)

This repository is the official implementation of Energy-based Out-of-distribution Detection by W. Liu, X. Wang, J. Owens, Y. Li. This method is an effective and easy OOD detector with and without fine-tuning. Our code is modified from Outlier-Exposure.

image

Pretrained Models and Datasets

Pretrained models are provided in folder

./CIFAR/snapshots/

Please download the datasets in folder

./data/

Testing and Fine-tuning

run energy score testing for cifar10 WRN

test
bash run.sh energy 0

run energy score testing for cifar100 WRN

test
bash run.sh energy 1

run energy score training and testing for cifar10 WRN

train
bash run.sh energy_ft 0

run energy score training and testing for cifar100 WRN

train
bash run.sh energy_ft 1

Results

Our model achieves the following average performance on 6 OOD datasets:

1. MSP vs energy score with and without fine-tuned on CIFAR-10

| Model name | FPR95 | | ------------------ |---------------- | | Softmax score | 51.04% | | Energy score (ours) | 33.01% | | Softmax score with fine-tune | 8.53% | | Energy score with fine-tune (ours) | 3.32% |

2. CIFAR-10 (in-distribution) vs SVHN (out-of-distribution) Score Distributions

image

3. Performance among different baselines for WideResNet

CIFAR-10: | Model name | FPR95 | | ------------------ |---------------- | | Softmax score | 51.04% | | Energy score (ours) | 33.01% | | ODIN | 35.71% | | Mahalanobis | 37.08% | | Outlier Exposure| 8.53% | | Energy score with fine-tune (ours) | 3.32% |

CIFAR-100: | Model name | FPR95 | | ------------------ |---------------- | | Softmax score | 80.41% | | Energy score (ours) | 73.60% | | ODIN | 74.64% | | Mahalanobis | 54.64% | | Outlier Exposure| 58.10% | | Energy score with fine-tune (ours) | 47.55% |

Outlier Datasets

These experiments make use of numerous outlier datasets. Links for less common datasets are as follows, 80 Million Tiny Images, Icons-50, Textures, Chars74K, and Places365, LSUN-C, LSUN-R, iSUN.

Citation

 @article{liu2020energy,
      title={Energy-based Out-of-distribution Detection},
      author={Liu, Weitang and Wang, Xiaoyun and Owens, John and Li, Yixuan},
      journal={Advances in Neural Information Processing Systems},
      year={2020}
 } 

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.