sentinel2-cloud-detector
sentinel2-cloud-detector copied to clipboard
return float32 instead of float64
The get_cloud_probability_maps method returns float64 dtype, which might not be necessary. Casting float32 is suggested.
It seems that LightGBM classifier can only produce results in float64. The package then only transforms the shape of that array and provides data to users. Casting to float32 would mean that still the same amount of memory would be used for classification but then we would delete a few probably unimportant decimal places. Perhaps the only performance gain happens in the step where we transform probabilities into masks.
Probabilities now get cast to float32. As pointed out, this does not reduce memory consumption during evaluation, but will reduce footprint for users that do something with the data going forward.