MSF
Official code for "Mean Shift for Self-Supervised Learning"
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.
- Install PyTorch (pytorch.org)
To run NN and Cluster Alignment, you require to install FAISS.
FAISS:
- Install FAISS (https://github.com/facebookresearch/faiss/blob/master/INSTALL.md)
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>
License
This project is under the MIT license.