| | --- |
| | license: cc-by-4.0 |
| | tags: |
| | - semantic-segmentation |
| | - sentinel-2 |
| | - kelp-mapping |
| | - pytorch |
| | - skema |
| | --- |
| | |
| | # SKeMa: Satellite-based Kelp Mapping |
| |
|
| | ## Model Description |
| |
|
| | SKeMa is a Python-based tool for semantic segmentation of kelp in Sentinel-2 satellite imagery, developed for coastal monitoring. It uses a deep learning model from the Segmentation Models PyTorch library, with a MaxViT-Tiny-512 encoder and UNet decoder. The model outputs a binary GeoTIFF (kelp = 1, non-kelp = 0). |
| |
|
| | **Authors**: Mohsen Ghanbari, Neil Ernst, Taylor A. Denouden, Luba Y. Reshitnyk, Piper Steffen, Alena Wachmann, Alejandra Mora-Sotoa, Eduardo Loos, Margot Hessing-Lewis, Nic Dedeluke, Maycira Costa |
| | **License**: Creative Commons Attribution 4.0 International (CC-BY-4.0) |
| | **Citation**: SKeMa models by Mohsen Ghanbari et al., SPECTRAL Remote Sensing Laboratory, University of Victoria, DOI: [10.57967/hf/6790](https://huggingface.co/m5ghanba/SKeMa) |
| | **GitHub**: [m5ghanba/skema](https://github.com/m5ghanba/skema) |
| | **PyPI**: [skema-kelp](https://pypi.org/project/skema-kelp/) |
| |
|
| | ## Intended Use |
| |
|
| | - **Primary Use**: Mapping kelp in Sentinel-2 imagery for environmental research and industry applications. |
| | - **Users**: Researchers, coastal ecologists, and industries analyzing Sentinel-2 data. |
| | - **Out of Scope**: Non-Sentinel-2 imagery or non-kelp segmentation tasks. |
| |
|
| | ## Model Architecture |
| |
|
| | - **Framework**: PyTorch, Segmentation Models PyTorch (SMP) library. |
| | - **Encoder**: MaxViT-Tiny-512. |
| | - **Decoder**: UNet. |
| | - **Input Channels**: 12 (Sentinel-2 bands B2, B3, B4, B8, B5; substrate; bathymetry; slope; spectral indices with the order NDVI; NDWI; GNDVI; ClI; NDVIRE). |
| | - **Model Types**: |
| | - `model_full`: Uses all 13 channels, including substrate, bathymetry, and slope (optimized for BC coast). |
| | - `model_s2bandsandindices_only`: Uses Sentinel-2 bands and indices only (no bathymetry/substrate/slope). |
| |
|
| | ## Input Data |
| |
|
| | - **Required**: Sentinel-2 `.SAFE` folder (download from [Copernicus Browser](https://dataspace.copernicus.eu/)). |
| | - **For `model_full`**: Bathymetry (`Bathymetry_10m.tif`) and substrate TIFFs (`NCC_substrate_20m.tif`, etc.) from BC coast sources (see GitHub README). |
| | |
| | ## Output Format |
| | |
| | - Binary GeoTIFF (`output.tif`): Kelp = 1, non-kelp = 0. |
| | - Intermediate files: |
| | - `<SAFE_name>_B2B3B4B8.tif`: 10m resolution, 4-band GeoTIFF (B02, B03, B04, B08). |
| | - `<SAFE_name>_B5B6B7B8A_B11B12.tif`: 20m resolution, 6-band GeoTIFF. |
| | - For `model_full`: `<SAFE_name>_Bathymetry.tif`, `<SAFE_name>_Substrate.tif`. |
| | |
| | ## Usage Instructions |
| | |
| | ### Installation via pip (Recommended) |
| | |
| | ```bash |
| | pip install skema-kelp |
| | ``` |
| | |
| | ### Installation from source |
| | |
| | 1. **Install**: |
| | ```bash |
| | git clone https://github.com/m5ghanba/skema.git |
| | cd skema |
| | python -m venv skema_env |
| | source skema_env/bin/activate # On Windows: skema_env\Scripts\activate |
| | pip install . |
| | ``` |
| | See [GitHub README](https://github.com/m5ghanba/skema) for detailed setup. |
| | |
| | 2. **Run**: |
| | ```bash |
| | skema --input-dir path/to/sentinel2/safe/folder --output-filename output.tif --model-type model_full |
| | # Or for S2-only model: |
| | skema --input-dir path/to/sentinel2/safe/folder --output-filename output.tif --model-type model_s2bandsandindices_only |
| | |
| | # For help: |
| | skema --help |
| | ``` |
| | |
| | 3. **Dependencies** (from `requirements.txt`): |
| | - PyTorch (GPU: `torch==2.1.0`, see GitHub for CUDA setup). |
| | - Others: `numpy`, `rasterio`, `segmentation-models-pytorch`. |
| |
|
| | ## Training Data |
| |
|
| | - **Source**: Sentinel-2 imagery from Copernicus Browser, BC coast bathymetry/substrate data. |
| | - **Region**: Optimized for British Columbia coastal waters. |
| | - **Note**: Bathymetry/substrate files required for `model_full` are available online (see GitHub README). |
| |
|
| | ## Limitations |
| |
|
| | - Optimized for BC coast; performance may vary elsewhere. |
| | - `model_full` requires specific bathymetry/substrate data. |
| | - Assumes Sentinel-2 `.SAFE` format input. |
| |
|
| | ## Citation |
| |
|
| | Please cite as: |
| |
|
| | > SKeMa model by Mohsen Ghanbari et al., SPECTRAL Remote Sensing Laboratory, University of Victoria, DOI: [10.57967/hf/6790](https://huggingface.co/m5ghanba/SKeMa). |
| |
|
| | **BibTeX:** |
| |
|
| | ```bibtex |
| | @software{skema_2026, |
| | author = {Mohsen Ghanbari, Neil Ernst, Taylor A. Denouden, Luba Y. Reshitnyk, Piper Steffen, Alena Wachmann, Alejandra Mora-Sotoa, Eduardo Loos, Margot Hessing-Lewis, Nic Dedeluke, Maycira Costa}, |
| | title = {SKeMa: Satellite-based Kelp Mapping using Semantic Segmentation on Sentinel-2 imagery}, |
| | year = 2026, |
| | publisher = {Hugging Face}, |
| | doi = {10.57967/hf/6790}, |
| | url = {https://huggingface.co/m5ghanba/SKeMa} |
| | } |
| | ``` |
| |
|
| | ## Links |
| |
|
| | - **PyPI Package**: https://pypi.org/project/skema-kelp/ |
| | - **GitHub Repository**: https://github.com/m5ghanba/skema |
| | - **Documentation**: https://github.com/m5ghanba/skema#readme |
| | - **Issues/Support**: https://github.com/m5ghanba/skema/issues |