View source on GitHub |
Preprocesses the given image for evaluation.
mediapipe_model_maker.face_stylizer.face_stylizer.image_preprocessing.preprocess_for_eval(
image: tf.Tensor,
image_size: int = IMAGE_SIZE,
resize_method: str = tf.image.ResizeMethod.BILINEAR
) -> tf.Tensor
Args | |
---|---|
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
|
if None, use bicubic. |
Returns | |
---|---|
A preprocessed image Tensor .
|