mindformers.models.swin.SwinImageProcessor

class mindformers.models.swin.SwinImageProcessor(size=224)[源代码]

SwinImageProcessor.

Args:

image_resolution (int): the target size.

preprocess(images, **kwargs)[源代码]

Preprocess required by base processor.

Args:

images (tensor, PIL.Image, numpy.array, list): a batch of images.

Return:

A 4-rank tensor for a batch of images.