The CoastSeg Zoo Workflow¶
This workflow can be found in the 'SDS_zoo_classifier.ipynb' notebook.
The models available in this workflow come from segmentation zoo and were trained using segmentation gym.
These models have not been thoroughly tested yet, but we are currently undergoing the process of benchmarking these models in a variety of coastal environments. We will be documenting the results of this benchmark in a separate repository and we will link it here when its ready.
Anyone is encouraged to contribute models. Please visit Segmentation Zoo, our repository of models and open a new Discussion topic and let us know about your model. We will accept models that use any conceivable spectral index, or any combination of bands. However, our team prefers our models to apply equally to all Landsat and Sentinel imagery, so ideally models are trained on those data, not some other data source.
Installation Instructions¶
You'll need to follow the optional set of installation instructions to install the dependencies tensorflow
and transformers
into the coastseg
environment in order to run the models.
Warning: The zoo workflow does not support Mac currently due to tensorflow and Mac having numerous compatibility issues. If you would like to help our team support Mac please submit an issue.
Install Additional Dependencies
- Only install these dependencies if you plan to use CoastSeg's Zoo workflow notebook.
- Warning installing tensorflow will not work correctly on Mac see for more details Mac install guide
1 2 |
|
Model-Compatible Spectral Indices¶
The models currently available with CoastSeg can use the following spectral indices. We welcome contribution for models that use different spectral indices, or any combination of bands. However, our team prefers our models to apply equally to all Landsat and Sentinel imagery, so ideally models are trained on those data, not some other data source.
1.Red Green Blue (RGB)
- These files are generated by default.
2.Normalized Difference Water Index (NDWI)
NDWI = (Green - NIR) / (Green + NIR)
- Uses the green and NIR bands to enhance the appearance of open water features.
- Read more here
3.Modified Normalized Difference Water Index (MNDWI)
MNDWI = (Green - SWIR) / (Green + SWIR)
- Uses green and SWIR bands to enhance open water features and diminish built-up area features that often correlate with open water in other indices.
- Reduces vegetation effects better than NDWI and is more suitable for enhancing and extracting water information in regions with a background dominated by built-up land areas.
- Read more here
Available Models¶
The following image segmentation models are available in CoastSeg to use on downloaded satellite imagery.
To use each model we first download the model weights from the model's Zenodo release and then initialize the model using these weights.
Each model has a Zenodo release which contains the model weights, metadata about the model as well as model validation statistics. Such validation statistics are an indication of model performance for a 4-class image segmentation, but these statistics don't necessarily reflect skill in shoreline detection accuracy and precision.
RGB¶
Recomended Model
1. segformer_RGB_4class_8190958
: a segformer model that takes RGB imagery and applies a 4 class segmentation model
Classes
- 0: water
- 1: whitewater,
- 2: sediment,
- 3: other
2. sat_RGB_4class_6950472
: a resunet model that takes RGB imagery and applies a 4 class segmentation model
Classes
- 0: water
- 1: whitewater,
- 2: sediment,
- 3: other
NDWI¶
1. segformer_NDWI_4class_8213427
: a segformer model that takes NDWI imagery and applies a 4 class segmentation model
Classes
- 0: water
- 1: whitewater,
- 2: sediment,
- 3: other
MNDWI¶
1.segformer_MNDWI_4class_8213443
: a segformer model that takes MNDWI imagery and applies a 4 class segmentation model
-
If you have a study site that you used with the CoastSat classifer that you want to compare the zoo method to use this MNDWI model because the CoastSat method uses the MNDWI threshold to determine the land water interface.
Classes
- 0: water
- 1: whitewater,
- 2: sediment,
- 3: other