-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Additional thresholding outputs for zoo workflow #285
Comments
This was the toy script i was experimenting with. I am going to put together an averaging function on the shorelines for getting uncertainty bands. |
This looks interesting for sure. So for the zoo workflow we would save these new shorelines in addition to the shorelines we save currently correct? Thank you for including the functions in this issue as well as linking your script with the example at the bottom Excerpt from https://github.com/Doodleverse/SDStools/blob/main/src/sdstools/thresholding.py
|
It might be better just as a function from SDSTools than as an output from coastseg right now, my thought is just to have a function like this: https://github.com/Doodleverse/SDStools/blob/main/src/sdstools/uncertainty_bands.py |
In this case, you'd have all of your outputs from coastseg (tidally_corrected_transect_time_series_merged.csv) and then just make a list of these and merge them to get the mean and conf interval outputs. |
the thresholding techniques could probably just be two additional zoo models. otsu(nir) and otsu(swir). |
Separate script in sds tools for sure while we research best implementation. That could take a while. Loads of potential pathways. As for mean + confidence interval, that is one approach. Another would be ransac or similar. Robust methods. |
Was playing around with different Otsu thresholding outputs and am thinking we should have a few of these computed in the zoo workflow in addition to the deep learning model outputs. See little sample code below:
`
def compute_otsu_threshold(in_tiff, out_tiff):
"""
Otsu binary thresholding on a geotiff.
inputs:
in_tiff (str): path to the input geotiff
out_tiff (str): path to the output geotiff
outputs:
out_tiff (str): path to the output geotiff
"""
def rescale(arr):
arr_min = arr.min()
arr_max = arr.max()
return (arr - arr_min) / (arr_max - arr_min)
`
Basically, we could have zoo always output the NIR and SWIR Otsu threshold as a fallback/comparison method. So we could get at uncertainty bands as the average of the deep learning output, NIR Otsu, and SWIR Otsu.
The text was updated successfully, but these errors were encountered: