Skip to content

semipy.datasets.utils.build_transforms

Warning

This section is in construction.

    semipy.datasets.utils.build_transforms(config_transforms: List[Dict[str, Any]]) -> torchvision.transforms.Compose

This function builds a composition of transformations from a list of transforms configurations. It allows to add in this composition either transformations from torchvision or custom transformations. Thoses custom transformations need to be added in the semipy/transforms directory of SemiPy.

Parameters

  • config_transforms (list[dict[str, Any]]) - List of transformations. Each transformation is a dictionary with first key corresponding to the name of the transformation, and a second key with the corresponding parameters of this transformation.