This repository contains code for the paper:
Few-Shot Open-Set Recognition with Meta-Learning [PDF]
IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020
The problem of open-set recognition is considered. While previous approaches only consider this problem in the context of large-scale classifier training, we seek a unified solution for this and the low-shot classification setting. It is argued that the classic softmax classifier is a poor solution for open-set recognition, since it tends to overfit on the training classes. Randomization is then proposed as a solution to this problem. This suggests the use of meta-learning techniques, commonly used for few-shot classification, for the solution of open-set recognition. A new oPen sEt mEta LEaRning (PEELER) algorithm is then introduced. This combines the random selection of a set of novel classes per episode, a loss that maximizes the posterior entropy for examples of those classes, and a new metric learning formulation based on the Mahalanobis distance. Experimental results show that PEELER achieves state of the art open set recognition performance for both few-shot and large-scale recognition. On CIFAR and miniImageNet, it achieves substantial gains in seen/unseen class detection AUROC for a given seen-class classification accuracy.
If you find this code useful, consider citing our work:
@inproceedings{liu2020few,
title={Few-Shot Open-Set Recognition using Meta-Learning},
author={Liu, Bo and Kang, Hao and Li, Haoxiang and Hua, Gang and Vasconcelos, Nuno},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={8798--8807},
year={2020}
}
- mini-ImageNet
- Download the dataset following here (from https://github.com/gidariss/FewShotWithoutForgetting).
- Put the gzip file under
./dataset/miniImageNet
cd dataset/miniImageNet
sh prepare.sh
- Training
python main.py --cfg ./config/openfew/default.yaml
- Testing
python main.py --cfg ./config/openfew/default.yaml --test
Setting | Accuracy | AUROC | Model |
---|---|---|---|
5-way 1-shot | 57.90 | 62.05 | ResNet |
Model usage: unzip and move the entire directory under ./output