Image Types
Explore how to decode raw image byte data into pixel data using TensorFlow functions specific to PNG, JPEG, and generic formats. Understand the impact of channels on image representation, and learn how to select the right decoding approach for image preprocessing tasks in machine learning.
We'll cover the following...
We'll cover the following...
Chapter Goals:
- Decode raw byte data into usable pixel data
- Understand the relationship between channels and pixels
A. Decoding
We'll now decode the raw byte data into usable pixel data. The decoding function that we use depends on the format of the image. If the input is a PNG image then we use tf.io.decode_png, and if the input is a JPEG image we use tf.io.decode_jpeg. For generic decoding (i.e. decoding any image format), we use ...