Lightly is a Python library for self-supervised learning on images, built on PyTorch. It lets computer-vision teams pretrain models on unlabeled image data using modern contrastive and distillation methods, dramatically reducing the amount of labeled data needed for downstream tasks.
Lightly is open source on GitHub with about 3,820 stars and active development in 2026. The framework exposes low-level building blocks such as loss functions, model heads and augmentations alongside ready-made implementations of popular methods, including recent additions like LeJEPA support. Embeddings produced with Lightly feed classification, detection and segmentation models, and the library is designed to scale from a laptop to multi-GPU training. The same team also builds LightlyStudio, a platform for data curation and labeling built on top of these ideas. The maintainers keep the library current with the research frontier, adding new methods and training recipes as they appear, and its embedding workflows pair naturally with the team’s data-curation tooling for teams that later need active learning on top of pretraining. Extensive documentation and examples cover training recipes end to end, from dataset preparation to exporting embeddings.
The Lightly library is free and open source under the MIT license. The company also sells a commercial version with additional features such as Docker support and one-command pretraining, plus the hosted LightlyStudio platform, which is free to get started with.
Computer-vision engineers and ML researchers who want to pretrain image models on large unlabeled datasets and cut labeling costs across their vision pipelines.