#464 · Primary category: Computer Vision

lemniscate.pytorch

computer-vision cvpr2018 deep-learning imagenet nce pytorch representation-learning self-supervised-learning unsupervised-learning

Unsupervised Feature Learning via Non-parametric Instance Discrimination

Project last updated:03/25/21

GitHub Stars

758

Forks

130

Contributors

3

License

Other

Why we included this project

This is the reference implementation of the CVPR 2018 instance discrimination paper, one of the early self-supervised methods that treated each image as its own class and trained a ResNet to produce compact 128-dimension embeddings with no labels at all. The repo ships pretrained ResNet-18 and ResNet-50 weights for ImageNet, plus an updated ResNet-50 that swaps the original NCE loss for a softmax cross-entropy loss in the style of later work like MoCo and reaches 58.5% linear accuracy. Training reports nearest-neighbor accuracy alongside the loss, a practical way to tell whether the embeddings are actually learning useful structure. The code extends the official PyTorch ImageNet example, so it's fairly easy to adapt to other datasets or architectures, though it targets the older PyTorch 0.4 API. If you want to reproduce the original results or build on instance-discrimination-style pretraining, this is the code to start from.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category