# HobbitLong/CMC

[arXiv 2019] "Contrastive Multiview Coding", also contains implementations for MoCo and InstDis

Repository: https://github.com/HobbitLong/CMC
Canonical: https://ross.abutalabs.com/products/cmc
Language: Python
License: BSD-2-Clause
License Family: permissive
Last push: 2020-11-10T07:33:17+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 2638, "days_push": 2122, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1340, forks 179 (observed 2026-08-28T04:04:25.995144+00:00)

## What it is
Official PyTorch implementation of Contrastive Multiview Coding (CMC), a self-supervised visual representation learning method that contrasts multiple views of data, plus unofficial implementations of MoCo and Instance Discrimination. It is research code accompanying an arXiv 2019 paper for training ResNets and AlexNet on ImageNet.

## Use cases
- train self-supervised image representations with contrastive learning
- reproduce CMC, MoCo, or InsDis results on ImageNet
- study how the number of contrasted views affects representation quality
- compare contrastive vs predictive objectives for unsupervised learning
- get pretrained weights for instance discrimination and momentum contrast models
- benchmark unsupervised methods against supervised AlexNet on ImageNet classification

## When to choose
- you need reference implementations of CMC, MoCo, or InsDis for research or reproduction
- you want to experiment with multiview contrastive learning in PyTorch
- you need pretrained self-supervised backbone weights from these methods

## When to avoid
- you need a maintained production library with recent framework support
- you want a general-purpose self-supervised learning framework rather than paper-specific code
- you require support for PyTorch versions beyond what the repo was tested with

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, deep-learning
- domain: machine-learning, computer-vision, deep-learning
- platform: python
- tags: self-supervised-learning, contrastive-learning, pytorch, representation-learning, research-code, moco, instance-discrimination, linux, gpu

## Member repositories
- HobbitLong/CMC (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:25.995144+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:43:46.873168+00:00, confidence not recorded.
  - readme: https://github.com/HobbitLong/CMC (fetched 2026-08-28T04:04:25.995144+00:00, sha fa1780777899)
- Data as of 2026-08-30T08:39:29.467469+00:00.
