-
Notifications
You must be signed in to change notification settings - Fork 90
Description
Using mean and standard deviation normalization is a common procedure in standard Computer Vision, and can be applied e.g. by using torchvision's Normalize function. But this normalization can lead to incorrect band ratios when applied to optical remote sensing images.
E.g. let's take the formula for Normalized Difference Vegetation Index (NDVI):
If say, we have a un-normalized Sentinel-2 pixel with Band 8 (NIR): 3327, and Band 4 (Red): 426, then the NDVI value would be:
However, if we apply a per-band mean/std normalization scheme, the value becomes:
Clearly this is wrong, since we've removed the NDVI signal! A model trained on these mean/std normalized pixel values would have a harder time capturing the semantics of band indices such as NDVI.
One possible solution, is that instead of applying a per-band normalization, we can convert the Sentinel-2 Digital Number (DN) values to surface reflectance by dividing with the dynamic range of the band to a value between 0-1. Sentinel-2's MSI sensor is 12-bit, but the data is stored as 16-bit. Usually people use 10000, but this doesn't work for very bright white areas, so I'll use
which matches with the actual NDVI value.
Notes:
- Calculating the actual surface reflectance is a little more complicated than the above for the Sentinel-2 L2A product since we also need to apply an offset (see https://sentinel.esa.int/web/sentinel/technical-guides/sentinel-2-msi/level-2a-algorithms-products), but the main point is - don't use mean/std normalization!
- The SCL band should be divided by a different value compared to the other optical bands (B02-B12).
Side note: Using a single mean and standard deviation value for all Sentinel-2 bands won't preserve the band ratios either. E.g. if we use a mean value of 1351 and standard deviation of 1071, and apply it to the NIR/Red bands
The 2.76 result is still not the correct NDVI value of 0.77.
References: