A desirable open world recognition (OWR) system requires performing three tasks: (1) Open set recognition (OSR), i.e., classifying the known (classes seen during training) and rejecting the unknown (unseen/novel classes) online; (2) Grouping and labeling these unknown as novel known classes; (3) Incremental learning (IL), i.e., incrementally learning these novel classes and retaining the memory of old classes.
All dependencies are included in environment.yml. To install, run
conda env create -f environment.yml
You can find the required data from the link below and place them according to the path shown in OpenGCD/config.py.
You can download the ViT weights (dino_vitbase16_pretrain.pth) trained on ImageNet with DINO self-supervision at ViT-B/16.
You can run extract_features.py to get the feature embedding for each dataset.
We provide code and models for our experiments on CIFAR10, CIFAR100, and CUB in OpenGCD:
- Code for exemplar selection in
OpenGCD/methods/exemplars_selection - Code for closed set recognition in
OpenGCD/methods/closed_set_recognition - Code for open set recognition in
OpenGCD/methods/open_set_recognition - Code for generalized category discovery in
OpenGCD/methods/novel_category_discover - Code for evaluation metrics (Harmonic normalized accuracy and Harmonic clustering accuracy) in
OpenGCD/project_utils/metrics.py - Code for our experiments in
OpenGCD/exp
The schematic and pseudocode of the formulated OpenGCD are provided in Appendix.pdf.
Our code is partially based on the following repositories:
- A Tool for Software Defect Prediction
- Generalized Category Discovery
- AutoNovel: Automatically Discovering and Learning Novel Visual Categories
@article{opengcd2023,
title={OpenGCD: Assisting Open World Recognition with Generalized Category Discovery},
author={Gao, Fulin and Zhong, Weimin and Cao, Zhixing and Peng, Xin and Li, Zhi},
journal={arXiv preprint arXiv:2308.06926},
year={2023}
}