semipy.datasets.utils.build_augmentations
Warning
This section is in construction.
semipy.datasets.utils.build_augmentations(dset_name: str,
path: Optional[str] = None,
transforms: Dict = None,
use_strong_augmentation: bool = True) -> Tuple[torchvision.transforms.Compose, torchvision.transforms.Compose]
This functions reads the TRANSFORMS
part from DATA
in the configuration file in order to create two compositions of transformations (usually a weak and a strong one). If nothing is specified in this part of the configuration file, a list of default transformations will be used.
Parameters
- dset_name (str) - Name of the used dataset. Use 'CUSTOM' for a custom one.
- path (optional, str) - Path to a YAML file containing a list of transformations. If None, the default augmentations.yaml file will be used. Default:
None
- transforms (dict) - Dictionary containing both 'WEAK' and 'STRONG' lists of transformations. Default:
None
- use_strong_augmentation (bool) - Toggle the usage of the second list of transformations (usually the strong augmentation). Default:
True