Attention: This MediaPipe Solutions Preview is an early release. Learn more.

mediapipe_model_maker.image_classifier.image_classifier.image_preprocessing.preprocess_for_train

Stay organized with collections Save and categorize content based on your preferences.

Preprocesses the given image for evaluation.

image 4-D Tensor of shape [batch, height, width, channels] or 3-D Tensor of shape [height, width, channels].
image_size image size.
resize_method resize method. If none, use bicubic.

A preprocessed image Tensor.