src/wai_data_tools/preprocessing.py
def compose_transforms(transforms_config: Dict[str, Tuple[int, int]]) -> torch_trans.Compose:
    """
    Composes a sequence of transforms based on order in transforms configuration.
    :param transforms_config: Configuration for transforms
    :return: Composed transforms
    """
    transform_list = [torch_trans.ToPILImage()]
    for transform_name, transform_args in transforms_config.items():
        configured_transform = transform_translation_table[transform_name](transform_args)
        transform_list.append(configured_transform)
    transform_list.append(np.asarray)
    sequential_transforms = torch_trans.Compose(transform_list)

    return sequential_transforms

    Composes a sequence of transforms based on order in transforms configuration.
    :param transforms_config: Configuration for transforms
    :return: Composed transforms
    
Composes a sequence of transforms based on order in transforms configuration.
Composes a sequence of transforms based on order in transforms configuration .
def compose_transforms(transforms_config: Dict[str, Tuple[int, int]]) -> torch_trans.Compose:
    transform_list = [torch_trans.ToPILImage()]
    for transform_name, transform_args in transforms_config.items():
        configured_transform = transform_translation_table[transform_name](transform_args)
        transform_list.append(configured_transform)
    transform_list.append(np.asarray)
    sequential_transforms = torch_trans.Compose(transform_list)
    return sequential_transforms
def compose_transforms ( transforms_config : Dict [ str , Tuple [ int , int ] ] ) -> torch_trans . Compose : transform_list = [ torch_trans . ToPILImage ( ) ] for transform_name , transform_args in transforms_config . items ( ) : configured_transform = transform_translation_table [ transform_name ] ( transform_args ) transform_list . append ( configured_transform ) transform_list . append ( np . asarray ) sequential_transforms = torch_trans . Compose ( transform_list ) return sequential_transforms
Composes a sequence of transforms based on order in transforms configuration.
Composes a sequence of transforms based on order in transforms configuration .
"""
    Composes a sequence of transforms based on order in transforms configuration.
    :param transforms_config: Configuration for transforms
    :return: Composed transforms
    """
None
transforms_config
Dict[str, Tuple[int, int]]
Configuration for transforms
Configuration for transforms