osc.data.tfrecords.deserialize_image

deserialize_image(example: bytes, *, img_size: Tuple[int, int]) tensorflow.python.framework.ops.Tensor[source]

Deserialize an image as read from a TFRecord.

Parameters
  • example (bytes) – byte serialization of the image

  • img_size (Tuple[int, int]) – expected shape of the image (H, W)

Return type

Tensor

Returns

A uint8 tensor of shape [H W 3]