- paddle.vision.ops. decode_jpeg ( x, mode='unchanged', name=None )
Decodes a JPEG image into a 3 dimensional RGB Tensor or 1 dimensional Gray Tensor. Optionally converts the image to the desired format. The values of the output tensor are uint8 between 0 and 255.
x (Tensor) – A one dimensional uint8 tensor containing the raw bytes of the JPEG image.
mode (str) – The read mode used for optionally converting the image. Default: ‘unchanged’.
name (str, optional) – The default value is None. Normally there is no need for user to set this property. For more information, please refer to Name.
A decoded image tensor with shape (imge_channels, image_height, image_width)
- Return type