SarahRastegar / InfoSieve

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Learn to Categorize or Categorize to Learn? Self-Coding for Generalized Category Discovery

Learn to Categorize or Categorize to Learn? Self-Coding for Generalized Category Discovery (NeurIPS 2023)
By Sarah Rastegar, Hazel Doughty, and Cees Snoek.

image

Dependencies

pip install -r requirements.txt

Config

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.

Datasets

We use fine-grained benchmarks in this paper, including:

We also use generic object recognition datasets, including:

Scripts

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}
}

Acknowledgements

The codebase is mainly built on the repo of https://github.com/sgvaze/generalized-category-discovery.

About


Languages

Language:Python 98.7%Language:Shell 1.3%