Possibly serious issue with tf.image.per_image_standarization

I came across this issue in my own projects, and found the
linked here
on the TensorFlow github, but I feel like it isn’t
getting much traction for the potential severity of the

Basically there was a non-release push to TF between 1.14 and
1.15 that broke some functionality for the
tf.image.per_image_standarization routine when used on unsigned
integer inputs. The majority of information content in images ends
up getting lost because of the naïve type conversions done in
per_image_standardization after 1.14. This isn’t addressed in
documentation, and is pretty clearly a major change in behavior
befitting a major release, but was introduced before a major
release, likely pointing to an untested edge case.

I’m concerned that the issue isn’t getting much traction but
could potentially impact labs all over the place. The simple
solution is to convert your unsigned int images to float before
calling per_image_standardization, but that isn’t obvious from any
of the documentation, and used to be handled naturally by the


Edit: formatting.

submitted by /u/DrSparkle713

[visit reddit]


Leave a Reply

Your email address will not be published. Required fields are marked *