scale_images

menpofit.builder.scale_images(images, scale, prefix='', return_transforms=False, verbose=False)[source]

Function that rescales a list of images and optionally returns the scale transforms.

Parameters
  • images (list of menpo.image.Image) – The set of images to scale.

  • scale (float or tuple of floats) – The scale factor. If a tuple, the scale to apply to each dimension. If a single float, the scale will be applied uniformly across each dimension.

  • prefix (str, optional) – The prefix of the printed information.

  • return_transforms (bool, optional) – If True, then a list with the menpo.transform.Scale objects that were used to perform the rescale for each image is also returned.

  • verbose (bool, optional) – Flag that controls information and progress printing.

Returns

  • scaled_images (list of menpo.image.Image) – The list of rescaled images.

  • scale_transforms (list of menpo.transform.Scale) – The list of scale transforms that were used. It is returned only if return_transforms is True.