dict_transforms

Description

Transformations on dict annotations containing scalars and masks.

The annotations that can be processed are supposed to be a dict with string keys and values of floats or numpy.ndarray (binary) masks.

Classes

DictTransform

Basic transformation for dicts.

DropAnn

Drop the annotation with given key from the annotations dict.

FlattenDict

Return the value of the annotations dict at selected key.

OnValues

Perform a transformation on all values of a dict.

RestrictDict

Restrict the annotation dictionary to the annotation items with featuring one of the selected keys.

SameSizeTensorValues

Up- or down-scale the tensor mask values of a dictionary to all have the same size.