Short introduction to simple Out-of-Distribution (ODD), Error Detection and uncertainty estimation techniques
The following papers are covered in this tutorial:
- Maximum Softmax Probability
- ODIN
- Mahalanobis distance-based ODD
- MSP-like Error Detection
- Bayes by backprop. I did not code this part myself and re-used this code written by saxena-mayur.
Finally, the data_and_nn_loader.py file is taken from this repo.
Python >3.6 is required to run this code, along with Pytorch, matplotlib, scikit-learn and ipywidgets (for interactive plots).
Run the following command lines to set the environment using conda:
conda create --name tutorial python=3.6
conda activate tutorial
conda install -c conda-forge matplotlib
conda install pytorch torchvision -c pytorch
conda install -c anaconda scikit-learn
conda install -c conda-forge ipywidgets
Please have special care for the extra steps needed to complete ipywidgets installation. Indeed, depending on the version of jupyter-lab at use, it may not be automatically configured to use widgets.
To download the resized ImageNet test dataset and the DenseNet-10 architecture pre-trained on CIFAR-10, run the following commands:
chmmod +x download.sh
./download.sh