Skip to content

Latest commit

 

History

History
122 lines (97 loc) · 9.58 KB

README.md

File metadata and controls

122 lines (97 loc) · 9.58 KB

SPICE: Semantic Pseudo-labeling for Image Clustering

By Chuang Niu, Hongming Shan, and Ge Wang

This is a Pytorch implementation of the paper.

PWC PWC PWC PWC PWC

Installation

Please refer to requirement.txt for all required packages. Assuming Anaconda with python 3.8, a step-by-step example for installing this project is as follows:

conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
conda install -c conda-forge addict tensorboard python-lmdb
conda install matplotlib scipy scikit-learn pillow
conda install -c anaconda seaborn

Then, clone this repo

git clone https://github.com/niuchuangnn/SPICE.git
cd SPICE

Data

Prepare datasets of interest as described in dataset.md.

Training

Read the training tutorial for details.

Evaluation

Evaluation of SPICE-Self:

python tools/eval_self.py --config-file configs/stl10/eval.py --weight PATH/TO/MODEL --all 1

Evaluation of SPICE-Semi:

python tools/eval_semi.py --load_path PATH/TO/MODEL --net WideResNet --widen_factor 2 --data_dir PATH/TO/DATA --dataset cifar10 --all 1 

Read the evaluation tutorial for more descriptions about the evaluation and the visualization of learned clusters.

Model Zoo

All trained models in our paper are available as follows.

Dataset Version ACC NMI ARI Model link
STL10 SPICE-Self 91.0 82.0 81.5 Model
SPICE 93.8 87.2 87.0 Model
SPICE-Self* 89.9 80.9 79.7 Model
SPICE* 92.9 86.0 85.3 Model
CIFAR10 SPICE-Self 83.8 73.4 70.5 Model
SPICE 92.6 86.5 85.2 Model
SPICE-Self* 84.9 74.5 71.8 Model
SPICE* 91.7 85.8 83.6 Model
CIFAR100 SPICE-Self 46.8 44.8 29.4 Model
SPICE 53.8 56.7 38.7 Model
SPICE-Self* 48.0 45.0 30.8 Model
SPICE* 58.4 58.3 42.2 Model
ImageNet-10 (ImageNet Pretrained) SPICE-Self 96.9 92.7 93.3 Model
SPICE 96.7 91.7 92.9 Model
ImageNet-Dog (ImageNet Pretrained) SPICE-Self 54.6 49.8 36.2 Model
SPICE 55.4 50.4 34.3 Model
ImageNet-10 SPICE-Self 92.1 82.8 83.6 Model
SPICE 95.9 90.2 91.2 Model
ImageNet-Dog SPICE-Self 64.6 57.2 47.9 Model
SPICE 67.5 62.7 52.6 Model
TinyImageNet SPICE-Self 30.5 44.9 16.3 Model
SPICE-Self* 29.2 52.5 14.5 Model

More models based on ResNet18 for both SPICE-Self* and SPICE-Semi*.

Dataset Version ACC NMI ARI Model link
STL10 SPICE-Self* 86.2 75.6 73.2 Model
SPICE* 92.0 85.2 83.6 Model
CIFAR10 SPICE-Self* 84.5 73.9 70.9 Model
SPICE* 91.8 85.0 83.6 Model
CIFAR100 SPICE-Self* 46.8 45.7 32.1 Model
SPICE* 53.5 56.5 40.4 Model

Acknowledgement for reference repos

License

This project is under the CC-BY-NC 4.0 license. See LICENSE for details.

Citation

@misc{niu2021spice,
      title={SPICE: Semantic Pseudo-labeling for Image Clustering}, 
      author={Chuang Niu and Ge Wang},
      year={2021},
      eprint={2103.09382},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}