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

06/02/2023
by   Atsuyuki Miyai, et al.
0

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>.

READ FULL TEXT
research
04/10/2023

Zero-Shot In-Distribution Detection in Multi-Object Settings Using Vision-Language Foundation Models

Removing out-of-distribution (OOD) images from noisy images scraped from...
research
08/23/2023

CLIPN for Zero-Shot OOD Detection: Teaching CLIP to Say No

Out-of-distribution (OOD) detection refers to training the model on an i...
research
06/26/2023

Beyond AUROC co. for evaluating out-of-distribution detection performance

While there has been a growing research interest in developing out-of-di...
research
12/01/2022

Finetune like you pretrain: Improved finetuning of zero-shot vision models

Finetuning image-text models such as CLIP achieves state-of-the-art accu...
research
02/06/2023

Rethinking Out-of-distribution (OOD) Detection: Masked Image Modeling is All You Need

The core of out-of-distribution (OOD) detection is to learn the in-distr...
research
08/20/2023

From Global to Local: Multi-scale Out-of-distribution Detection

Out-of-distribution (OOD) detection aims to detect "unknown" data whose ...
research
06/01/2023

In or Out? Fixing ImageNet Out-of-Distribution Detection Evaluation

Out-of-distribution (OOD) detection is the problem of identifying inputs...

Please sign up or login with your details

Forgot password? Click here to reset