class dragon.vm.dali.ops.Resize[source]

Resize the image.


# Resize to a fixed area
resize1 = dali.ops.Resize(resize_x=300, resize_y=300)

# Resize along the shorter side
resize2 = dali.ops.Resize(resize_shorter=600, max_size=1000)

# Resize along the longer side
resize3 = dali.ops.Resize(resize_longer=512)


static Resize.__new__(

Create a Resize operator.

  • resize_x (int, optional) – The output image width.
  • resize_y (int, optional) – The output image height.
  • resize_shorter (int, optional) – Resize along the shorter side and limited by max_size.
  • resize_longer (int, optional) – Resize along the longer side.
  • max_size (int, optional, default=0) – The limited size for resize_shorter.
  • interp_type ({'NN', 'LINEAR', 'TRIANGULAR', 'CUBIC', 'GAUSSIAN', 'LANCZOS3'}, optional) – The interpolation method.