SkillAgentSearch skills...

Lightly

A python library for self-supervised learning on images.

Install / Use

/learn @lightly-ai/Lightly

README

<a name="top"></a> LightlySSL self-supervised learning Logo

GitHub Unit Tests PyPI Downloads Code style: black Discord Twitter codecov.io

LightlySSL is a computer vision framework for self-supervised learning.

For a commercial version with more features, including Docker support and pretraining models for embedding, classification, detection, and segmentation tasks with a single command, please contact sales@lightly.ai.

We've also built a whole platform on top, with additional features for active learning and data curation. If you're interested in the Lightly Worker Solution to easily process millions of samples and run powerful algorithms on your data, check out lightly.ai. It's free to get started!

News 🚀

  • March 23, 2026 - Check out our latest open-source project LightlyStudio to visualize, annotate, and manage your data with ease! 🔍
  • April 15, 2025 - We are excited to announce that you can now leverage SSL and distillation pretraining in just a few lines of code! We've worked hard to make self-supervised learning even more accessible with our new project LightlyTrain. Head over there to get started and supercharge your models! ⚡️
<p> <a href="https://github.com/lightly-ai/lightly-train"><img src="https://storage.googleapis.com/lightly-public/train/lightlytrain_standard_horizontal_dark.png" alt="LightlyTrain" height="40"/></a> <span>&nbsp;&nbsp;&nbsp;&nbsp;</span> <a href="https://github.com/lightly-ai/lightly-studio"><img src="https://storage.googleapis.com/lightly-public/studio/lightlystudio_standard_horizontal_dark.png" alt="LightlyStudio" height="40"/></a> </p>

Features

This self-supervised learning framework offers the following features:

  • Modular framework, which exposes low-level building blocks such as loss functions and model heads.
  • Easy to use and written in a PyTorch-like style.
  • Supports custom backbone models for self-supervised pre-training.
  • Support for distributed training using PyTorch Lightning.

Supported Models

You can find sample code for all the supported models here. We provide PyTorch, PyTorch Lightning, and PyTorch Lightning distributed examples for all models to kickstart your project.

Models:

| Model | Year | Paper | Docs | Colab (PyTorch) | Colab (PyTorch Lightning) | |----------------|------|-------|------|-----------------|----------------------------| | AIM | 2024 | paper | docs | Open In Colab | Open In Colab | | Barlow Twins | 2021 | paper | docs | Open In Colab | Open In Colab | | BYOL | 2020 | paper | docs | Open In Colab | Open In Colab | | DCL & DCLW | 2021 | paper | docs | Open In Colab | Open In Colab | | DenseCL | 2021 | paper | docs | Open In Colab | Open In Colab | | DINO | 2021 | paper | docs | Open In Colab | Open In Colab | | DINOv2 | 2023 | paper | docs | Open In Colab | Open In Colab | | iBOT | 2021 | paper | docs | Open In Colab | Open In Colab | | MAE | 2021 | paper | docs | Open In Colab | Open In Colab | | MSN | 2022 | paper | docs | Open In Colab | Open In Colab | | MoCo | 2019 | paper | docs | Open In Colab | Open In Colab | | NNCLR | 2021 | [paper

View on GitHub
GitHub Stars3.7k
CategoryEducation
Updated2d ago
Forks323

Languages

Python

Security Score

100/100

Audited on Mar 26, 2026

No findings