mindformers.models.vit.ViTImageProcessor

class mindformers.models.vit.ViTImageProcessor(size=224)[源代码]

ViTImageProcessor.

参数

image_resolution (int) – the target size.

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

Preprocess required by base processor.

参数

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

返回

A 4-rank tensor for a batch of images.