Pad#

class Pad(size=0, value=0, mask_value=0, *, order=None)[source]#

Pad the input data.

Parameters:
  • size – padding size of input image, it could be integer or sequence. If it is an integer, the input image will be padded in four directions. If it is a sequence containing two integers, the bottom and right side of image will be padded. If it is a sequence containing four integers, the top, bottom, left, right side of image will be padded with given size.

  • value – padding value of image, could be a sequence of int or float. if it is float value, the dtype of image will be casted to float32 also.

  • mask_value – padding value of segmentation map.

  • order – the same with VisionTransform.