-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 735032b
Showing
28 changed files
with
2,767 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
pip-wheel-metadata/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# datasets | ||
.data/ | ||
|
||
# log | ||
.log/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# The PKU-AIR300 Dataset | ||
The PKU-AIR300 Dataset is a new large-scale challenging aircraft dataset. It contains 320,000 annotated color images from 300 different classes in total. Each category contains 100 images at least, and a maximum of 10,000 images, which leads to the long tail distribution. According to the number of images in each category, it is divided all classes into two parts with 180 known classes for training and 120 novel unknown classes for testing respectively. | ||
|
||
<p align="center"> | ||
<img src=./img/thumb.jpg width="600"> | ||
<img src=./img/air300.jpg width="600"> | ||
</p> | ||
|
||
## LICENSE | ||
- The images the corresponding annotation results can only be used for ACADEMIC PURPOSES. NO COMERCIAL USE is allowed. | ||
- Copyright © [National Engineering Laboratory for Video Technology (NELVT)](http://idm.pku.edu.cn/) and [Institute of Digital Media](http://idm.pku.edu.cn/), Peking University (PKU-IDM). All rights reserved. | ||
|
||
All publications using Air-300 Dataset should cite the paper below: | ||
- Guangyao Chen, Limeng Qiao, Yemin Shi, Peixi Peng, Jia Li, Tiejun Huang, Shiliang Pu and Yonghong Tian. Learning Open Set Network with Discriminative Reciprocal Points. ECCV 2020. | ||
``` | ||
@InProceedings{chen_2020_ECCV, | ||
author = {Chen, Guangyao and Qiao, Limeng and Shi, Yemin and Peng, Peixi and Li, Jia and Huang, Tiejun and Pu, Shiliang and Tian, Yonghong}, | ||
title = {Learning Open Set Network with Discriminative Reciprocal Points}, | ||
booktitle = {The European Conference on Computer Vision (ECCV)}, | ||
month = {August}, | ||
year = {2020} | ||
} | ||
``` | ||
|
||
## [DOWNLOAD](https://www.pkuml.org/resources/pku-air300-dataset.html) | ||
You can download the agreement(pdf) by clicking the [DOWNLOAD](https://www.pkuml.org/wp-content/uploads/2021/02/AIR300AGREEMENT.pdf) link. | ||
After filling it, please send the electrical version to our Email: pkuml at pku.edu.cn (Subject: PKU-AIR300 Agreement) and mail the paper version to our lab: Room 2604, Science Building No. 2, Peking University, No.5 Yiheyuan Road, Haidian District, Beijing, P.R.China . | ||
After confirming your information, we will send the download link and password to you via Email. You need to follow the agreement. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Guangyao Chen | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Adversarial Reciprocal Points Learning for Open Set Recognition | ||
Official PyTorch implementation of ["**Adversarial Reciprocal Points Learning for Open Set Recognition**"](https://arxiv.org/abs/XXXX). | ||
|
||
<p align="center"> | ||
<img src=./img/ARPL.jpg width="800"> | ||
</p> | ||
|
||
## 1. Requirements | ||
### Environments | ||
Currently, requires following packages | ||
- python 3.6+ | ||
- torch 1.4+ | ||
- torchvision 0.5+ | ||
- CUDA 10.1+ | ||
- scikit-learn 0.22+ | ||
|
||
### Datasets | ||
For Tiny-ImageNet, please download the following datasets to ```./data/tiny_imagenet```. | ||
- [tiny_imagenet](https://drive.google.com/file/d/1oJe95WxPqEIWiEo8BI_zwfXDo40tEuYa/view?usp=sharing) | ||
|
||
## 2. Training & Evaluation | ||
|
||
### Open Set Recognition | ||
To train open set recognition models in paper, run this command: | ||
```train | ||
python osr.py --dataset <DATASET> --loss <LOSS> | ||
``` | ||
> Option --loss can be one of ARPLoss/RPLoss/GCPLoss/Softmax. --dataset is one of mnist/svhn/cifar10/cifar100/tiny_imagenet. To run ARPL+CS, add --cs after this command. | ||
### Out-of-Distribution Detection | ||
To train out-of-distribution models in paper, run this command: | ||
```train | ||
python ood.py --dataset <DATASET> --out-dataset <DATASET> --model <NETWORK> --loss <LOSS> | ||
``` | ||
> Option --out-dataset denotes the out-of-distribution dataset for evaluation. --loss can be one of ARPLoss/RPLoss/GCPLoss/Softmax. --dataset is one of mnist/cifar10. --out-dataset is one of kmnist/svhn/cifar100. To run ARPL+CS, add --cs after this command. | ||
### Evaluation | ||
To evaluate the trained model for Open Set Classification Rate (OSCR) and Out-of-Distribution (OOD) detection setting, add ```--eval``` after the training command. | ||
|
||
## 3. Results | ||
### We visualize the deep feature of Softmax/GCPL/ARPL/ARPL+CS as below. | ||
|
||
<p align="center"> | ||
<img src=./img/results.jpg width="800"> | ||
</p> | ||
|
||
> Colored triangles represent the learned reciprocal points of different known classes. | ||
## 4. PKU-AIR300 | ||
<p align="center"> | ||
<img src=./img/thumb.jpg width="600"> | ||
</p> | ||
|
||
A new large-scale challenging aircraft dataset for open set recognition: [Aircraft 300 (Air-300)](https://github.com/iCGY96/ARPL/blob/main/AIR300.md). It contains 320,000 annotated colour images from 300 different classes in total. Each category contains 100 images at least, and a maximum of 10,000 images, which leads to the long tail distribution. | ||
|
||
|
||
## Citation | ||
|
||
- All publications using Air-300 Dataset should cite the paper below: | ||
``` | ||
@InProceedings{chen_2020_ECCV, | ||
author = {Chen, Guangyao and Qiao, Limeng and Shi, Yemin and Peng, Peixi and Li, Jia and Huang, Tiejun and Pu, Shiliang and Tian, Yonghong}, | ||
title = {Learning Open Set Network with Discriminative Reciprocal Points}, | ||
booktitle = {The European Conference on Computer Vision (ECCV)}, | ||
month = {August}, | ||
year = {2020} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from .train import * | ||
from .test import * | ||
from .evaluation import * |
Oops, something went wrong.