MSF

Official code for "Mean Shift for Self-Supervised Learning" https://arxiv.org/abs/2105.07269

@misc{koohpayegani2021mean,
      title={Mean Shift for Self-Supervised Learning}, 
      author={Soroush Abbasi Koohpayegani and Ajinkya Tejankar and Hamed Pirsiavash},
      year={2021},
      eprint={2105.07269},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

Requirements

  • Python >= 3.7.6
  • PyTorch >= 1.4
  • torchvision >= 0.5.0
  • faiss-gpu >= 1.6.1

Install PyTorch and ImageNet dataset following the official PyTorch ImageNet training code. We used Python 3.7 for our experiments.

To run NN and Cluster Alignment, you require to install FAISS.

FAISS:

Training

Following command can be used to train the MSF

python train_msf.py \
  --cos \
  --weak_strong \
  --learning_rate 0.05 \
  --epochs 200 \
  --arch resnet50 \
  --topk 10 \
  --momentum 0.99 \
  --mem_bank_size 128000 \
  --checkpoint_path <CHECKPOINT PATH> \
  <DATASET PATH>

GitHub

https://github.com/UMBCvision/MSF