Learn to Categorize or Categorize to Learn? Self-Coding for Generalized Category Discovery (NeurIPS 2023)
By
Sarah Rastegar,
Hazel Doughty, and
Cees Snoek.
pip install -r requirements.txt
Set paths to datasets, pre-trained models and desired log directories in config.py
Set SAVE_DIR
(logfile destination) and PYTHON
(path to python interpreter) in bash_scripts
scripts.
We use fine-grained benchmarks in this paper, including:
We also use generic object recognition datasets, including:
- CIFAR-10/100 and ImageNet
Train representation:
bash bash_scripts/contrastive_train.sh
Extract features: Extract features to prepare for semi-supervised k-means.
It will require changing the path for the model with which to extract features in warmup_model_dir
bash bash_scripts/extract_features.sh
Fit semi-supervised k-means:
bash bash_scripts/k_means.sh
If you use this code in your research, please consider citing our paper:
@inproceedings{
rastegar2023learn,
title={Learn to Categorize or Categorize to Learn? Self-Coding for Generalized Category Discovery},
author={Sarah Rastegar and Hazel Doughty and Cees Snoek},
booktitle={Thirty-seventh Conference on Neural Information Processing Systems},
year={2023},
url={https://openreview.net/forum?id=m0vfXMrLwF}
}
The codebase is mainly built on the repo of https://github.com/sgvaze/generalized-category-discovery.