whatisgithub

What is simclr?

google-research/simclr — explained in plain English

Analysis updated 2026-06-26

4,492Jupyter NotebookAudience · researcherComplexity · 5/5Setup · hard

In one sentence

A Google research codebase for training image-recognition models using self-supervised contrastive learning, achieving strong results with very few labeled examples.

Mindmap

mindmap
  root((simclr))
    What It Does
      Self-supervised learning
      Few labels needed
      Image recognition
    How It Works
      Contrastive pairs
      Augmented views
      Fine-tune after
    Models
      SimCLR original
      SimCLRv2 larger
      Pre-trained checkpoints
    Requirements
      Python TensorFlow
      Cloud TPU for scale
      Single GPU for tests
    Audience
      ML researchers
      Practitioners
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Train an image classifier on a small labeled dataset by first pre-training on large amounts of unlabeled images

USE CASE 2

Reproduce Google's SimCLR or SimCLRv2 contrastive learning results on your own dataset

USE CASE 3

Fine-tune a downloaded SimCLRv2 pre-trained checkpoint on a custom image classification task

USE CASE 4

Experiment with contrastive learning on CIFAR-10 using a single GPU without cloud infrastructure

What is it built with?

PythonTensorFlowJupyter Notebook

How does it compare?

google-research/simclrhunkim/deeplearningzerotoallnianticlabs/monodepth2
Stars4,4924,4984,486
LanguageJupyter NotebookJupyter NotebookJupyter Notebook
Setup difficultyhardmoderatehard
Complexity5/52/54/5
Audienceresearcherresearcherresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1day+

Full-scale training requires Google Cloud TPUs and large cloud storage, single-GPU CIFAR-10 runs are possible for experimentation.

So what is it?

SimCLR is a research project from Google that explores a technique for training image-recognition models using very few labeled examples. The core idea is that a model can learn useful visual representations by comparing pairs of images, without needing a human to label every image up front. This approach is called self-supervised or contrastive learning. The way it works is that the system takes two different altered versions of the same image, such as a cropped version and a color-shifted version, and trains the model to recognize that these two views came from the same original image. By doing this across many image pairs, the model develops an internal understanding of what makes images visually similar. Once this training is done, you can then fine-tune the model on a much smaller set of labeled images and still get strong results. The repository includes code and pre-trained model weights for both the original SimCLR and its follow-up SimCLRv2. SimCLRv2 specifically focused on showing that larger models trained this way can become very capable with only 1% or 10% of labels, which is significantly less data than traditional approaches require. Pre-trained checkpoints in multiple sizes are available for download from Google Cloud Storage. The code is written in Python using TensorFlow and supports both TensorFlow v1 and v2. Training at full scale requires access to Google Cloud TPUs and large amounts of storage, but the repository also supports training on a single GPU with smaller datasets like CIFAR-10 for experimentation. This is a research codebase, not a packaged product. It is intended for machine learning researchers and practitioners who want to experiment with or build on the contrastive learning methods described in the accompanying academic papers.

Copy-paste prompts

Prompt 1
How do I download a pre-trained SimCLRv2 checkpoint from Google Cloud Storage and fine-tune it on my own image dataset in TensorFlow?
Prompt 2
How do I configure SimCLR to train on CIFAR-10 on a single GPU instead of Google Cloud TPUs?
Prompt 3
Write a TensorFlow script that loads SimCLRv2 weights and evaluates linear probe accuracy on a custom image dataset
Prompt 4
How do I customize the data augmentation pipeline in SimCLR training to improve representations for my domain-specific medical images?

Frequently asked questions

What is simclr?

A Google research codebase for training image-recognition models using self-supervised contrastive learning, achieving strong results with very few labeled examples.

What language is simclr written in?

Mainly Jupyter Notebook. The stack also includes Python, TensorFlow, Jupyter Notebook.

How hard is simclr to set up?

Setup difficulty is rated hard, with roughly 1day+ to a first successful run.

Who is simclr for?

Mainly researcher.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.