Detecting Out-of-Distribution through the Lens of Neural Collapse
March 18, 2025 ยท View on GitHub
This repository contains code for the paper Detecting Out-of-Distribution through the Lens of Neural Collapse (CVPR 2025) by Litian Liu and Yao Qin. The codebase is adapted from and integrated into the OpenOOD Benchmark.
Explore related work:
Setup
Please follow OpenOOD official instruction to complete the setup.
pip install git+https://github.com/Jingkang50/OpenOOD
Demo
CIFAR-10 ResNet-18 Benchmark
python scripts/eval_ood.py \
--id-data cifar10 \
--root ./results/cifar10_resnet18_32x32_base_e100_lr0.1_default \
--postprocessor nci \
--save-score --save-csv
ImageNet ResNet-50 Benchmark
python scripts/eval_ood_imagenet.py \
--tvs-pretrained \
--arch resnet50 \
--postprocessor nci \
--save-score --save-csv
Citation
Please cite our paper if you find this codebase helpful!
@article{liu2025detecting,
title={Detecting Out-of-Distribution through the Lens of Neural Collapse},
author={Liu, Litian and Qin, Yao},
journal={IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
year={2025}
}