IKH

CXR Data Preprocessing – Normalisation

The next step in our preprocessing is normalisation. In this case, we will have to slightly modify the normalisation technique (rather than just dividing by 255). Let’s see why.

What did we do differently here as compared to the flowers dataset?

  1. Since the CXR images are not ”natural images”, we do not use the ”divide by 255” strategy. Instead, we take the max-min approach to normalisation. Since you do not know for sure that the range of each pixel is o-255, you normalise using the min-max values.
  2. In the conditional statement ‘if mode == train’, use a random number generator so that only a fraction of the images get transformed (rather than all of them).

Coming Up

In the upcoming pages, we’ll build the models that do the prediction on new CXR images.

Report an error