I am working on my specific data augmentation function to train a CNN in TensorFlow 2.0. The image data I'm using are stored in a numpy
multidimensional RGB array; all its pixel values are floats in the [0, 1] range.
While playing with function tensorflow.image.random_brightness
(documentation) I found that its pixel values are shifted outside of the [0, 1] range (etiher above or below). When I try to visualise them using matplotlib.pyplot.imshow()
I get the following message:
Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
I also found that when I try to re-normalize the data in that range, the image comes back to its original look (making the whole process useless).
Are pixel values outside of the [0, 1] range a problem for CNN training? And if this represents a problem, what can I do to have pixel values in the correct range, without giving up adjusting brightness?