Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion docs/source/semantic_segmentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ The following mask formats are supported:

- png

### Supported Mask Dataset Format
### Specify Mask Filepaths

We support two ways of specifying the mask filepaths in relation to the image filepaths:

Expand Down Expand Up @@ -659,6 +659,20 @@ transform_args={
}
```

### Train with Multi-channel Images

By default, images are loaded as RGB images. LightlyTrain EoMT also supports 4-channel images, which can be specified in `transform_args`:

```
transform_args={
"num_channels": 4
}
```

In this case, you may also want to customize the normalization parameters in `transform_args` to fit your dataset. Otherwise, LightlyTrain will simply repeat the mean and std values of the RGB channels for the extra channels.

You can also randomly drop channels during training for data augmentation with certain probability with the `ChannelDrop` augmentation. See [here](#method-transform-args-channel-drop) for more details.

## Exporting a Checkpoint to ONNX

[Open Neural Network Exchange (ONNX)](https://en.wikipedia.org/wiki/Open_Neural_Network_Exchange) is a standard format
Expand Down
20 changes: 20 additions & 0 deletions docs/source/train/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,26 @@ See {ref}`method-transform-args` on how to configure image transformations.

(method-args)=

### Train with Multi-channel Images

By default, images are loaded as RGB images. Beyond that, LightlyTrain pretraining and distillation also supports 4-channel images, which can be specified in `transform_args`:

```
transform_args={
"num_channels": 4
}
```

In this case, you may also want to customize the normalization parameters in `transform_args` to fit your dataset. Otherwise, LightlyTrain will simply repeat the mean and std values of the RGB channels for the extra channels.

Currently supported models:

| Library | Supported Models | Docs |
|---------|------------------|------|
| TIMM | All models | [🔗](#models-timm) |
| LightlyTrain | DINOv2 | |
| LightlyTrain | DINOv3 | |

### Method Arguments

```{warning}
Expand Down
2 changes: 2 additions & 0 deletions docs/source/train/method_transform_args.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ Interested in the default augmentation settings for each method? Check the metho

The following arguments are available for all methods.

(method-transform-args-channel-drop)=

### Channel Drop

Randomly drops channels from the image. Can be disabled by setting to `None`.
Expand Down