Pad#
- class deeptrack.augmentations.Pad(px: int | Callable[[...], int] = (0, 0, 0, 0), mode: str | Callable[[...], str] = 'constant', cval: float | Callable[[...], float] = 0, **kwargs)#
Bases:
Augmentation
Pads the image.
Arguments match this of numpy.pad, save for pad_width, which is called px, and is defined as (left, right, up, down, before_axis_3, after_axis_3, …)
Parameters#
- pxint or list of int
amount to pad in each direction
Methods Summary
get
(image, px, **kwargs)Transform an image [abstract method].
Methods Documentation
- get(image, px, **kwargs)#
Transform an image [abstract method].
Abstract method that defines how the feature transforms the input. The current value of all properties will be passed as keyword arguments.
Parameters#
- image‘Image’ or List[‘Image’]
The Image or list of images to transform.
- **kwargsDict[str, Any]
The current value of all properties in properties as well as any global arguments.
Returns#
- ‘Image’ or List[‘Image’]
The transformed image or list of images.
Raises#
- NotImplementedError
Must be overridden by subclasses.