Working with real-world images
Real-world images pose a different type of challenge as these images are usually colored images with three color channels (red, green, and blue), unlike the grayscale images we used from our fashion MNIST dataset. In Figure 7.16, where we see an example of real-world images from the weather dataset that we will be modeling shortly, you will notice the images are of varying sizes. This introduces another layer of complexity that requires additional preprocessing steps such as resizing or cropping to ensure all our images are of uniform dimensions before we feed them into our neural network.
Figure 7.16 – Images from the weather dataset
Another issue we may encounter when working with real-world images is the presence of various noise sources. For example, we may have images in our dataset taken in conditions with uneven lighting or unintended blurring. Again, we could have images with multiple objects or other unintended...