Skip to content

Commit

Permalink
#239 rebrand coastseg as a toolkit because it not an API in the softw…
Browse files Browse the repository at this point in the history
…are engineering terminology
  • Loading branch information
2320sharon committed Mar 27, 2024
1 parent 1bafcb6 commit 1785795
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions paper/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ This draft manuscript is distributed solely for purposes of courtesy review and

# Summary

`CoastSeg` is an interactive browser-based program that aims to broaden the adoption of satellite-derived shoreline (SDS) detection and coastal landcover mapping workflows among coastal scientists and coastal resource management practitioners. SDS is a sub-field of coastal sciences that aims to detect and post-process a time-series of shoreline locations from publicly available satellite imagery [@turner2021satellite; @vitousek2023future]. `CoastSeg` is a python package installed via pip into a `conda` environment that serves as an API for building custom SDS workflows. `CoastSeg` also provides full SDS workflow implementations via Jupyter notebooks and python scripts that call functions and classes in the core `CoastSeg` API for specific workflows. Two fully functioning SDS workflows are already provided, and more could be added by collaborators in the SDS software community. All API codes, notebooks, scripts, and documentation are hosted on the `CoastSeg` GitHub repository.
`CoastSeg` is an interactive browser-based program that aims to broaden the adoption of satellite-derived shoreline (SDS) detection and coastal landcover mapping workflows among coastal scientists and coastal resource management practitioners. SDS is a sub-field of coastal sciences that aims to detect and post-process a time-series of shoreline locations from publicly available satellite imagery [@turner2021satellite; @vitousek2023future]. `CoastSeg` is a python package installed via pip into a `conda` environment that serves as an toolkit for building custom SDS workflows. `CoastSeg` also provides full SDS workflow implementations via Jupyter notebooks and python scripts that call functions and classes in the core `CoastSeg` toolkit for specific workflows. Two fully functioning SDS workflows are already provided, and more could be added by collaborators in the SDS software community. All the codes, notebooks, scripts, and documentation are hosted on the `CoastSeg` GitHub repository.

