Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

LoCoOp: Few-Shot Out-of-Distribution Detection via Prompt Learning

About

We present a novel vision-language prompt learning approach for few-shot out-of-distribution (OOD) detection. Few-shot OOD detection aims to detect OOD images from classes that are unseen during training using only a few labeled in-distribution (ID) images. While prompt learning methods such as CoOp have shown effectiveness and efficiency in few-shot ID classification, they still face limitations in OOD detection due to the potential presence of ID-irrelevant information in text embeddings. To address this issue, we introduce a new approach called Local regularized Context Optimization (LoCoOp), which performs OOD regularization that utilizes the portions of CLIP local features as OOD features during training. CLIP's local features have a lot of ID-irrelevant nuisances (e.g., backgrounds), and by learning to push them away from the ID class text embeddings, we can remove the nuisances in the ID class text embeddings and enhance the separation between ID and OOD. Experiments on the large-scale ImageNet OOD detection benchmarks demonstrate the superiority of our LoCoOp over zero-shot, fully supervised detection methods and prompt learning methods. Notably, even in a one-shot setting -- just one label per class, LoCoOp outperforms existing zero-shot and fully supervised detection methods. The code will be available via https://github.com/AtsuMiyai/LoCoOp.

Atsuyuki Miyai, Qing Yu, Go Irie, Kiyoharu Aizawa• 2023

Related benchmarks

TaskDatasetResultRank
Image ClassificationStanford Cars
Accuracy79.8
635
Image ClassificationImageNet-1K--
600
Image ClassificationFlowers102
Accuracy96.3
558
Image ClassificationSUN397
Accuracy74.2
441
Image ClassificationEuroSAT
Accuracy86.1
207
Out-of-Distribution DetectionSUN OOD with ImageNet-1k In-distribution (test)
FPR@9523.44
204
Image ClassificationFGVC Aircraft--
203
Out-of-Distribution DetectionTextures
AUROC0.8886
168
Image ClassificationOxfordPets
Accuracy92.4
160
Out-of-Distribution DetectionImageNet-1k ID iNaturalist OOD
FPR9516.05
132
Showing 10 of 61 rows

Other info

Follow for update