wlj6816 / MSF

Official code for "Mean Shift for Self-Supervised Learning"

Home Page:https://umbcvision.github.io/MSF

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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>

Pretrained Models

Model Top-1 Linear Classifier Accuracy Top-1 Nearest Neighbor Accuracy Top-1 KNN Accuracy Link
MSF(Resnet50) 72.4% 62.5% 65.7% Pretrained Resnet50

License

This project is under the MIT license.

About

Official code for "Mean Shift for Self-Supervised Learning"

https://umbcvision.github.io/MSF

License:MIT License


Languages

Language:Python 99.5%Language:Shell 0.5%