So-called `instantaneous' SDS workflows, where shorelines are extracted from each individual satellite image rather than temporal composites [@bishop2021mapping], follow a basic recipe, namely 1) waterline estimation, where the 2D (x,y) location of the land-sea interface is determined, and 2) water-level correction, where the waterline location is mapped onto a shore-perpendicular transect, converted to a linear distance along that transect, then corrected for water level, and referenced to a particular elevation contour on the beach [@vos2019coastsat]. The resulting measurement is called a 'shoreline', and is an elevation-based measurement. Water level corrections typically only account for tide [@vos2019coastsat] but recently SDS workflows have incorporated both wave setup and runup correction, which are a function of the instantaneous wave field at the time of image acquisition [@konstantinou2023satellite; @vitousek2023future; @vitousek2023model,@castelle2021satellite].

`CoastSeg` has three broad aims. The first is to be an API consisting of core SDS workflow functionalities such as file input/output, image downloading, geospatial conversion, tidal model API handling, mapping 2D shorelines to 1D transect-based measurements, and numerous other workflows common to a basic SDS workflow, regardless of a particular waterline estimation workflow. This waterline detection algorithm will be crucial to the success of any SDS workflow because it is the step that identifies the the boundary between sea and land which serves as the basis for shoreline mapping. The idea behind the API design of `CoastSeg` is that users could extend or customize functionality using scripts and notebooks.
`CoastSeg` has three broad aims. The first is to be an toolkit consisting functions that operate the core SDS workflow functionalities such as file input/output, image downloading, geospatial conversion, tidal model API handling, mapping 2D shorelines to 1D transect-based measurements, and numerous other workflows common to a basic SDS workflow, regardless of a particular waterline estimation workflow. This waterline detection algorithm will be crucial to the success of any SDS workflow because it is the step that identifies the the boundary between sea and land which serves as the basis for shoreline mapping. The idea behind the design of `CoastSeg` is that users could extend or customize functionality using scripts and notebooks.

The second aim of `CoastSeg` is therefore to provide fully functioning SDS implementations in an accessible browser notebook format. Our principal objective to date has been to re-implement and improve upon a popular existing toolbox, `CoastSat` [@vos2019coastsat], allowing the user to carry out the well-established `CoastSat` SDS workflow with a well-supported literature [@castelle2021satellite; @castelle2022primary; @vos2023pacific; @vos2023benchmarking; @warrick2023large; @konstantinou2023satellite; @vitousek2023model; @mclean202350; @vandenhove2024secular], but in a more accessible and convenient way within the `CoastSeg` platform. In order to achieve this, we developed `CoastSat-package` [@voscoastsat], a python package that is installed into the `CoastSeg` `conda` environment. `CoastSat-package` contains re-implemented versions of the original CoastSat codes, addresses the lack of pip or conda installability of CoastSat, and isolates the CoastSeg-specific enhancements from the original `CoastSat` code. The `CoastSeg` re-implementation of the `CoastSat` workflow is end-to-end within a single notebook. That notebook allows the user to, among other tasks: a) define a region of interest on a webmap and upload geospatial vector format files; b) define, download and post-process satellite imagery; c) identify waterlines in that imagery using the `CoastSat` method [@vos2019coastsat]; d) correct those waterlines to elevation-based shorelines using tidal elevation-datum corrections provided through interaction with the pyTMD [@alley2017pytmd] API; and e) download output files in a variety of modern geospatial and other formats for subsequent analysis.

Expand Down Expand Up @@ -118,13 +118,13 @@ Tidal correction (Figure 1) of shorelines involves estimating the tide height fo

# Implementation of an Alternative Deep-Learning-Based SDS Workflow

As we noted above, we have developed a notebook that carries out an alternative SDS workflow based on a deep-learning based semantic segmentation model. To implement this custom workflow, we created a new Jupyter notebook, and added source code to the `CoastSeg` API. The changes ensured that the inputs and outputs were those expected by the `CoastSeg` core API. We call this alternative workflow the `Zoo` workflow, in reference to the fact that the deep learning models implemented originate from the `Segmentation Zoo` GitHub repository, and result from the `Segmentation Gym` deep-learning based image segmentation model training package [@buscombe2022reproducible]. The name `Zoo' has become a standard for online trained ML models [@modelzoo; @modelzoo2], and the repository contains both SDS models and others. Figure 2 describes in detail how the two workflows differ. The SDS workflow adopted for waterline detection will be the subject of a future manuscript.
As we noted above, we have developed a notebook that carries out an alternative SDS workflow based on a deep-learning based semantic segmentation model. To implement this custom workflow, we created a new Jupyter notebook, and added source code to the `CoastSeg`codebase. The changes ensured that the inputs and outputs were those expected by core functions in `CoastSeg` toolkit. We call this alternative workflow the `Zoo` workflow, in reference to the fact that the deep learning models implemented originate from the `Segmentation Zoo` GitHub repository, and result from the `Segmentation Gym` deep-learning based image segmentation model training package [@buscombe2022reproducible]. The name `Zoo' has become a standard for online trained ML models [@modelzoo; @modelzoo2], and the repository contains both SDS models and others. Figure 2 describes in detail how the two workflows differ. The optimal SDS workflow adopted for waterline detection, as determined against field validation data, will be the subject of a future manuscript.

<!-- --------------------------------------- -->

# Project Roadmap

We intend `CoastSeg` to be a collaborative research project and encourage contributions from the SDS community. As well as implementing alternative SDS waterline detection workflows, other improvements that could continue to be made include more (or more refined) outlier detection methods, image filtering procedures, and other basic image pre- or post-processing routines, especially image restoration on degraded imagery [@vitousek2023future]. Such additions would all be possible without major changes to the existing `CoastSeg` API.
We intend `CoastSeg` to be a collaborative research project and encourage contributions from the SDS community. As well as implementing alternative SDS waterline detection workflows, other improvements that could continue to be made include more (or more refined) outlier detection methods, image filtering procedures, and other basic image pre- or post-processing routines, especially image restoration on degraded imagery [@vitousek2023future]. Such additions would all be possible without major changes to the existing `CoastSeg` toolkit.

Integration of new models for the deep-learning workflow are planned, based on non-dimensionalized water index (NDWI) and modified non-dimensionalized water index (MNDWI) spectral indices, as is a new `CoastSeg` toolbox extension for daily 3-m Planetscope imagery [@doherty2022python] from Planet Labs [@planet]. Docker may be adopted in the future for managing dependencies in the `conda` virtual environment required to run the program. Other sources of imagery and other spectral indices may have value in SDS workflows, and we encourage SDS users to contribute their advances through a `CoastSeg` Jupyter notebook implementation.

Expand Down

0 comments on commit 1785795

Please sign in to comment.