### Download Example Dataset for Pretraining Source: https://docs.lightly.ai/train/stable/quick_start_distillation Downloads and unzips an example unlabeled dataset (coco128_unlabeled) for pretraining models with LightlyTrain. This dataset can be structured in any way, including subdirectories. ```bash wget https://github.com/lightly-ai/coco128_unlabeled/releases/download/v0.0.1/coco128_unlabeled.zip && unzip -q coco128_unlabeled.zip ``` -------------------------------- ### Start TensorBoard Visualization for Training Logs Source: https://docs.lightly.ai/train/stable/_sources/panoptic_segmentation.md This command starts TensorBoard to visualize training progress logged in the specified directory. Ensure TensorBoard is installed and accessible in your PATH. ```bash tensorboard --logdir out/my_experiment ``` -------------------------------- ### Download Example Labeled Dataset for Fine-tuning Source: https://docs.lightly.ai/train/stable/quick_start_distillation Downloads and unzips an example labeled dataset (coco128_yolo) for fine-tuning models with LightlyTrain. This dataset includes images and corresponding labels for tasks like object detection. ```bash wget https://github.com/lightly-ai/coco128_yolo/releases/download/v0.0.1/coco128_yolo.zip && unzip -q coco128_yolo.zip ``` -------------------------------- ### Download Example Image for Prediction Source: https://docs.lightly.ai/train/stable/quick_start_object_detection Downloads a sample image for object detection inference using wget. This image will be used to test the prediction capabilities of the loaded model. ```bash wget -O image.jpg http://images.cocodataset.org/val2017/000000577932.jpg ``` -------------------------------- ### Download Example Image for Object Detection Source: https://docs.lightly.ai/train/stable/_sources/quick_start_object_detection.md Downloads a sample image from the COCO dataset for object detection inference. This image will be used to test the pre-trained model. ```bash wget -O image.jpg http://images.cocodataset.org/val2017/000000577932.jpg ``` -------------------------------- ### Download Example Dataset Source: https://docs.lightly.ai/train/stable/_sources/quick_start_distillation.md Downloads and unzips the coco128_unlabeled dataset, which can be used as an example for training. This dataset is unlabeled and suitable for pretraining tasks. ```bash wget https://github.com/lightly-ai/coco128_unlabeled/releases/download/v0.0.1/coco128_unlabeled.zip && unzip -q coco128_unlabeled.zip ``` -------------------------------- ### Command Line: Train with 2 GPUs on a Single Machine Source: https://docs.lightly.ai/train/stable/_sources/performance/multi_gpu.md This command line example shows how to start multi-GPU training using the Lightly Train CLI. It specifies the same parameters as the Python example: output directory, data path, model, accelerator type ('gpu'), and the number of devices (2 GPUs). ```bash lightly-train pretrain out="out/my_experiment" data="my_data_dir" model="torchvision/resnet50" accelerator="gpu" devices=2 ``` -------------------------------- ### Download and Prepare Labeled Dataset (Bash) Source: https://docs.lightly.ai/train/stable/_sources/quick_start_distillation.md Downloads and unpacks the coco128_yolo dataset, which is a prerequisite for fine-tuning object detection models. Ensure you have wget and unzip installed. ```bash wget https://github.com/lightly-ai/coco128_yolo/releases/download/v0.0.1/coco128_yolo.zip && unzip -q coco128_yolo.zip ``` -------------------------------- ### Pretrain SuperGradients Model with LightlyTrain (Command Line) Source: https://docs.lightly.ai/train/stable/_sources/pretrain_distill/models/supergradients.md This command-line interface (CLI) example shows how to initiate the pretraining of a SuperGradients model using LightlyTrain. Ensure `lightly-train` is installed with SuperGradients support. The arguments specify the output directory, data location, and the SuperGradients model to use. ```bash lightly-train pretrain out="out/my_experiment" data="my_data_dir" model="super_gradients/yolo_nas_s" ``` -------------------------------- ### Install LightlyTrain with Optional Dependencies Source: https://docs.lightly.ai/train/stable/installation Installs LightlyTrain along with specific optional dependencies, such as 'wandb' for logging. Multiple dependencies can be installed by separating them with commas within the brackets. ```bash pip install "lightly-train[wandb]" ``` ```bash pip install "lightly-train[wandb,timm]" ``` -------------------------------- ### Pretrain Model using LightlyTrain inside Docker Source: https://docs.lightly.ai/train/stable/_sources/docker.md Example command to pretrain a model using LightlyTrain within a running Docker container. Paths are relative to the mounted '/out' and '/data' directories. Requires the container to be started with appropriate volume mounts. ```bash lightly-train pretrain out="/out/my_experiment" data="/data" model="torchvision/resnet50" ``` -------------------------------- ### Initialize LightlyTrain for Pretraining Source: https://docs.lightly.ai/train/stable/_sources/tutorials/depth_estimation/index.md Imports the 'lightly_train' library, indicating the start of the pretraining script ('pretrain.py'). This setup is a prerequisite for configuring and running the U-Net pretraining process with custom augmentation strategies. ```python # pretrain.py import lightly_train ``` -------------------------------- ### Install and Verify LightlyTrain Docker Image Source: https://docs.lightly.ai/train/stable/_sources/docker.md Installs the LightlyTrain Docker image from Docker Hub and verifies the installation by running the help command. Requires Docker with NVIDIA GPU support. ```bash docker pull lightly/train:latest ``` ```bash docker run --rm --gpus=all lightly/train:latest lightly-train --help ``` -------------------------------- ### Verify FlashAttention Installation Source: https://docs.lightly.ai/train/stable/pretrain_distill/models/yolov12 Verifies the successful installation of the FlashAttention library. This script prints the installed version of FlashAttention, confirming that the installation in the previous step was successful. ```python import flash_attn; print('FlashAttention version:', flash_attn.__version__) ``` -------------------------------- ### Install YOLOv12 from GitHub Source: https://docs.lightly.ai/train/stable/_sources/pretrain_distill/models/yolov12.md Installs the YOLOv12 package directly from its GitHub repository using pip. This command is essential for users who need to work with the specific YOLOv12 implementation provided by the original authors. ```bash pip install git+https://github.com/sunsmarterjie/yolov12 ``` -------------------------------- ### Install LightlyTrain Source: https://docs.lightly.ai/train/stable/_sources/index.md Installs the LightlyTrain library for Python 3.8+ on Windows, Linux, or MacOS. This is a prerequisite for using the library's functionalities. ```bash pip install lightly-train ``` -------------------------------- ### Example Training Output Directory Structure Source: https://docs.lightly.ai/train/stable/_sources/semantic_segmentation.md Illustrates the typical directory structure created by Lightly Train for storing training logs, model checkpoints, and exported models. The 'out' argument defines the root for this structure. ```text out/my_experiment ├── checkpoints │ └── last.ckpt # Last checkpoint ├── exported_models | └── exported_last.pt # Last model exported (unless disabled) | └── exported_best.pt # Best model exported (unless disabled) ├── events.out.tfevents.1721899772.host.1839736.0 # TensorBoard logs └── train.log # Training logs ``` -------------------------------- ### Verify FlashAttention Installation Source: https://docs.lightly.ai/train/stable/_sources/pretrain_distill/models/yolov12.md Verifies the successful installation and version of the FlashAttention library. This command is useful for confirming that the previous installation or fix was effective and that FlashAttention is ready for use. ```bash python -c "import flash_attn; print('FlashAttention version:', flash_attn.__version__)" ``` -------------------------------- ### Start Object Detection Training with Lightly AI Train Source: https://docs.lightly.ai/train/stable/_sources/quick_start_object_detection.md Initiates object detection training by specifying the output directory, model architecture, number of training steps, batch size, and dataset configuration. Lightly Train automatically handles remaining parameters and image augmentations. ```python import lightly_train lightly_train.train_object_detection( out="out/my_experiment", model="dinov3/convnext-tiny-ltdetr-coco", steps=100, # Small number of steps for demonstration, default is 90_000. batch_size=4, # Small batch size for demonstration, default is 16. data={ "path": "coco128_yolo", "train": "images/train2017", "val": "images/val2017", "names": { 0: "person", 1: "bicycle", 2: "car", 3: "motorcycle", 4: "airplane", 5: "bus", 6: "train", 7: "truck", 8: "boat", 9: "traffic light", 10: "fire hydrant", 11: "stop sign", 12: "parking meter", 13: "bench", 14: "bird", 15: "cat", 16: "dog", 17: "horse", 18: "sheep", 19: "cow", 20: "elephant", 21: "bear", 22: "zebra", 23: "giraffe", 24: "backpack", 25: "umbrella", 26: "handbag", 27: "tie", 28: "suitcase", 29: "frisbee", 30: "skis", 31: "snowboard", 32: "sports ball", 33: "kite", 34: "baseball bat", 35: "baseball glove", 36: "skateboard", 37: "surfboard", 38: "tennis racket", 39: "bottle", 40: "wine glass", 41: "cup", 42: "fork", 43: "knife", 44: "spoon", 45: "bowl", 46: "banana", 47: "apple", 48: "sandwich", 49: "orange", 50: "broccoli", 51: "carrot", 52: "hot dog", 53: "pizza", 54: "donut", 55: "cake", 56: "chair", 57: "couch", 58: "potted plant", 59: "bed", 60: "dining table", 61: "toilet", 62: "tv", 63: "laptop", 64: "mouse", 65: "remote", 66: "keyboard", 67: "cell phone", 68: "microwave", 69: "oven", 70: "toaster", 71: "sink", 72: "refrigerator", 73: "book", 74: "clock", 75: "vase", 76: "scissors", 77: "teddy bear", 78: "hair drier", 79: "toothbrush", }, }, ) ``` -------------------------------- ### List Available Models (Python and CLI) Source: https://docs.lightly.ai/train/stable/pretrain_distill/models Lists all models available from installed packages. This command can be executed using the Python API or the command-line interface. ```python import lightly_train print(lightly_train.list_models()) ``` ```bash lightly-train list_models ``` -------------------------------- ### Install Dependencies for LightlyTrain and fastai Source: https://docs.lightly.ai/train/stable/_sources/tutorials/depth_estimation/index.md Installs the necessary Python packages, 'lightly-train' and 'fastai', required for the monocular depth estimation tutorial. This command should be run in a terminal or command prompt. ```bash pip install lightly-train fastai ``` -------------------------------- ### Install Dependencies for LightlyTrain YOLO Source: https://docs.lightly.ai/train/stable/_sources/tutorials/yolo/index.md Installs the 'lightly-train' package with support for ultralytics YOLO models and the 'supervision' package for visualization. This is a prerequisite for both pretraining and fine-tuning steps. ```bash pip install "lightly-train[ultralytics]" "supervision==0.25.1" ``` -------------------------------- ### List Available Models (Command Line) Source: https://docs.lightly.ai/train/stable/pretrain_distill/models/index Lists all available models from installed packages via the command line. Requires 'lightly-train' executable. Outputs a list of model identifiers. ```bash lightly-train list_models ``` -------------------------------- ### Pretrain and Distill Own DINOv2 Weights (Python) Source: https://docs.lightly.ai/train/stable/_sources/pretrain_distill/methods/distillation.md Provides a two-step Python example for first pretraining a DINOv2 ViT model and then using its weights as a teacher for distillation to a ResNet-18 student. This allows for domain-specific teacher models. ```python import lightly_train if __name__ == "__main__": # Pretrain a DINOv2 ViT-B/14 model. lightly_train.pretrain( out="out/my_dinov2_pretrain_experiment", data="my_dinov2_pretrain_data_dir", model="dinov2/vitb14", method="dinov2", ) # Distill the pretrained DINOv2 model to a ResNet-18 student model. lightly_train.pretrain( out="out/my_distillation_pretrain_experiment", data="my_distillation_pretrain_data_dir", model="torchvision/resnet18", method="distillation", method_args={ "teacher": "dinov2/vitb14", "teacher_weights": "out/my_dinov2_pretrain_experiment/exported_models/exported_last.pt", # pretrained `dinov2/vitb14` weights } ) ``` -------------------------------- ### Load Weights for Fine-tuning Instance Segmentation Source: https://docs.lightly.ai/train/stable/_sources/instance_segmentation.md This Python snippet demonstrates loading a model checkpoint (e.g., '.ckpt' or '.pt' file) to start a new fine-tuning run. Training parameters can be modified. ```python lightly_train.train_instance_segmentation( out="out/my_new_experiment", model="out/my_experiment/checkpoints/last.ckpt", # or "out/my_experiment/exported_models/exported_best.pt" # ... modify other training parameters as needed ) ``` -------------------------------- ### Example TensorBoard Logging Command Source: https://docs.lightly.ai/train/stable/python_api/lightly_train This command demonstrates how to launch TensorBoard to visualize training logs generated by the lightly.ai training process. Ensure you run this command from the directory containing your output logs. ```shell tensorboard --logdir out ``` -------------------------------- ### Command Line: Train on Specific GPUs (1 and 3) Source: https://docs.lightly.ai/train/stable/_sources/performance/multi_gpu.md This command line example demonstrates training on specific GPUs (GPU 1 and GPU 3) by passing a string representation of a list to the 'devices' argument. This allows for precise control over GPU allocation via the CLI. ```bash lightly-train pretrain out="out/my_experiment" data="my_data_dir" model="torchvision/resnet50" accelerator="gpu" devices="[1,3]" ``` -------------------------------- ### Python: Configure Instance Segmentation Training with Lightly Train Source: https://docs.lightly.ai/train/stable/instance_segmentation Example Python code demonstrating how to initiate instance segmentation training using `lightly_train.train_instance_segmentation`. It shows the configuration of the output directory, model, and dataset paths, including class names. ```python import lightly_train if __name__ == "__main__": lightly_train.train_instance_segmentation( out="out/my_experiment", model="dinov3/vitl16-eomt-inst-coco", data={ "path": "my_data_dir", # Path to dataset directory "train": "images/train", # Path to training images "val": "images/val", # Path to validation images "names": { # Classes in the dataset 0: "background", # Classes must match those in the annotation files 1: "car", 2: "bicycle", # ... }, }, ) ``` -------------------------------- ### Pretrain Model with Distillation Source: https://docs.lightly.ai/train/stable/_sources/quick_start_distillation.md Pretrains a model using distillation with LightlyTrain. It specifies the output directory, dataset path, model architecture, pretraining method, teacher model, epochs, and batch size. This Python script utilizes the lightly_train library to perform the pretraining. ```python import lightly_train # Pretrain the model lightly_train.pretrain( out="out/my_experiment", # Output directory data="coco128_unlabeled", # Directory with images model="dinov3/vitt16", # Model to train method="distillation", # Pretraining method method_args={ "teacher": "dinov3/vits16" # Teacher model for distillation }, epochs=5, # Small number of epochs for demonstration batch_size=32, # Small batch size for demonstration ) ``` -------------------------------- ### Pretrain Model with Distillation using LightlyTrain Source: https://docs.lightly.ai/train/stable/quick_start_distillation Pretrains a model using distillation with LightlyTrain. This example uses a DINOv3 ViT model and the coco128_unlabeled dataset. It saves logs, checkpoints, and exported models to an output directory. ```python import lightly_train # Pretrain the model lightly_train.pretrain( out="out/my_experiment", # Output directory data="coco128_unlabeled", # Directory with images model="dinov3/vitt16", # Model to train method="distillation", # Pretraining method method_args={ "teacher": "dinov3/vits16" # Teacher model for distillation }, epochs=5, # Small number of epochs for demonstration batch_size=32, # Small batch size for demonstration ) ``` -------------------------------- ### Train Semantic Segmentation with MLflow Logging Source: https://docs.lightly.ai/train/stable/semantic_segmentation Example of initiating semantic segmentation training using lightly_ai_train_stable with MLflow logging enabled. Requires MLflow to be installed. Configures experiment name, run name, and tracking URI. ```python import lightly_train if __name__ == "__main__": lightly_train.train_semantic_segmentation( out="out/my_experiment", model="dinov2/vitl14-eomt", data={ # ... }, logger_args={ "mlflow": { "experiment_name": "my_experiment", "run_name": "my_run", "tracking_uri": "tracking_uri", }, }, ) ``` -------------------------------- ### Launch TensorBoard for Monitoring Source: https://docs.lightly.ai/train/stable/_sources/tutorials/depth_estimation/index.md Launches TensorBoard to visualize training runs and compare model performance. This command should be executed in the terminal. ```bash tensorboard --logdir=lightning_logs ``` -------------------------------- ### Train Semantic Segmentation with Weights & Biases Logging Source: https://docs.lightly.ai/train/stable/semantic_segmentation Example of initiating semantic segmentation training with Weights & Biases (wandb) logging. Requires wandb installation. Configures project name, experiment name, and option to log model checkpoints. ```python import lightly_train if __name__ == "__main__": lightly_train.train_semantic_segmentation( out="out/my_experiment", model="dinov3/vitl16-eomt-coco", data={ # ... }, logger_args={ "wandb": { "project": "my_project", "name": "my_experiment", "log_model": False, # Set to True to upload model checkpoints }, }, ) ``` -------------------------------- ### Embed Images using Command Line Interface Source: https://docs.lightly.ai/train/stable/embed This command-line interface example shows how to pretrain a model and then use its checkpoint to generate image embeddings. The 'pretrain' command requires 'out', 'data', and 'model' arguments. The 'embed' command requires 'out', 'data', 'checkpoint', and 'format' arguments. The 'checkpoint' path points to the saved model after pretraining, and 'format' specifies the desired output format for the embeddings. ```bash lightly-train pretrain out="out/my_experiment" data="my_data_dir" model="torchvision/resnet50" lightly-train embed out=my_embeddings.pth data=my_data_dir checkpoint=out/my_experiment/checkpoints/last.ckpt format=torch ``` -------------------------------- ### Fine-tuning Script Setup - Python Source: https://docs.lightly.ai/train/stable/_sources/tutorials/depth_estimation/index.md Sets up the fine-tuning process for a depth estimation model. This script imports necessary components for data loading, model architecture (DepthUnet, DynamicUnet), training (PyTorch Lightning Trainer), and standard PyTorch modules. It assumes the existence of a 'model.py' file and a 'CKPT_PATH' environment variable or configuration. ```python # finetune.py import torch import torchvision.transforms as T from datasets import DIODEDepthDataset from fastai.vision.models.unet import DynamicUnet from model import DepthUnet from pytorch_lightning import Trainer from torch.nn import Module, Sequential from torch.utils.data import DataLoader from torchvision import models ``` -------------------------------- ### Load Weights for New Training Run in Lightly AI Source: https://docs.lightly.ai/train/stable/instance_segmentation Loads weights from a checkpoint file to start a new training run, allowing for fine-tuning with potentially different training parameters. This is useful for continuing training with a modified setup. It can load `.ckpt` files or recommended exported best model weights. ```python import lightly_train if __name__ == "__main__": lightly_train.train_instance_segmentation( out="out/my_experiment", model="out/my_experiment/checkpoints/last.ckpt", # or "out/my_experiment/exported_models/exported_best.pt" data={ # ... } ) ``` -------------------------------- ### Pretrain with DINO using LightlyTrain CLI Source: https://docs.lightly.ai/train/stable/_sources/pretrain_distill/methods/dino.md This snippet shows the command-line interface (CLI) command to start a pre-training job with DINO using LightlyTrain. It mirrors the Python API, allowing users to configure output paths, data sources, models, and the DINO method directly from the terminal. ```bash lightly-train pretrain out=out/my_experiment data=my_data_dir model="torchvision/resnet18" method="dino" ``` -------------------------------- ### Visualize Training with TensorBoard Source: https://docs.lightly.ai/train/stable/object_detection This snippet demonstrates how to launch TensorBoard to visualize training progress. TensorBoard logs are saved in the output directory. The logger can be disabled by setting the corresponding argument to None. ```bash tensorboard --logdir out/my_experiment ``` ```python logger_args={"tensorboard": None} ``` -------------------------------- ### Run DINO Pre-training with LightlyTrain (Python) Source: https://docs.lightly.ai/train/stable/pretrain_distill/methods/dino This Python script demonstrates how to initiate DINO pre-training using the LightlyTrain library. It specifies the output directory, data path, model architecture, and the DINO method. Ensure LightlyTrain is installed. ```python import lightly_train if __name__ == "__main__": lightly_train.pretrain( out="out/my_experiment", data="my_data_dir", model="torchvision/resnet18", method="dino", ) ``` -------------------------------- ### Pretrain DINOv2 and Distill to Target Model (Python) Source: https://docs.lightly.ai/train/stable/pretrain_distill/methods/distillation This Python example demonstrates a two-step process: first pretraining a ViT model with DINOv2 on custom domain data, and then using the resulting weights to distill knowledge into a target model (e.g., ResNet-18). It uses `method='dinov2'` for initial pretraining and `method='distillation'` with `teacher_weights` specified for the distillation step. This enables domain-specific adaptation and knowledge transfer. ```python import lightly_train if __name__ == "__main__": # Pretrain a DINOv2 ViT-B/14 model. lightly_train.pretrain( out="out/my_dinov2_pretrain_experiment", data="my_dinov2_pretrain_data_dir", model="dinov2/vitb14", method="dinov2", ) # Distill the pretrained DINOv2 model to a ResNet-18 student model. lightly_train.pretrain( out="out/my_distillation_pretrain_experiment", data="my_distillation_pretrain_data_dir", model="torchvision/resnet18", method="distillation", method_args={ "teacher": "dinov2/vitb14", "teacher_weights": "out/my_dinov2_pretrain_experiment/exported_models/exported_last.pt", # pretrained `dinov2/vitb14` weights } ) ``` -------------------------------- ### Install RF-DETR support for LightlyTrain Source: https://docs.lightly.ai/train/stable/_sources/pretrain_distill/models/rfdetr.md Installs the necessary packages for using RF-DETR models with LightlyTrain. It is recommended to use Python versions 3.9, 3.10, or 3.11 due to observed installation difficulties with Python 3.12. ```bash pip install "lightly-train[rfdetr]" ``` -------------------------------- ### Upgrade LightlyTrain via pip Source: https://docs.lightly.ai/train/stable/installation Upgrades an existing installation of LightlyTrain to the latest version available on PyPI. ```bash pip install --upgrade lightly-train ``` -------------------------------- ### Configure Method Arguments for Pretraining (CLI) Source: https://docs.lightly.ai/train/stable/pretrain_distill/index Allows overriding pretraining method arguments via the command line using `lightly-train pretrain`. This example specifies the teacher model for distillation. Default arguments are usually sufficient, and method-specific arguments are detailed elsewhere. ```bash lightly-train pretrain out="out/my_experiment" data="my_data_dir" model="torchvision/resnet18" method="distillation" method_args.teacher="dinov2/vitl14" ``` -------------------------------- ### Install RT-DETR Source: https://docs.lightly.ai/train/stable/_sources/pretrain_distill/models/rtdetr.md Clones the RT-DETR repository and installs its dependencies using pip. Assumes execution from the RT-DETR/rtdetrv2_pytorch directory. Requires Python 3.8-3.10 unless TensorRT support is disabled. ```bash git clone https://github.com/lyuwenyu/RT-DETR.git cd RT-DETR/rtdetrv2_pytorch pip install lightly-train -r requirements.txt ``` -------------------------------- ### Install LightlyTrain with DICOM Support Source: https://docs.lightly.ai/train/stable/_sources/data/dicom.md Installs the LightlyTrain library with optional DICOM support, which includes the pydicom dependency. This command allows for the processing of DICOM image files. ```bash pip install lightly-train[dicom] ``` -------------------------------- ### Pretrain with DINOv2 using LightlyTrain (Command Line) Source: https://docs.lightly.ai/train/stable/_sources/pretrain_distill/methods/dinov2.md This command-line interface (CLI) command allows for DINOv2 pretraining via LightlyTrain. It's a convenient way to start training directly from the terminal, specifying essential parameters like output directory, data source, model, and method. This is useful for quick experiments or when not integrating into a larger Python script. ```bash lightly-train pretrain out=out/my_experiment data=my_data_dir model="dinov2/vitb14" method="dinov2" ``` -------------------------------- ### Install RT-DETR Dependencies Source: https://docs.lightly.ai/train/stable/pretrain_distill/models/rtdetr Installs the necessary dependencies for RT-DETR using pip, including LightlyTrain. It requires a Python environment with versions >=3.8 and <=3.10, unless TensorRT support is not needed, which allows for Python 3.11 or 3.12. ```bash pip install lightly-train -r requirements.txt ``` -------------------------------- ### Install Dependencies with Pip Source: https://docs.lightly.ai/train/stable/_sources/tutorials/embedding/index.md Installs the 'lightly-train' and 'umap-learn' Python packages using pip. 'lightly-train' is used for training embedding models and generating embeddings, while 'umap-learn' is for dimensionality reduction and visualization. ```bash pip install lightly-train umap-learn ``` -------------------------------- ### Lightly CSV Embedding Format Example Source: https://docs.lightly.ai/train/stable/embed This example shows the 'lightly_csv' format for saving image embeddings. It is similar to the standard CSV format but includes a 'labels' column, which is always set to 0. This format is designed for compatibility with the Lightly Worker. ```text filenames,embedding_0,embedding_1,embedding_2,labels image1.jpg,0.1,0.2,0.3,0 image2.jpg,0.4,0.5,0.6,0 ``` -------------------------------- ### CSV Embedding Format Example Source: https://docs.lightly.ai/train/stable/embed This example illustrates the structure of a CSV file used to save image embeddings. Each row represents an image, with the first column containing the filename and subsequent columns containing the embedding values. This format is suitable for simple data processing and integration with other tools. ```text filename,embedding_0,embedding_1,embedding_2 image1.jpg,0.1,0.2,0.3 image2.jpg,0.4,0.5,0.6 ```