{"id":13578450,"url":"https://github.com/lightly-ai/lightly","last_synced_at":"2026-04-02T18:03:36.029Z","repository":{"id":37080557,"uuid":"303705119","full_name":"lightly-ai/lightly","owner":"lightly-ai","description":"A python library for self-supervised learning on images.","archived":false,"fork":false,"pushed_at":"2026-03-23T10:30:47.000Z","size":12048,"stargazers_count":3700,"open_issues_count":83,"forks_count":323,"subscribers_count":29,"default_branch":"master","last_synced_at":"2026-03-24T07:52:27.568Z","etag":null,"topics":["computer-vision","contrastive-learning","contributions-welcome","deep-learning","embeddings","hacktoberfest","machine-learning","pytorch","self-supervised-learning"],"latest_commit_sha":null,"homepage":"https://docs.lightly.ai/self-supervised-learning/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lightly-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-10-13T13:02:56.000Z","updated_at":"2026-03-23T10:30:51.000Z","dependencies_parsed_at":"2023-09-27T20:42:04.851Z","dependency_job_id":"5af639d4-dd47-4fa2-9625-29d53c25abdc","html_url":"https://github.com/lightly-ai/lightly","commit_stats":{"total_commits":1227,"total_committers":60,"mean_commits":20.45,"dds":0.7669111654441728,"last_synced_commit":"53d1af4c01d674e78d0ba00d38a8239d1c31b7e6"},"previous_names":[],"tags_count":138,"template":false,"template_full_name":null,"purl":"pkg:github/lightly-ai/lightly","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightly-ai%2Flightly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightly-ai%2Flightly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightly-ai%2Flightly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightly-ai%2Flightly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lightly-ai","download_url":"https://codeload.github.com/lightly-ai/lightly/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightly-ai%2Flightly/sbom","scorecard":{"id":589186,"data":{"date":"2025-08-11","repo":{"name":"github.com/lightly-ai/lightly","commit":"5f882cc4b00751aa71eccd055e0e80040bf05be2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.9,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/check_example_nbs.yml:1","Warn: no topLevel permission defined: .github/workflows/discord_release_notification.yml:1","Warn: no topLevel permission defined: .github/workflows/release_pypi.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Warn: no topLevel permission defined: .github/workflows/test_api_deps_only.yml:1","Warn: no topLevel permission defined: .github/workflows/test_code_format.yml:1","Warn: no topLevel permission defined: .github/workflows/test_minimal_deps.yml:1","Warn: no topLevel permission defined: .github/workflows/test_setup.yml:1","Warn: no topLevel permission defined: .github/workflows/tests_unmocked.yml:1","Warn: no topLevel permission defined: .github/workflows/weekly_dependency_test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check_example_nbs.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/check_example_nbs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check_example_nbs.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/check_example_nbs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release_pypi.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/release_pypi.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release_pypi.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/release_pypi.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release_pypi.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/release_pypi.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_api_deps_only.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/test_api_deps_only.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test_api_deps_only.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/test_api_deps_only.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_api_deps_only.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/test_api_deps_only.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_api_deps_only.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/test_api_deps_only.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_code_format.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/test_code_format.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_code_format.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/test_code_format.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_minimal_deps.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/test_minimal_deps.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test_minimal_deps.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/test_minimal_deps.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_minimal_deps.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/test_minimal_deps.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_minimal_deps.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/test_minimal_deps.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_setup.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/test_setup.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test_setup.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/test_setup.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_setup.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/test_setup.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_setup.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/test_setup.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests_unmocked.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/tests_unmocked.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests_unmocked.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/tests_unmocked.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/weekly_dependency_test.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/weekly_dependency_test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/weekly_dependency_test.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/weekly_dependency_test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/weekly_dependency_test.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/lightly-ai/lightly/weekly_dependency_test.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/release_pypi.yml:31","Warn: pipCommand not pinned by hash: .github/workflows/release_pypi.yml:32","Warn: pipCommand not pinned by hash: .github/workflows/release_pypi.yml:33","Info:   0 out of  22 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   7 third-party GitHubAction dependencies pinned","Info:   0 out of   3 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T21:23:31.922Z","repository_id":37080557,"created_at":"2025-08-20T21:23:31.923Z","updated_at":"2025-08-20T21:23:31.923Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31312744,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computer-vision","contrastive-learning","contributions-welcome","deep-learning","embeddings","hacktoberfest","machine-learning","pytorch","self-supervised-learning"],"created_at":"2024-08-01T15:01:30.773Z","updated_at":"2026-04-02T18:03:36.001Z","avatar_url":"https://github.com/lightly-ai.png","language":"Python","readme":"\u003ca name=\"top\"\u003e\u003c/a\u003e\n![LightlySSL self-supervised learning Logo](docs/logos/lightly_SSL_logo_crop.png)\n\n[![GitHub](https://img.shields.io/github/license/lightly-ai/lightly)](https://github.com/lightly-ai/lightly/blob/master/LICENSE.txt)\n[![Unit Tests](https://github.com/lightly-ai/lightly/workflows/Unit%20Tests/badge.svg)](https://github.com/lightly-ai/lightly/actions/workflows/test.yml)\n[![PyPI](https://img.shields.io/pypi/v/lightly)](https://pypi.org/project/lightly/)\n[![Downloads](https://static.pepy.tech/badge/lightly)](https://pepy.tech/project/lightly)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Discord](https://img.shields.io/discord/752876370337726585?logo=discord\u0026logoColor=white\u0026label=discord\u0026color=7289da)](https://discord.gg/xvNJW94)\n[![Twitter](https://img.shields.io/twitter/follow/LightlyAI)](https://x.com/LightlyAI)\n[![codecov.io](https://codecov.io/github/lightly-ai/lightly/coverage.svg?branch=master)](https://app.codecov.io/gh/lightly-ai/lightly)\n\n\nLightly**SSL** is a computer vision framework for self-supervised learning.\n\n- [Documentation](https://docs.lightly.ai/self-supervised-learning/)\n- [Github](https://github.com/lightly-ai/lightly)\n- [Discord](https://discord.gg/xvNJW94)\n\nFor a commercial version with more features, including Docker support and pretraining\nmodels for embedding, classification, detection, and segmentation tasks with\na single command, please contact sales@lightly.ai.\n\nWe've also built a whole platform on top, with additional features for active learning\nand [data curation](https://docs.lightly.ai/docs/what-is-lightly). If you're interested in the\nLightly Worker Solution to easily process millions of samples and run [powerful algorithms](https://docs.lightly.ai/docs/customize-a-selection)\non your data, check out [lightly.ai](https://www.lightly.ai). It's free to get started!\n\n## News 🚀\n\n* March 23, 2026 - Check out our latest open-source project [LightlyStudio](https://github.com/lightly-ai/lightly-studio) to visualize, annotate, and manage your data with ease! 🔍\n* 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](https://github.com/lightly-ai/lightly-train). Head over there to get started and supercharge your models! ⚡️\n\n\u003cp\u003e\n\u003ca href=\"https://github.com/lightly-ai/lightly-train\"\u003e\u003cimg src=\"https://storage.googleapis.com/lightly-public/train/lightlytrain_standard_horizontal_dark.png\" alt=\"LightlyTrain\" height=\"40\"/\u003e\u003c/a\u003e\n\u003cspan\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n\u003ca href=\"https://github.com/lightly-ai/lightly-studio\"\u003e\u003cimg src=\"https://storage.googleapis.com/lightly-public/studio/lightlystudio_standard_horizontal_dark.png\" alt=\"LightlyStudio\" height=\"40\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Features\n\nThis self-supervised learning framework offers the following features:\n\n- Modular framework, which exposes low-level building blocks such as loss functions and\n  model heads.\n- Easy to use and written in a PyTorch-like style.\n- Supports custom backbone models for self-supervised pre-training.\n- Support for distributed training using PyTorch Lightning.\n\n### Supported Models\n\nYou can [find sample code for all the supported models here.](https://docs.lightly.ai/self-supervised-learning/examples/models.html) We provide PyTorch, PyTorch Lightning,\nand PyTorch Lightning distributed examples for all models to kickstart your project.\n\n**Models**:\n\n| Model          | Year | Paper | Docs | Colab (PyTorch) | Colab (PyTorch Lightning) |\n|----------------|------|-------|------|-----------------|----------------------------|\n| AIM            | 2024 | [paper](https://arxiv.org/abs/2401.08541) | [docs](https://docs.lightly.ai/self-supervised-learning/examples/aim.html) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch/aim.ipynb) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch_Lightning-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch_lightning/aim.ipynb) |\n| Barlow Twins   | 2021 | [paper](https://arxiv.org/abs/2103.03230) | [docs](https://docs.lightly.ai/self-supervised-learning/examples/barlowtwins.html) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch/barlowtwins.ipynb) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch_Lightning-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch_lightning/barlowtwins.ipynb) |\n| BYOL           | 2020 | [paper](https://arxiv.org/abs/2006.07733) | [docs](https://docs.lightly.ai/self-supervised-learning/examples/byol.html) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch/byol.ipynb) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch_Lightning-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch_lightning/byol.ipynb) |\n| DCL \u0026 DCLW     | 2021 | [paper](https://arxiv.org/abs/2110.06848) | [docs](https://docs.lightly.ai/self-supervised-learning/examples/dcl.html) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch/dcl.ipynb) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch_Lightning-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch_lightning/dcl.ipynb) |\n| DenseCL        | 2021 | [paper](https://arxiv.org/abs/2011.09157) | [docs](https://docs.lightly.ai/self-supervised-learning/examples/densecl.html) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch/densecl.ipynb) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch_Lightning-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch_lightning/densecl.ipynb) |\n| DINO           | 2021 | [paper](https://arxiv.org/abs/2104.14294) | [docs](https://docs.lightly.ai/self-supervised-learning/examples/dino.html) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch/dino.ipynb) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch_Lightning-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch_lightning/dino.ipynb) |\n| DINOv2         | 2023 | [paper](https://arxiv.org/abs/2304.07193) | [docs](https://docs.lightly.ai/self-supervised-learning/examples/dinov2.html) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch/dinov2.ipynb) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch_Lightning-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch_lightning/dinov2.ipynb) |\n| iBOT           | 2021 | [paper](https://arxiv.org/abs/2111.07832) | [docs](https://docs.lightly.ai/self-supervised-learning/examples/ibot.html) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch/ibot.ipynb) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch_Lightning-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch_lightning/ibot.ipynb) |\n| MAE            | 2021 | [paper](https://arxiv.org/abs/2111.06377) | [docs](https://docs.lightly.ai/self-supervised-learning/examples/mae.html) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch/mae.ipynb) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch_Lightning-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch_lightning/mae.ipynb) |\n| MSN            | 2022 | [paper](https://arxiv.org/abs/2204.07141) | [docs](https://docs.lightly.ai/self-supervised-learning/examples/msn.html) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch/msn.ipynb) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch_Lightning-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch_lightning/msn.ipynb) |\n| MoCo           | 2019 | [paper](https://arxiv.org/abs/1911.05722) | [docs](https://docs.lightly.ai/self-supervised-learning/examples/moco.html) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch/moco.ipynb) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch_Lightning-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch_lightning/moco.ipynb) |\n| NNCLR          | 2021 | [paper](https://arxiv.org/abs/2104.14548) | [docs](https://docs.lightly.ai/self-supervised-learning/examples/nnclr.html) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch/nnclr.ipynb) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch_Lightning-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch_lightning/nnclr.ipynb) |\n| PMSN           | 2022 | [paper](https://arxiv.org/abs/2210.07277) | [docs](https://docs.lightly.ai/self-supervised-learning/examples/pmsn.html) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch/pmsn.ipynb) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch_Lightning-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch_lightning/pmsn.ipynb) |\n| SimCLR         | 2020 | [paper](https://arxiv.org/abs/2002.05709) | [docs](https://docs.lightly.ai/self-supervised-learning/examples/simclr.html) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch/simclr.ipynb) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch_Lightning-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch_lightning/simclr.ipynb) |\n| SimMIM         | 2022 | [paper](https://arxiv.org/abs/2111.09886) | [docs](https://docs.lightly.ai/self-supervised-learning/examples/simmim.html) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch/simmim.ipynb) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch_Lightning-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch_lightning/simmim.ipynb) |\n| SimSiam        | 2021 | [paper](https://arxiv.org/abs/2011.10566) | [docs](https://docs.lightly.ai/self-supervised-learning/examples/simsiam.html) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch/simsiam.ipynb) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch_Lightning-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch_lightning/simsiam.ipynb) |\n| SwaV           | 2020 | [paper](https://arxiv.org/abs/2006.09882) | [docs](https://docs.lightly.ai/self-supervised-learning/examples/swav.html) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch/swav.ipynb) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch_Lightning-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch_lightning/swav.ipynb) |\n| VICReg         | 2021 | [paper](https://arxiv.org/abs/2105.04906) | [docs](https://docs.lightly.ai/self-supervised-learning/examples/vicreg.html) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch/vicreg.ipynb) | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch_Lightning-blue?logo=googlecolab)](https://colab.research.google.com/github/lightly-ai/lightly/blob/master/examples/notebooks/pytorch_lightning/vicreg.ipynb) |\n\n## Tutorials\n\nWant to jump to the tutorials and see Lightly in action?\n\n- [Train MoCo on CIFAR-10](https://docs.lightly.ai/self-supervised-learning/tutorials/package/tutorial_moco_memory_bank.html)\n- [Train SimCLR on Clothing Data](https://docs.lightly.ai/self-supervised-learning/tutorials/package/tutorial_simclr_clothing.html)\n- [Train SimSiam on Satellite Images](https://docs.lightly.ai/self-supervised-learning/tutorials/package/tutorial_simsiam_esa.html)\n- [Use Lightly with Custom Augmentations](https://docs.lightly.ai/self-supervised-learning/tutorials/package/tutorial_custom_augmentations.html)\n- [Pre-train a Detectron2 Backbone with Lightly](https://docs.lightly.ai/self-supervised-learning/tutorials/package/tutorial_pretrain_detectron2.html)\n- [Finetuning Lightly Checkpoints](https://docs.lightly.ai/self-supervised-learning/tutorials/package/tutorial_checkpoint_finetuning.html)\n- [Using timm Models as Backbones](https://docs.lightly.ai/self-supervised-learning/tutorials/package/tutorial_timm_backbone.html)\n\nCommunity and partner projects:\n\n- [On-Device Deep Learning with Lightly on an ARM microcontroller](https://github.com/ARM-software/EndpointAI/tree/master/ProofOfConcepts/Vision/OpenMvMaskDefaults)\n\n## Quick Start\n\nLightly requires **Python 3.7+**. We recommend installing Lightly in a **Linux** or **OSX** environment. Python 3.13 is not yet supported, as PyTorch itself lacks Python 3.13 compatibility.\n\n### Dependencies\n\nDue to the modular nature of the Lightly package some modules can be used with older versions of dependencies. However, to use all features as of today lightly requires the following dependencies:\n\n- [PyTorch](https://pytorch.org/)\u003e=1.11.0\n- [Torchvision](https://pytorch.org/vision/stable/index.html)\u003e=0.12.0\n- [PyTorch Lightning](https://www.pytorchlightning.ai/index.html)\u003e=1.7.1\n\nLightly is compatible with PyTorch and PyTorch Lightning v2.0+!\n\n### Installation\n\nYou can install Lightly and its dependencies from PyPI with:\n\n```\npip3 install lightly\n```\n\nWe strongly recommend installing Lightly in a dedicated virtualenv to avoid conflicts with your system packages.\n\n### Lightly in Action\n\nWith Lightly, you can use the latest self-supervised learning methods in a modular\nway using the full power of PyTorch. Experiment with various backbones,\nmodels, and loss functions. The framework has been designed to be easy to use\nfrom the ground up. [Find more examples in our docs](https://docs.lightly.ai/self-supervised-learning/examples/models.html).\n\n```python\nimport torch\nimport torchvision\n\nfrom lightly import loss\nfrom lightly import transforms\nfrom lightly.data import LightlyDataset\nfrom lightly.models.modules import heads\n\n\n# Create a PyTorch module for the SimCLR model.\nclass SimCLR(torch.nn.Module):\n    def __init__(self, backbone):\n        super().__init__()\n        self.backbone = backbone\n        self.projection_head = heads.SimCLRProjectionHead(\n            input_dim=512,  # Resnet18 features have 512 dimensions.\n            hidden_dim=512,\n            output_dim=128,\n        )\n\n    def forward(self, x):\n        features = self.backbone(x).flatten(start_dim=1)\n        z = self.projection_head(features)\n        return z\n\n\n# Use a resnet backbone from torchvision.\nbackbone = torchvision.models.resnet18()\n# Ignore the classification head as we only want the features.\nbackbone.fc = torch.nn.Identity()\n\n# Build the SimCLR model.\nmodel = SimCLR(backbone)\n\n# Prepare transform that creates multiple random views for every image.\ntransform = transforms.SimCLRTransform(input_size=32, cj_prob=0.5)\n\n\n# Create a dataset from your image folder.\ndataset = LightlyDataset(input_dir=\"./my/cute/cats/dataset/\", transform=transform)\n\n# Build a PyTorch dataloader.\ndataloader = torch.utils.data.DataLoader(\n    dataset,  # Pass the dataset to the dataloader.\n    batch_size=128,  # A large batch size helps with the learning.\n    shuffle=True,  # Shuffling is important!\n)\n\n# Lightly exposes building blocks such as loss functions.\ncriterion = loss.NTXentLoss(temperature=0.5)\n\n# Get a PyTorch optimizer.\noptimizer = torch.optim.SGD(model.parameters(), lr=0.1, weight_decay=1e-6)\n\n# Train the model.\nfor epoch in range(10):\n    for (view0, view1), targets, filenames in dataloader:\n        z0 = model(view0)\n        z1 = model(view1)\n        loss = criterion(z0, z1)\n        loss.backward()\n        optimizer.step()\n        optimizer.zero_grad()\n        print(f\"loss: {loss.item():.5f}\")\n```\n\nYou can easily use another model like SimSiam by swapping the model and the\nloss function.\n\n```python\n# PyTorch module for the SimSiam model.\nclass SimSiam(torch.nn.Module):\n    def __init__(self, backbone):\n        super().__init__()\n        self.backbone = backbone\n        self.projection_head = heads.SimSiamProjectionHead(512, 512, 128)\n        self.prediction_head = heads.SimSiamPredictionHead(128, 64, 128)\n\n    def forward(self, x):\n        features = self.backbone(x).flatten(start_dim=1)\n        z = self.projection_head(features)\n        p = self.prediction_head(z)\n        z = z.detach()\n        return z, p\n\n\nmodel = SimSiam(backbone)\n\n# Use the SimSiam loss function.\ncriterion = loss.NegativeCosineSimilarity()\n```\n\nYou can [find a more complete example for SimSiam here.](https://docs.lightly.ai/self-supervised-learning/examples/simsiam.html)\n\nUse PyTorch Lightning to train the model:\n\n```python\nfrom pytorch_lightning import LightningModule, Trainer\n\nclass SimCLR(LightningModule):\n    def __init__(self):\n        super().__init__()\n        resnet = torchvision.models.resnet18()\n        resnet.fc = torch.nn.Identity()\n        self.backbone = resnet\n        self.projection_head = heads.SimCLRProjectionHead(512, 512, 128)\n        self.criterion = loss.NTXentLoss()\n\n    def forward(self, x):\n        features = self.backbone(x).flatten(start_dim=1)\n        z = self.projection_head(features)\n        return z\n\n    def training_step(self, batch, batch_index):\n        (view0, view1), _, _ = batch\n        z0 = self.forward(view0)\n        z1 = self.forward(view1)\n        loss = self.criterion(z0, z1)\n        return loss\n\n    def configure_optimizers(self):\n        optim = torch.optim.SGD(self.parameters(), lr=0.06)\n        return optim\n\n\nmodel = SimCLR()\ntrainer = Trainer(max_epochs=10, devices=1, accelerator=\"gpu\")\ntrainer.fit(model, dataloader)\n```\n\nSee [our docs for a full PyTorch Lightning example.](https://docs.lightly.ai/self-supervised-learning/examples/simclr.html)\n\nOr train the model on 4 GPUs:\n\n```python\n\n# Use distributed version of loss functions.\ncriterion = loss.NTXentLoss(gather_distributed=True)\n\ntrainer = Trainer(\n    max_epochs=10,\n    devices=4,\n    accelerator=\"gpu\",\n    strategy=\"ddp\",\n    sync_batchnorm=True,\n    use_distributed_sampler=True,  # or replace_sampler_ddp=True for PyTorch Lightning \u003c2.0\n)\ntrainer.fit(model, dataloader)\n```\n\nWe provide multi-GPU training examples with distributed gather and synchronized BatchNorm.\n[Have a look at our docs regarding distributed training.](https://docs.lightly.ai/self-supervised-learning/getting_started/distributed_training.html)\n\n## Benchmarks\n\nImplemented models and their performance on various datasets. Hyperparameters are not\ntuned for maximum accuracy. For detailed results and more information about the benchmarks click\n[here](https://docs.lightly.ai/self-supervised-learning/getting_started/benchmarks.html).\n\n### ImageNet1k\n\n[ImageNet1k benchmarks](https://docs.lightly.ai/self-supervised-learning/getting_started/benchmarks.html#imagenet1k)\n\n**Note**: Evaluation settings are based on these papers:\n\n- Linear: [SimCLR](https://arxiv.org/abs/2002.05709)\n- Finetune: [SimCLR](https://arxiv.org/abs/2002.05709)\n- KNN: [InstDisc](https://arxiv.org/abs/1805.01978)\n\nSee the [benchmarking scripts](./benchmarks/imagenet/resnet50/) for details.\n\n| Model           | Backbone | Batch Size | Epochs | Linear Top1 | Finetune Top1 | kNN Top1 | Tensorboard                                                                                                                                                                    | Checkpoint                                                                                                                                                              |\n| --------------- | -------- | ---------- | ------ | ----------- | ------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| BarlowTwins     | Res50    | 256        | 100    | 62.9        | 72.6          | 45.6     | [link](https://lightly-ssl-checkpoints.s3.amazonaws.com/imagenet_resnet50_barlowtwins_2023-08-18_00-11-03/pretrain/version_0/events.out.tfevents.1692310273.Machine2.569794.0) | [link](https://lightly-ssl-checkpoints.s3.amazonaws.com/imagenet_resnet50_barlowtwins_2023-08-18_00-11-03/pretrain/version_0/checkpoints/epoch%3D99-step%3D500400.ckpt) |\n| BYOL            | Res50    | 256        | 100    | 62.5        | 74.5          | 46.0     | [link](https://lightly-ssl-checkpoints.s3.amazonaws.com/imagenet_resnet50_byol_2024-02-14_16-10-09/pretrain/version_0/events.out.tfevents.1707923418.Machine2.3205.0)          | [link](https://lightly-ssl-checkpoints.s3.amazonaws.com/imagenet_resnet50_byol_2024-02-14_16-10-09/pretrain/version_0/checkpoints/epoch%3D99-step%3D500400.ckpt)        |\n| DINO            | Res50    | 128        | 100    | 68.2        | 72.5          | 49.9     | [link](https://lightly-ssl-checkpoints.s3.amazonaws.com/imagenet_resnet50_dino_2023-06-06_13-59-48/pretrain/version_0/events.out.tfevents.1686052799.Machine2.482599.0)        | [link](https://lightly-ssl-checkpoints.s3.amazonaws.com/imagenet_resnet50_dino_2023-06-06_13-59-48/pretrain/version_0/checkpoints/epoch%3D99-step%3D1000900.ckpt)       |\n| DINO            | ViT-S/16    | 128        | 100    | 73.3        | 79.8          | 67.5     | [link](https://lightly-ssl-checkpoints.s3.amazonaws.com/imagenet_vits14_dino_2025-02-16_16-03-14/pretrain/version_0/events.out.tfevents.1739718198.compute-03-ubuntu-4x4090.2832462.0)        | [link](https://lightly-ssl-checkpoints.s3.amazonaws.com/imagenet_vits14_dino_2025-02-16_16-03-14/pretrain/version_0/checkpoints/epoch%3D99-step%3D1000900.ckpt)       |\n| iBOT            | ViT-S/16    | 128        | 100    | 72.2        | 78.3          | 65.4     | [link](https://lightly-ssl-checkpoints.s3.amazonaws.com/imagenet_vits16_ibot_2025-07-10_13-47-17/pretrain/version_0/events.out.tfevents.1752148040.compute-01-ubuntu-2x4090.253473.0)        | [link](https://lightly-ssl-checkpoints.s3.amazonaws.com/imagenet_vits16_ibot_2025-07-10_13-47-17/pretrain/version_0/checkpoints/epoch%3D99-step%3D1000900.ckpt)       |\n| MAE             | ViT-B/16 | 256        | 100    | 46.0        | 81.3          | 11.2     | [link](https://lightly-ssl-checkpoints.s3.amazonaws.com/imagenet_vitb16_mae_2024-02-25_19-57-30/pretrain/version_0/events.out.tfevents.1708887459.Machine2.1092409.0)          | [link](https://lightly-ssl-checkpoints.s3.amazonaws.com/imagenet_vitb16_mae_2024-02-25_19-57-30/pretrain/version_0/checkpoints/epoch%3D99-step%3D500400.ckpt)           |\n| MoCoV2          | Res50    | 256        | 100    | 61.5        | 74.3          | 41.8     | [link](https://lightly-ssl-checkpoints.s3.amazonaws.com/imagenet_resnet50_mocov2_2024-02-18_10-29-14/pretrain/version_0/events.out.tfevents.1708248562.Machine2.439033.0)      | [link](https://lightly-ssl-checkpoints.s3.amazonaws.com/imagenet_resnet50_mocov2_2024-02-18_10-29-14/pretrain/version_0/checkpoints/epoch%3D99-step%3D500400.ckpt)      |\n| SimCLR\\*        | Res50    | 256        | 100    | 63.2        | 73.9          | 44.8     | [link](https://lightly-ssl-checkpoints.s3.amazonaws.com/imagenet_resnet50_simclr_2023-06-22_09-11-13/pretrain/version_0/events.out.tfevents.1687417883.Machine2.33270.0)       | [link](https://lightly-ssl-checkpoints.s3.amazonaws.com/imagenet_resnet50_simclr_2023-06-22_09-11-13/pretrain/version_0/checkpoints/epoch%3D99-step%3D500400.ckpt)      |\n| SimCLR\\* + DCL  | Res50    | 256        | 100    | 65.1        | 73.5          | 49.6     | [link](https://lightly-ssl-checkpoints.s3.amazonaws.com/imagenet_resnet50_dcl_2023-07-04_16-51-40/pretrain/version_0/events.out.tfevents.1688482310.Machine2.247807.0)         | [link](https://lightly-ssl-checkpoints.s3.amazonaws.com/imagenet_resnet50_dcl_2023-07-04_16-51-40/pretrain/version_0/checkpoints/epoch%3D99-step%3D500400.ckpt)         |\n| SimCLR\\* + DCLW | Res50    | 256        | 100    | 64.5        | 73.2          | 48.5     | [link](https://lightly-ssl-checkpoints.s3.amazonaws.com/imagenet_resnet50_dclw_2023-07-07_14-57-13/pretrain/version_0/events.out.tfevents.1688734645.Machine2.3176.0)          | [link](https://lightly-ssl-checkpoints.s3.amazonaws.com/imagenet_resnet50_dclw_2023-07-07_14-57-13/pretrain/version_0/checkpoints/epoch%3D99-step%3D500400.ckpt)        |\n| SwAV            | Res50    | 256        | 100    | 67.2        | 75.4          | 49.5     | [link](https://lightly-ssl-checkpoints.s3.amazonaws.com/imagenet_resnet50_swav_2023-05-25_08-29-14/pretrain/version_0/events.out.tfevents.1684996168.Machine2.1445108.0)       | [link](https://lightly-ssl-checkpoints.s3.amazonaws.com/imagenet_resnet50_swav_2023-05-25_08-29-14/pretrain/version_0/checkpoints/epoch%3D99-step%3D500400.ckpt)        |\n| TiCo            | Res50    | 256        | 100    | 49.7        | 72.7          | 26.6     | [link](https://lightly-ssl-checkpoints.s3.amazonaws.com/imagenet_resnet50_tico_2024-01-07_18-40-57/pretrain/version_0/events.out.tfevents.1704649265.Machine2.1604956.0)       | [link](https://lightly-ssl-checkpoints.s3.amazonaws.com/imagenet_resnet50_tico_2024-01-07_18-40-57/pretrain/version_0/checkpoints/epoch%3D99-step%3D250200.ckpt)        |\n| VICReg          | Res50    | 256        | 100    | 63.0        | 73.7          | 46.3     | [link](https://lightly-ssl-checkpoints.s3.amazonaws.com/imagenet_resnet50_vicreg_2023-09-11_10-53-08/pretrain/version_0/events.out.tfevents.1694422401.Machine2.556563.0)      | [link](https://lightly-ssl-checkpoints.s3.amazonaws.com/imagenet_resnet50_vicreg_2023-09-11_10-53-08/pretrain/version_0/checkpoints/epoch%3D99-step%3D500400.ckpt)      |\n\n_\\*We use square root learning rate scaling instead of linear scaling as it yields\nbetter results for smaller batch sizes. See Appendix B.1 in the [SimCLR paper](https://arxiv.org/abs/2002.05709)._\n\n### ImageNet100\n\n[ImageNet100 benchmarks detailed results](https://docs.lightly.ai/self-supervised-learning/getting_started/benchmarks.html#imagenet100)\n\n### Imagenette\n\n[Imagenette benchmarks detailed results](https://docs.lightly.ai/self-supervised-learning/getting_started/benchmarks.html#imagenette)\n\n### CIFAR-10\n\n[CIFAR-10 benchmarks detailed results](https://docs.lightly.ai/self-supervised-learning/getting_started/benchmarks.html#cifar-10)\n\n## Terminology\n\nBelow you can see a schematic overview of the different concepts in the package.\nThe terms in bold are explained in more detail in our [documentation](https://docs.lightly.ai/self-supervised-learning/).\n\n\u003cimg src=\"/docs/source/getting_started/images/lightly_overview.png\" alt=\"Overview of the Lightly pip package\"/\u003e\u003c/a\u003e\n\n### Next Steps\n\nHead to the [documentation](https://docs.lightly.ai/self-supervised-learning/) and see the things you can achieve with Lightly!\n\n## Development\n\nTo install dev dependencies (for example to contribute to the framework) you can use the following command:\n\n```\npip3 install -e \".[dev]\"\n```\n\nFor more information about how to contribute have a look [here](CONTRIBUTING.md).\n\n### Running Tests\n\nUnit tests are within the [tests directory](tests/) and we recommend running them using\n[pytest](https://docs.pytest.org/en/stable/). There are two test configurations\navailable. By default, only a subset will be run:\n\n```\nmake test-fast\n```\n\nTo run all tests (including the slow ones) you can use the following command:\n\n```\nmake test\n```\n\nTo test a specific file or directory use:\n\n```\npytest \u003cpath to file or directory\u003e\n```\n\n### Code Formatting\n\nTo format code with [black](https://black.readthedocs.io/en/stable/) and [isort](https://docs.pytest.org) run:\n\n```\nmake format\n```\n\n## Further Reading\n\n**Self-Supervised Learning**:\n\n- Have a look at our [#papers channel on discord](https://discord.com/channels/752876370337726585/815153188487299083)\n  for the newest self-supervised learning papers.\n- [A Cookbook of Self-Supervised Learning, 2023](https://arxiv.org/abs/2304.12210)\n- [Masked Autoencoders Are Scalable Vision Learners, 2021](https://arxiv.org/abs/2111.06377)\n- [Emerging Properties in Self-Supervised Vision Transformers, 2021](https://arxiv.org/abs/2104.14294)\n- [Unsupervised Learning of Visual Features by Contrasting Cluster Assignments, 2021](https://arxiv.org/abs/2006.09882)\n- [What Should Not Be Contrastive in Contrastive Learning, 2020](https://arxiv.org/abs/2008.05659)\n- [A Simple Framework for Contrastive Learning of Visual Representations, 2020](https://arxiv.org/abs/2002.05709)\n- [Momentum Contrast for Unsupervised Visual Representation Learning, 2020](https://arxiv.org/abs/1911.05722)\n\n## FAQ\n\n- Why should I care about self-supervised learning? Aren't pre-trained models from ImageNet much better for transfer learning?\n\n  - Self-supervised learning has become increasingly popular among scientists over the last years because the learned representations perform extraordinarily well on downstream tasks. This means that they capture the important information in an image better than other types of pre-trained models. By training a self-supervised model on _your_ dataset, you can make sure that the representations have all the necessary information about your images.\n\n- How can I contribute?\n\n  - Create an issue if you encounter bugs or have ideas for features we should implement. You can also add your own code by forking this repository and creating a PR. More details about how to contribute with code is in our [contribution guide](CONTRIBUTING.md).\n\n- Is this framework for free?\n\n  - Yes, this framework is completely free to use and we provide the source code. We believe that we need to make training deep learning models more data efficient to achieve widespread adoption. One step to achieve this goal is by leveraging self-supervised learning. The company behind Lightly is committed to keep this framework open-source.\n\n- If this framework is free, how is the company behind Lightly making money?\n  - Training self-supervised models is only one part of our solution.\n    [The company behind Lightly](https://lightly.ai/) focuses on processing and analyzing embeddings created by self-supervised models.\n    By building, what we call a self-supervised active learning loop we help companies understand and work with their data more efficiently.\n    As the [Lightly Solution](https://docs.lightly.ai) is a freemium product, you can try it out for free. However, we will charge for some features.\n  - In any case this framework will always be free to use, even for commercial purposes.\n\n## Lightly in Research\n\n- [DINOv2-3D: Self-Supervised 3D Vision Transformer Pretraining](https://github.com/AIM-Harvard/DINOv2-3D-Med)\n- [Joint-Embedding vs Reconstruction: Provable Benefits of Latent Space Prediction for Self-Supervised Learning, 2025](https://arxiv.org/abs/2505.12477)\n- [Reverse Engineering Self-Supervised Learning, 2023](https://arxiv.org/abs/2305.15614)\n- [Learning Visual Representations via Language-Guided Sampling, 2023](https://arxiv.org/pdf/2302.12248.pdf)\n- [Self-Supervised Learning Methods for Label-Efficient Dental Caries Classification, 2022](https://www.mdpi.com/2075-4418/12/5/1237)\n- [DPCL: Contrastive representation learning with differential privacy, 2022](https://assets.researchsquare.com/files/rs-1516950/v1_covered.pdf?c=1654486158)\n- [Decoupled Contrastive Learning, 2021](https://arxiv.org/abs/2110.06848)\n- [solo-learn: A Library of Self-supervised Methods for Visual Representation Learning, 2021](https://www.jmlr.org/papers/volume23/21-1155/21-1155.pdf)\n\n## Company behind this Open Source Framework\n\n[Lightly](https://www.lightly.ai) is a spin-off from ETH Zurich that helps companies\nbuild efficient active learning pipelines to select the most relevant data for their models.\n\nYou can find out more about the company and it's services by following the links below:\n\n- [Homepage](https://www.lightly.ai)\n- [LightlyTrain](https://docs.lightly.ai/train/stable/index.html)\n- [Web-App](https://app.lightly.ai)\n- [Lightly Solution Documentation (Lightly Worker \u0026 API)](https://docs.lightly.ai/)\n- [Lightly's AwesomeSSL](https://github.com/lightly-ai/awesome-self-supervised-learning) (collection of SSL papers)\n\n[Back to top🚀](#top)\n","funding_links":[],"categories":["Python","图像数据与CV","Explaining Black Box Models and Datasets","Pytorch \u0026 related libraries｜Pytorch \u0026 相关库","Libraries","Computer Vision","Explainability and Fairness","Pytorch \u0026 related libraries","Uncategorized","Related Project","PyTorch Tools, Libraries, and Frameworks","Researchers","Embeddings and pre-trained models","Key Implementation Libraries"],"sub_categories":["CV｜计算机视觉:","General Purpose CV","CV:","General-Purpose Machine Learning","Uncategorized","Project of Self-supervised Learning","Frameworks"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightly-ai%2Flightly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightly-ai%2Flightly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightly-ai%2Flightly/lists"}