# lightly-ai/lightly

A python library for self-supervised learning on images.

Repository: https://github.com/lightly-ai/lightly
Canonical: https://ross.abutalabs.com/products/lightly
Homepage: https://docs.lightly.ai/self-supervised-learning/
Language: Python
License: MIT
License Family: permissive
Topics: deep-learning, self-supervised-learning, machine-learning, computer-vision, pytorch, embeddings, contrastive-learning, hacktoberfest, contributions-welcome
Last push: 2026-08-21T20:54:21+00:00

## Health v2 (maintenance only)
Score: 93/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 83, longevity 100
- inputs: {"age_days": 2150, "days_push": 12, "days_rel": 37, "gap_med": 39, "n_releases_24m": 14}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3797, forks 355 (observed 2026-08-28T04:08:19.966937+00:00)

## What it is
LightlySSL is a Python library built on PyTorch for self-supervised learning on images, offering modular implementations of methods like SimCLR, MoCo, DINO, and masked autoencoders. It includes a CLI for training models and generating embeddings without labels, plus a model zoo of pretrained checkpoints.

## Use cases
- train a vision model without labels
- generate image embeddings from unlabeled photos
- pretrain a backbone for object detection
- run self-supervised learning on satellite imagery
- curate and understand a large unlabeled image dataset
- train SimCLR or MoCo on CIFAR-10

## When to choose
- you have large unlabeled image datasets and want label-free pretraining
- you want a modular PyTorch framework for SSL research
- you need image embeddings for data curation or active learning

## When to avoid
- you need a one-command pretraining product with Docker support (use LightlyTrain)
- your task is NLP or tabular data rather than images
- you want a fully managed data labeling platform (use LightlyStudio)

## Facets
- artifact type: library
- maturity: active
- function: machine-learning, deep-learning, image-processing, cli
- domain: computer-vision, deep-learning, machine-learning, image-processing
- platform: python
- tags: self-supervised-learning, contrastive-learning, pytorch, embeddings, simclr, moco, dino, model-zoo, linux, macos, gpu

## Member repositories
- lightly-ai/lightly (main) score 93

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:19.966937+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-29T18:26:55.688548+00:00, confidence not recorded.
  - readme: https://github.com/lightly-ai/lightly (fetched 2026-08-28T04:08:19.966937+00:00, sha b2a8e6aa6350)
  - homepage: https://docs.lightly.ai/self-supervised-learning/ (fetched 2026-08-29T09:22:07.901158+00:00, sha 6ec0f3ea21e5)
  - site_page: https://docs.lightly.ai/self-supervised-learning/getting_started/install.html (fetched 2026-08-29T09:22:07.910156+00:00, sha 584d420cd314)
  - site_page: https://docs.lightly.ai/self-supervised-learning/getting_started/command_line_tool.html (fetched 2026-08-29T09:22:07.911902+00:00, sha bc6403b398c2)
  - site_page: https://docs.lightly.ai/self-supervised-learning/lightly.models.html (fetched 2026-08-29T09:22:07.913794+00:00, sha 9b62d924f36c)
  - site_page: https://docs.lightly.ai/ (fetched 2026-08-29T09:22:07.919074+00:00, sha 2ed008e65705)
  - site_page: https://docs.lightly.ai/train/stable/index.html (fetched 2026-08-29T09:22:07.920592+00:00, sha 6dd83f2ac5db)
  - site_page: https://docs.lightly.ai (fetched 2026-08-29T09:22:07.922568+00:00, sha 2ed008e65705)
  - registry_pypi: https://pypi.org/pypi/lightly/json (fetched 2026-08-29T09:22:07.924164+00:00, sha bc3f0d4915d2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
