kaishi.image.transforms.limit_dimensions
¶
Class definition for limiting the max dimension of each image in an image dataset.
Module Contents¶
-
class
kaishi.image.transforms.limit_dimensions.
TransformLimitDimensions
¶ Bases:
kaishi.core.pipeline_component.PipelineComponent
Transform to limit max dimension of each image in a dataset.
-
__call__
(self, dataset)¶ Perform operation on a specified dataset.
- Parameters
dataset (
kaishi.image.dataset.ImageDatset
) – image dataset to perform operation on
-
configure
(self, max_dimension=None, max_width=None, max_height=None)¶ Configure the component. Any combination of these parameters can be defined or not, where smallest specified max value in each case is the assumed value (e.g. if max_width is 300 but max_dimension is 200, the maximum width is effectively 200).
- Parameters
max_dimension (int) – maximum dimension for each image (either width or height)
max_width (int) – maximum width for each image
max_height (int) – maximum height for each image
-