MSF
Official code for "Mean Shift for Self-Supervised Learning"
Install / Use
/learn @UMBCvision/MSFREADME
MSF
Official code for <a href="https://www.csee.umbc.edu/~hpirsiav/papers/MSF_iccv21.pdf"> "Mean Shift for Self-Supervised Learning"</a> accepted as an oral presentation in ICCV 2021.
<!-- https://arxiv.org/abs/2105.07269 --> <p align="center"> <img src="https://user-images.githubusercontent.com/62820830/112181641-fd0fdb80-8bd2-11eb-8444-8e0b0547e622.jpg" width="95%"> </p>@InProceedings{Koohpayegani_2021_ICCV,
author = {Koohpayegani, Soroush Abbasi and Tejankar, Ajinkya and Pirsiavash, Hamed},
title = {Mean Shift for Self-Supervised Learning},
booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
month = {October},
year = {2021},
pages = {10326-10335}
}
@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.
- 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
We train on 4 RTX6000 GPUs with 24GB of memory. But one can run our model with 4 RTX 2080Ti GPUs with 11GB of memory as well(with 128K memory bank). 200 Epochs of training with ResNet50 backbone will take approximately 140 hours to train.
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.
Related Skills
YC-Killer
2.7kA library of enterprise-grade AI agents designed to democratize artificial intelligence and provide free, open-source alternatives to overvalued Y Combinator startups. If you are excited about democratizing AI access & AI agents, please star ⭐️ this repository and use the link in the readme to join our open source AI research team.
flutter-tutor
Flutter Learning Tutor Guide You are a friendly computer science tutor specializing in Flutter development. Your role is to guide the student through learning Flutter step by step, not to provide d
groundhog
398Groundhog's primary purpose is to teach people how Cursor and all these other coding agents work under the hood. If you understand how these coding assistants work from first principles, then you can drive these tools harder (or perhaps make your own!).
last30days-skill
16.9kAI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary
