geo-deep-learning
geo-deep-learning copied to clipboard
[feature request] raster enhancement: add CLAHE enhancement option to AOI
Our worldview images generally have a histogram skewed toward lower values, with a low contrast. Latest tests by @valhassan show that a light enhancement with the CLAHE algorithm applied on the entire image helps improve extraction for waterbodies and forests.
Although ideally enhancement would be applied dynamically during training or inference, neither Kornia's nor Scikitlearn's CLAHE enhancement support feeding a histogram of full image to determine the enhancement applied to a single patch. If enhancement is applied only patch by patch (which would be the easiest solution), results actually degrade compared to no enhancement at all.
Suggested implementation:
- for training: use Kornia's CLAHE, applied to entire image, save copy of enhanced image to disk, then use this copy for tiling.
- for inference: IDEM, but enhanced copy is read window by window.