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: