Skip to content
heliaEDGE
Reference
HELIA

resizing

Deterministic resizing; explicit target interpolation and discrete masks.

Machine-readable model

  • Resizing1DclassResize signals with bicubic interpolation during training and inference.
  • Resizing2DclassResize images and aligned data during training and inference.
class

Resize signals with bicubic interpolation during training and inference.

helia_edge/layers/preprocessing/resizing.py:54

Resizing1D(duration: int, target_interpolation: str | None = None, **kwargs={})

Resize signals with bicubic interpolation during training and inference.

Selected masks use nearest-neighbor indices and retain their dtype. Selected targets require an explicit interpolation policy.

Base class: BaseAugmentation1D.

Inherited from BaseAugmentation: augment_sample(), batch_augment(), call(), get_random_transformations().

Parameters of Resizing1D
NameTypeDefaultDescription
durationintRequiredPositive output length in samples.
target_interpolationstr | NoneNone"nearest" preserves discrete target values; "signal" uses the signal interpolation and compute dtype. None rejects resizing selected aligned targets.
**kwargsAny{}Base augmentation options, including data_format, aligned_targets and aligned_masks.
Errors raised by Resizing1D
TypeDescription
ValueErrorAn output dimension is nonpositive, the target policy is invalid, or selected targets have no interpolation policy.
class

Resize images and aligned data during training and inference.

helia_edge/layers/preprocessing/resizing.py:97

Resizing2D(
height: int,
width: int,
interpolation: str = 'bicubic',
target_interpolation: str | None = None,
**kwargs={},
)

Resize images and aligned data during training and inference.

Selected masks use nearest-neighbor indices and retain their dtype. Selected targets require an explicit interpolation policy.

Base class: BaseAugmentation2D.

Inherited from BaseAugmentation: augment_sample(), batch_augment(), call(), get_random_transformations().

Parameters of Resizing2D
NameTypeDefaultDescription
heightintRequiredPositive output height in pixels.
widthintRequiredPositive output width in pixels.
interpolationstr'bicubic'Signal interpolation method accepted by Keras image.resize.
target_interpolationstr | NoneNone"nearest" preserves discrete target values; "signal" uses the signal interpolation and compute dtype. None rejects resizing selected aligned targets.
**kwargsAny{}Base augmentation options, including data_format, aligned_targets and aligned_masks.
Errors raised by Resizing2D
TypeDescription
ValueErrorAn output dimension is nonpositive, the target policy is invalid, or selected targets have no interpolation policy.