Skip to content

Transforms Interface (core.transforms_interface)

BasicTransform

add_targets(self, additional_targets)

Add targets to transform them the same way as one of existing targets ex: {'target_image': 'image'} ex: {'obj1_mask': 'mask', 'obj2_mask': 'mask'} by the way you must have at least one object with key 'image'

!!! args
    additional_targets (dict): keys - new target name, values - old target name. ex: {'image2': 'image'}

DualTransform

Transform for segmentation task.

ImageOnlyTransform

Transform applied to image only.

NoOp

Does nothing

to_tuple(param, low=None, bias=None)

Convert input argument to min-max tuple

Parameters:

Name Type Description Default
param scalar, tuple or list of 2+ elements

Input value. If value is scalar, return value would be (offset - value, offset + value). If value is tuple, return value would be value + offset (broadcasted).

required
low

Second element of tuple can be passed as optional argument

None
bias

An offset factor added to each element

None