Official PyTorch implementation of "Adversarial Reciprocal Points Learning for Open Set Recognition". It needs to say, these codes are modified by http://github.com/iCGY96/ARPL.
These codes are supposed to be run with a Linux system. If you use Windows system to run them, it may encounter some errors.
Currently, requires following packages
For Tiny-ImageNet, please download the following datasets to ./data/tiny_imagenet
and unzip it.
To train open set recognition models in paper, run this command:
python osr.py --dataset <DATASET> --loss <LOSS>
Option
--loss can be one of ARPLoss/RPLoss/GCPLoss/Softmax/AMPFLoss.
--dataset is one of mnist/svhn/cifar10/cifar100/tiny_imagenet.
To run ARPL+CS, add --cs after this command.
To run MPF, just use --loss AMPFLoss.
To run AMPF, use --loss AMPFLoss --cs.
To run AMPF++, use --loss AMPFLoss --cs++.
/MPFLoss_visualize_open_set.png width="800">
Before getting the figure above, you need to train the LeNet++ network, whose architecture is in "./models/model.py".
@misc{xia2021adversarial,
title={Adversarial Motorial Prototype Framework for Open Set Recognition},
author={Ziheng Xia and Penghui Wang and Ganggang Dong and Hongwei Liu},
year={2021},
eprint={2108.04225},
archivePrefix={arXiv},
primaryClass={cs.CV}
}