- MNN has been accepted in PR(Pattern Recognition)!!.
This is an PyTorch implementation of MNN proposed by our paper MNN: Mixed Nearest-Neighbors for Self-Supervised Learning. If you find this repo useful, welcome 🌟🌟🌟✨.
Step 0. Download and install Miniconda from official website
Step 1. Create a conda environment and activate it
conda create --name mnn python=3.9 -y
conda activate mnn
Step 2. Install PyTorch following official instructions, e.g.
pip install -r requirements.txt
Step 3. Install MNN
git clone https://github.com/pc-cp/MNN
cd MNN
chmod +x ./scripts.sh
./scripts.sh
- CIFAR10/CIFAR100: https://www.cs.toronto.edu/~kriz/cifar.html
- STL10: http://ai.stanford.edu/~acoates/stl10/stl10_binary.tar.gz
- Tiny ImageNet: http://cs231n.stanford.edu/tiny-imagenet-200.zip
- Ubuntu 20.04.4 LTS (Focal Fossa)
- Python 3.9.7
You can download pretrained models here:
- this link trained on three datasets.
- Download and place in the "./checkpoints" directory.
Our model achieves the following performance:
- | CIFAR-10 | CIFAR-100 | STL-10 | Tiny ImageNet |
---|---|---|---|---|
MSF | 89.94 | 59.94 | 88.05 | 42.68 |
MNN(Ours) | 91.47 | 67.56 | 91.61 | 50.70 |
If you find this repo useful for your research, please consider citing the paper
@article{LONG2025110998,
title = {MNN: Mixed nearest-neighbors for self-supervised learning},
journal = {Pattern Recognition},
volume = {158},
pages = {110998},
year = {2025},
issn = {0031-3203},
doi = {https://doi.org/10.1016/j.patcog.2024.110998},
url = {https://www.sciencedirect.com/science/article/pii/S0031320324007490},
author = {Xianzhong Long and Chen Peng and Yun Li}
📋 If there are any questions, feel free to contact with the authors.