diff --git a/README.md b/README.md index 4a7bea998..587b4945f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -![Lightly Logo](docs/logos/lightly_logo_crop.png) +![Lightly SSL self-supervised learning Logo](docs/logos/lightly_SSL_logo_crop.png) ![GitHub](https://img.shields.io/github/license/lightly-ai/lightly) ![Unit Tests](https://github.com/lightly-ai/lightly/workflows/Unit%20Tests/badge.svg) @@ -7,19 +7,21 @@ [![Downloads](https://static.pepy.tech/badge/lightly)](https://pepy.tech/project/lightly) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) -Lightly is a computer vision framework for self-supervised learning. +Lightly SSL is a computer vision framework for self-supervised learning. - [Documentation](https://docs.lightly.ai/self-supervised-learning/) - [Github](https://github.com/lightly-ai/lightly) - [Discord](https://discord.gg/xvNJW94) (We have weekly paper sessions!) -We also built a whole platform on top, with additional features for active learning -and data curation. If you're interested in the platform, check out [lightly.ai](https://www.lightly.ai). +We've also built a whole platform on top, with additional features for active learning +and [data curation](https://docs.lightly.ai/docs/what-is-lightly). If you're interested in the +Lightly Worker Solution to easily process millions of samples and run [powerful algorithms](https://docs.lightly.ai/docs/selection) +on your data, check out [lightly.ai](https://www.lightly.ai). It's free to get started! ## Features -This framework offers the following 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. diff --git a/docs/logos/lightly_SSL_logo_crop.png b/docs/logos/lightly_SSL_logo_crop.png new file mode 100644 index 000000000..62028eaf2 Binary files /dev/null and b/docs/logos/lightly_SSL_logo_crop.png differ diff --git a/docs/logos/lightly_SSL_logo_crop_white_text.png b/docs/logos/lightly_SSL_logo_crop_white_text.png new file mode 100644 index 000000000..90733d7d2 Binary files /dev/null and b/docs/logos/lightly_SSL_logo_crop_white_text.png differ diff --git a/docs/source/_templates/footer.html b/docs/source/_templates/footer.html index 86060f5ef..217e11623 100644 --- a/docs/source/_templates/footer.html +++ b/docs/source/_templates/footer.html @@ -26,7 +26,13 @@ {%- else %} {% set copyright = copyright|e %} - © {% trans %}Copyright{% endtrans %} {{ copyright_year }}, {{ copyright }} + © {% trans %}Copyright{% endtrans %} {{ copyright_year }} +  | {{ copyright }} +  |  + Lightly SSL source code + Source Code + +  | Lightly Worker Solution documentation {%- endif %} {%- endif %} diff --git a/docs/source/_templates/layout.html b/docs/source/_templates/layout.html index bcf32e9f5..e39f8042f 100644 --- a/docs/source/_templates/layout.html +++ b/docs/source/_templates/layout.html @@ -8,6 +8,36 @@ We need this to override the footer --> {%- block content %} + +
+ Looking to easily do active learning on millions of samples? See our Lighly Worker docs. +
{% if theme_style_external_links|tobool %} -Check the installation of lightly ------------------------------------ -To see if the lightly command-line tool was installed correctly, you can run the -following command which will print the installed lightly version: +Check the installation of Lightly SSL +------------------------------------- +To see if the Lightly SSL command-line tool was installed correctly, you can run the +following command which will print the version of the installed Lightly SSL package: .. code-block:: bash lightly-version -If lightly was installed correctly, you should see something like this: +If Lightly SSL was installed correctly, you should see something like this: .. code-block:: bash diff --git a/docs/source/getting_started/distributed_training.rst b/docs/source/getting_started/distributed_training.rst index e1b140c28..30daefd7b 100644 --- a/docs/source/getting_started/distributed_training.rst +++ b/docs/source/getting_started/distributed_training.rst @@ -3,7 +3,7 @@ Distributed Training ==================== -Lightly supports training your model on multiple GPUs using Pytorch Lightning +Lightly SSL supports training your model on multiple GPUs using Pytorch Lightning and Distributed Data Parallel (DDP) training. You can find reference implementations for all our models in the :ref:`models` section. @@ -12,7 +12,7 @@ Training with multiple gpus is also available from the command line: :ref:`cli-t For details on distributed training we recommend the following pages: - `Pytorch Distributed Overview `_ -- `Pytorch Lightning Multi-GPU Training `_ +- `Pytorch Lightning Multi-GPU Training `_ There are different levels of synchronization for distributed training. One can diff --git a/docs/source/getting_started/install.rst b/docs/source/getting_started/install.rst index e05f61fc8..20f5e7fa7 100644 --- a/docs/source/getting_started/install.rst +++ b/docs/source/getting_started/install.rst @@ -4,24 +4,24 @@ Installation Supported Python versions ------------------------- -Lightly requires Python 3.6+. We recommend installing Lighlty in a Linux or OSX environment. +Lightly SSL requires Python 3.6+. We recommend installing Lightly SSL in a Linux or OSX environment. .. _rst-installing: -Installing Lightly ------------------- +Installing Lightly SSL +---------------------- -You can install Lightly and its dependencies from PyPi with: +You can install Lightly SSL and its dependencies from PyPi with: .. code-block:: bash pip install lightly -We strongly recommend that you install Lightly in a dedicated virtualenv, to avoid conflicting with your system packages. +We strongly recommend that you install Lightly SSL in a dedicated virtualenv, to avoid conflicting with your system packages. Dependencies ------------ -Lightly currently uses `PyTorch `_ as the underlying deep learning framework. +Lightly SSL currently uses `PyTorch `_ as the underlying deep learning framework. On top of PyTorch we use `Hydra `_ for managing configurations and `PyTorch Lightning `_ for training models. diff --git a/docs/source/getting_started/lightly_at_a_glance.rst b/docs/source/getting_started/lightly_at_a_glance.rst index e4b4af2f6..78361da69 100644 --- a/docs/source/getting_started/lightly_at_a_glance.rst +++ b/docs/source/getting_started/lightly_at_a_glance.rst @@ -3,14 +3,14 @@ Self-supervised learning ======================== -Lightly is a computer vision framework for training deep learning models using self-supervised learning. +Lightly SSL is a computer vision framework for training deep learning models using self-supervised learning. The framework can be used for a wide range of useful applications such as finding the nearest neighbors, similarity search, transfer learning, or data analytics. -How Lightly Works ------------------ -The flexible design of Lightly makes it easy to integrate in your Python code. Lightly is built +How Lightly SSL Works +--------------------- +The flexible design of Lightly SSL makes it easy to integrate in your Python code. Lightly SSL is built completely around PyTorch and the different pieces can be put together to fit *your* requirements. Data and Transformations @@ -219,12 +219,12 @@ Furthermore, the ResNet backbone can be used for transfer and few-shot learning. Self-supervised learning does not require labels for a model to be trained on. Lightly, however, supports the use of additional labels. For example, if you train a model on a folder 'cats' with subfolders 'Maine Coon', 'Bengal' and 'British Shorthair' - Lightly automatically returns the enumerated labels as a list. + Lightly SSL automatically returns the enumerated labels as a list. -Lightly in Three Lines ----------------------------------------- +Lightly SSL in Three Lines +-------------------------- -Lightly also offers an easy-to-use interface. The following lines show how the package can +Lightly SSL also offers an easy-to-use interface. The following lines show how the package can be used to train a model with self-supervision and create embeddings with only three lines of code. diff --git a/docs/source/getting_started/main_concepts.rst b/docs/source/getting_started/main_concepts.rst index a891539b3..245009287 100644 --- a/docs/source/getting_started/main_concepts.rst +++ b/docs/source/getting_started/main_concepts.rst @@ -6,18 +6,18 @@ Main Concepts Self-Supervised Learning ------------------------ -The figure below shows an overview of the different concepts used by the Lightly package +The figure below shows an overview of the different concepts used by the Lightly SSL package and a schema of how they interact. The expressions in **bold** are explained further below. .. figure:: images/lightly_overview.png - :align: center - :alt: Lightly Overview + :align: center + :alt: Lightly SSL Overview - Overview of the different concepts used by the Lightly package and how they interact. + Overview of the different concepts used by the Lightly SSL package and how they interact. * **Dataset** - In Lightly, datasets are accessed through :py:class:`~lightly.data.dataset.LightlyDataset`. + In Lightly SSL, datasets are accessed through :py:class:`~lightly.data.dataset.LightlyDataset`. You can create a :py:class:`~lightly.data.dataset.LightlyDataset` from a directory of images or videos, or directly from a `torchvision dataset `_. You can learn more about this in our tutorial: @@ -36,7 +36,7 @@ below. * **Collate Function** The collate function aggregates the views of multiple images into a single batch. - You can use the default collate function. Lightly also provides a + You can use the default collate function. Lightly SSL also provides a :py:class:`~lightly.data.multi_view_collate.MultiViewCollate` * **Dataloader** @@ -56,7 +56,7 @@ below. They project the outputs of the backbone, commonly called *embeddings*, *representations*, or *features*, into a new space in which the loss is calculated. This has been found to be hugely beneficial instead of directly calculating the loss - on the embeddings. Lightly provides common :py:mod:`~lightly.models.modules.heads` + on the embeddings. Lightly SSL provides common :py:mod:`~lightly.models.modules.heads` that can be added to any backbone. * **Model** @@ -71,17 +71,17 @@ below. * :ref:`sphx_glr_tutorials_package_tutorial_simsiam_esa.py` * **Loss** - The loss function plays a crucial role in self-supervised learning. Lightly provides + The loss function plays a crucial role in self-supervised learning. Lightly SSL provides common loss functions in the :py:mod:`~lightly.loss` module. * **Optimizer** - With Lightly, you can use any `PyTorch optimizer `_ + With Lightly SSL, you can use any `PyTorch optimizer `_ to train your model. * **Training** The model can either be trained using a plain `PyTorch training loop `_ or with a dedicated framework such as `PyTorch Lightning `_. - Lightly lets you choose what is best for you. Check out our :ref:`models ` and + Lightly SSL lets you choose what is best for you. Check out our :ref:`models ` and `tutorials `_ sections on how to train models with PyTorch or PyTorch Lightning. diff --git a/docs/source/index.rst b/docs/source/index.rst index c4e02bf77..d99066d75 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -4,36 +4,37 @@ contain the root `toctree` directive. -.. image:: ../logos/lightly_logo_crop.png - :width: 600 - :alt: Lightly +.. image:: ../logos/lightly_SSL_logo_crop.png + :width: 600 + :align: center + :alt: Lightly SSL Self-Supervised Learning Documentation =================================== .. note:: These pages document the Lightly self-supervised learning library. - If you are looking for Lightly Worker Solution to easily process millions - of samples and run powerful active learning algorithms on your data - please follow - `Lightly Worker documentation `_. + If you are looking for the Lightly Worker Solution with + advanced `active learning algorithms `_ and + `selection strategies `_ to select the best samples + within millions of unlabeled images or video frames stored in your cloud storage or locally, + please follow our `Lightly Worker documentation `_. -Lightly is a computer vision framework for self-supervised learning. +Lightly SSL is a computer vision framework for self-supervised learning. -With Lightly you can train deep learning models using self-supervision. +With Lightly SSL you can train deep learning models using self-supervision. This means, that you don’t require any labels to train a model. -Lightly has been built to help you understand and work with large unlabeled +Lightly SSL has been built to help you understand and work with large unlabeled datasets. It is built on top of PyTorch and therefore fully compatible with other frameworks such as Fast.ai. -Lightly -------- +Lightly AI +---------- - `Homepage `_ -- `Web-App `_ -- `Documentation `_ -- `Lightly Solution Documentation (Lightly Worker & API) `_ +- `Lightly Worker Solution Documentation `_ +- `Lightly Platform `_ - `Github `_ - `Discord `_ (We have weekly paper sessions!) diff --git a/docs/source/lightly.cli.rst b/docs/source/lightly.cli.rst index 62996119e..44861d86d 100644 --- a/docs/source/lightly.cli.rst +++ b/docs/source/lightly.cli.rst @@ -35,7 +35,7 @@ lightly.cli .config.config.yaml ------------------- -The default settings for all command line tools in the lightly Python package are stored in a YAML config file. +The default settings for all command line tools in the Lightly SSL Python package are stored in a YAML config file. The config file is distributed along with the Python package and can be adapted to fit custom requirements. The arguments are grouped into namespaces. For example, everything related to the embedding model is grouped under diff --git a/docs/source/tutorials/package.rst b/docs/source/tutorials/package.rst index 1b0e2904f..3aff3d9a7 100644 --- a/docs/source/tutorials/package.rst +++ b/docs/source/tutorials/package.rst @@ -3,11 +3,11 @@ Python Package =================================== -With the lightly framework you can use the power of self-supervised learning +With the Lightly SSL framework you can use the power of self-supervised learning for computervision with ease. Here we show you tutorials to help you work with the Python library. -Since lightly is built on top of `PyTorch `_ +Since Lightly SSL is built on top of `PyTorch `_ and `PyTorch Lightning `_ you might want to have a look at the two frameworks to understand basic concepts. diff --git a/docs/source/tutorials/platform.rst b/docs/source/tutorials/platform.rst index b7b499457..3e580cac5 100644 --- a/docs/source/tutorials/platform.rst +++ b/docs/source/tutorials/platform.rst @@ -9,8 +9,8 @@ Platform These tutorials use a deprecated workflow of the Lightly Solution and will be removed in the future. Please refer to the `new documentation and tutorials `_ instead. -Lightly is more than just a framework for self-supervised learning. We built a complete data curation platform on top. -Use the embeddings generated using the lightly framework and use them to curate your dataset. Collaborate with your friends +Lightly SSL is more than just a framework for self-supervised learning. We built a complete data curation platform on top. +Use the embeddings generated using the Lightly SSL framework and use them to curate your dataset. Collaborate with your friends and share the curated data with your favorite data labeling partner. In this tutorial series, you will learn how to get the most out of the platform. diff --git a/docs/source/tutorials/structure_your_input.rst b/docs/source/tutorials/structure_your_input.rst index 7994f7b11..138fe3943 100644 --- a/docs/source/tutorials/structure_your_input.rst +++ b/docs/source/tutorials/structure_your_input.rst @@ -3,8 +3,8 @@ Tutorial 1: Structure Your Input ================================ -The `lightly Python package `_ can process image datasets to generate embeddings -or to upload data to the `Lightly platform `_. In this tutorial you will learn how to structure +The `Lightly SSL Python package `_ can process image datasets to generate embeddings +or to upload data to the `Lightly Platform `_. In this tutorial you will learn how to structure your image dataset such that it is understood by our framework. You can also skip this tutorial and jump right into training a model: @@ -18,8 +18,8 @@ Supported File Types Images ^^^^^^^^^^^^^^^^^^^^^ -Since lightly uses `Pillow `_ -for image loading it also supports all the image formats supported by +Since Lightly SSL uses `Pillow `_ +for image loading, it also supports all the image formats supported by `Pillow `_. - .jpg, .png, .tiff and @@ -28,7 +28,7 @@ for image loading it also supports all the image formats supported by Videos ^^^^^^^^^^^^^^^^^^^^^ -To load videos directly lightly uses +To load videos directly, Lightly SSL uses `torchvision `_ and `PyAV `_. The following formats are supported. @@ -46,7 +46,7 @@ Flat Directory Containing Images ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ You can store all images of interest in a single folder without additional hierarchy. For example below, -lightly will load all filenames and images in the directory `data/`. Additionally, it will assign all images +Lightly SSL will load all filenames and images in the directory `data/`. Additionally, it will assign all images a placeholder label. .. code-block:: bash @@ -58,7 +58,7 @@ a placeholder label. ... +--- img-N.jpg -For the structure above, lightly will understand the input as follows: +For the structure above, Lightly SSL will understand the input as follows: .. code-block:: python @@ -80,7 +80,7 @@ Directory with Subdirectories Containing Images ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ You can give structure to your input directory by collecting the input images in subdirectories. In this case, -the filenames loaded by lightly are with respect to the "root directory" `data/`. Furthermore, lightly assigns +the filenames loaded by Lightly SSL are with respect to the "root directory" `data/`. Furthermore, Lightly SSL assigns each image a so-called "weak-label" indicating to which subdirectory it belongs. .. code-block:: bash @@ -106,7 +106,7 @@ each image a so-called "weak-label" indicating to which subdirectory it belongs. ... +-- img-N10.jpg -For the structure above, lightly will understand the input as follows: +For the structure above, Lightly SSL will understand the input as follows: .. code-block:: python @@ -136,9 +136,9 @@ For the structure above, lightly will understand the input as follows: Video Folder Datasets --------------------- -The lightly Python package allows you to work `directly` on video data, without having +The Lightly SSL Python package allows you to work `directly` on video data, without having to exctract the frames first. This can save a lot of disk space as video files are -typically strongly compressed. Using lightly on video data is as simple as pointing +typically strongly compressed. Using Lightly SSL on video data is as simple as pointing the software at an input directory where one or more videos are stored. The package will automatically detect all video files and index them so that each frame can be accessed. @@ -173,8 +173,8 @@ also work on video data. Give it a try! Embedding Files --------------- -Embeddings generated by the lightly Python package are typically stored in a `.csv` file and can then be uploaded to the -Lightly platform from the command line. If the embeddings were generated with the lightly command-line tool, they have +Embeddings generated by the Lightly SSL Python package are typically stored in a `.csv` file and can then be uploaded to the +Lightly Platform from the command line. If the embeddings were generated with the Lightly SSL command-line tool, they have the correct format already. You can also save your own embeddings in a `.csv` file to upload them. In that case, make sure the file meets the format @@ -234,7 +234,7 @@ The code shown above will produce the following `.csv` file: - 0.2 - 0 -.. note:: Note that lightly automatically creates "weak" labels for datasets +.. note:: Note that Lightly SSL automatically creates "weak" labels for datasets with subfolders. Each subfolder corresponds to one weak label. The labels are called "weak" since they might not be used for a task you want to solve with ML directly but still can be relevant to group @@ -245,7 +245,7 @@ Advanced usage of Embeddings ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ In some cases you want to enrich the embeddings with additional information. -The lightly csv scheme is very simple and can be easily extended. +The Lightly SSL csv scheme is very simple and can be easily extended. For example, you can add your own embeddings to the existing embeddings. This could be useful if you have additional meta information about each sample. @@ -258,7 +258,7 @@ To add custom embeddings you need to add more embedding columns to the .csv file Make sure you keep the enumeration of the embeddings in correct order. -Here you see an embedding from lightly with a 2-dimensional embedding vector. +Here you see an embedding from Lightly SSL with a 2-dimensional embedding vector. .. list-table:: lightly_embeddings.csv :widths: 50 50 50 50 @@ -319,7 +319,7 @@ We can now append our embedding vector to the .csv file. Next Steps ----------------- -Now that you understand the various data formats lightly supports you can +Now that you understand the various data formats Lightly SSL supports you can start training a model: - :ref:`lightly-moco-tutorial-2`