This is the official implementation of the Long-Tailed Out-of-Distribution Detection via Normalized Outlier Distribution Adaptation NeurIPS2024
Please download CIFAR10, CIFAR100, and ImageNet-LT , place them in./datasets
For CIFAR10-LT and CIFAR100-LT, please download TinyImages 300K Random Images for auxiliary in ./datasets
For CIFAR10-LT and CIFAR100-LT, please download SC-OOD benchmark for out-of-distribution in ./datasets
For ImageNet-LT, please download ImageNet10k_eccv2010 benchmark for auxiliary and out-of-distribution in ./datasets
All datasets follow PASCL and COCL
please save in ./pretrain
python train.py --gpu 0 --ds cifar10 --drp <where_you_store_all_your_datasets> --srp <where_to_save_the_ckpt>
python train.py --gpu 0 --ds cifar100 --drp <where_you_store_all_your_datasets> --srp <where_to_save_the_ckpt>
python stage1.py --gpu 0,1,2,3 --ds imagenet --md ResNet50 --lr 0.01 --wd 5e-3 --drp <where_you_store_all_your_datasets> --srp <where_to_save_the_ckpt>
python test.py --gpu 0 --ds cifar10 --drp <where_you_store_all_your_datasets> --ckpt_path <where_you_save_the_ckpt>
python test.py --gpu 0 --ds cifar100 --drp <where_you_store_all_your_datasets> --ckpt_path <where_you_save_the_ckpt>
python test_imagenet.py --gpu 0 --drp <where_you_store_all_your_datasets> --ckpt_path <where_you_save_the_ckpt>
Part of our codes are adapted from these repos:
Outlier-Exposure - https://github.com/hendrycks/outlier-exposure - Apache-2.0 license
PASCL - https://github.com/amazon-science/long-tailed-ood-detection - Apache-2.0 license
COCL - https://github.com/mala-lab/COCL - Apache-2.0 license
BERL - https://github.com/hyunjunChhoi/Balanced_Energy - Apache-2.0 license
Long-Tailed-Recognition.pytorch - https://github.com/KaihuaTang/Long-Tailed-Recognition.pytorch - GPL-3.0 license
This project is licensed under the Apache-2.0 License.