Skip to content

Image

Built-in pipelines for preprocessing, agumentating and predicting.

[source]

AugmentImage

paz.pipelines.image.AugmentImage()

Augments an RGB image by randomly changing contrast, brightness saturation and hue.


[source]

PreprocessImage

paz.pipelines.image.PreprocessImage(shape, mean=(104, 117, 123))

Preprocess RGB image by resizing it to the given shape. If a mean is given it is substracted from image and it not the image gets normalized.

Arguments

  • shape: List of two Ints.
  • mean: List of three Ints indicating the per-channel mean to be subtracted.

[source]

DecoderPredictor

paz.pipelines.image.DecoderPredictor(decoder)

Pipeline for predicting decoded image from a latent vector.

Arguments

  • model: Keras model.

[source]

EncoderPredictor

paz.pipelines.image.EncoderPredictor(encoder)

Pipeline for predicting latent vector of an encoder.

Arguments

  • model: Keras model.

[source]

PreprocessImageHigherHRNet

paz.pipelines.image.PreprocessImageHigherHRNet(scaling_factor=200, input_size=512, multiple=64)

Transform the image according to the HigherHRNet model requirement. Arguments

  • scaling_factor: Int. scale factor for image dimensions.
  • input_size: Int. resize the first dimension of image to input size.
  • inverse: Boolean. Reverse the affine transform input.
  • image: Numpy array. Input image

Returns

  • image: resized and transformed image
  • center: center of the image
  • scale: scaled image dimensions