Skip to content

Add LightlyTrain Integration for Pretraining Support #2474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

yutong-xiang-97
Copy link

LightlyTrain is a novel pretraining framework built with PyTorch. It lets you pretrain any computer vision model on your unlabeled data, by leveraging distillation from powerful vision models and using self-supervised learning. With only a few lines of code, the community can pretrain domain-specific backbones for any downstream task with a TIMM backbone and beyond.

LightlyTrain supports all TIMM models out-of-the-box. You can start pretraining simply by:

import lightly_train

if __name__ == "__main__":
    lightly_train.train(
        out="out/my_experiment",                # Output directory.
        data="my_data_dir",                     # Directory with images.
        model="timm/resnet18",                  # Pass the timm model.
    )

and reload the exported model by TIMM directly for your own use

import timm

model = timm.create_model(
  model_name="resnet18",
  checkpoint_path="out/my_experiment/exported_models/exported_last.pt",
)

You can also check our docs and product page for more details.

Changes

This PR contains the link to our GitHub Repo in the "Awesome PyTorch Resources - Training / Frameworks" section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant