Update config doc

This commit is contained in:
Simon Alibert 2024-06-07 10:55:18 +00:00
parent faacb36271
commit b60810a8b6
2 changed files with 16 additions and 8 deletions

View File

@ -75,7 +75,7 @@ class RandomSubsetApply(Transform):
class RangeRandomSharpness(Transform): class RangeRandomSharpness(Transform):
"""Similar to RandomAdjustSharpness but with p=1 and a sharpness_factor sampled randomly """Similar to v2.RandomAdjustSharpness but with p=1 and a sharpness_factor sampled randomly
each time in [range_min, range_max]. each time in [range_min, range_max].
If the input is a :class:`torch.Tensor`, If the input is a :class:`torch.Tensor`,

View File

@ -59,14 +59,23 @@ wandb:
notes: "" notes: ""
image_transforms: image_transforms:
# brigthness, contrast, saturation and hue are instances of torchvision Colorjitter, sharpness is an instance of custom class # These transforms are all using standard torchvision.transforms.v2
enable: true # You can find out how these transformations affect images here:
# A subset of these transforms will be applied for each batch. This is the maximum size of that subset. # https://pytorch.org/vision/0.18/auto_examples/transforms/plot_transforms_illustrations.html
# We use a custom RandomSubsetApply container to sample them.
# For each transform, the following parameters are available:
# weight: This represents the multinomial probability (with no replacement)
# used for sampling the transform. If the sum of the weights is not 1,
# they will be normalized.
# min/max: Lower & upper bound respectively used for sampling the transform's parameter
# (following uniform distribution) when it's applied.
enable: false
# This is the number of transforms (sampled from these below) that will be applied to each frame.
# It's an integer in the interval [0, number of available transforms].
max_num_transforms: 3 max_num_transforms: 3
# Torchvision suggest applying the transforms in the following order : brightness, contrast, saturation, hue # By default, transforms are applied in Torchvision's suggested order (shown below).
# sharpness can be applied at any time before or after (we choose after). # Set this to True to apply them in a random order.
random_order: false random_order: false
# Randomply samples transform parameters from the range [min, max]. The weight is used to determine the relative probability of applying the transform.
brightness: brightness:
weight: 1 weight: 1
min: 0.8 min: 0.8
@ -79,7 +88,6 @@ image_transforms:
weight: 1 weight: 1
min: 0.5 min: 0.5
max: 1.5 max: 1.5
# hue is a rotation in degrees. The maximum range is [-0.5, 0.5] but we use [-0.05, 0.05] to avoid extreme unnecessary changes.
hue: hue:
weight: 1 weight: 1
min: -0.05 min: -0.05