microsoft/seismic-deeplearning

image normalization should be wrt the volume image - facilitates correctly displayed image colormap range

fazamani opened this issue · 2 comments

The way we normalize the image before saving to disk,

image

is relative to each image, which causes the following

image

labels are changing, but images are "mapped" to the same color! This might be only relevant to data, in which all pixel values in each segmented image are taking two unique values, but overall in the volume we have more unique values for the pixels.

Hence, the normalization should be wrt a global range in the volume of data.

Also, this issue should address the problem where the normalized image is a constant image resulting in diving by zero, and saving NaNs to disk. We should:

  • Only use the dataset min and max to normalize
  • Assert that the min and max are not equal, otherwise we would divide by zero

also addressed within this issue is the following:
mask/label in the function below should be normalized wrt n_classes:

image