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, Eduardo Loos, Margot Hessing-Lewis, 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
GitHub: m5ghanba/skema
PyPI: 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; spectral indices with the order NDVI; NDWI; GNDVI; ClI; NDVIRE).
  • Model Types:
    • model_full: Uses all 12 channels, including bathymetry and substrate (optimized for BC coast).
    • model_s2bandsandindices_only: Uses Sentinel-2 bands and indices only (no bathymetry/substrate).

Input Data

  • Required: Sentinel-2 .SAFE folder (download from Copernicus Browser).
  • 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)

pip install skema-kelp

Installation from source

  1. Install:

    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 for detailed setup.

  2. Run:

    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.

BibTeX:

@software{skema_2025,
  author       = {Mohsen Ghanbari, Neil Ernst, Taylor A. Denouden, Luba Y. Reshitnyk, Piper Steffen, Alena Wachmann, Eduardo Loos, Margot Hessing-Lewis, Maycira Costa},
  title        = {SKeMa: Satellite-based Kelp Mapping using Semantic Segmentation on Sentinel-2 imagery},
  year         = 2025,
  publisher    = {Hugging Face},
  doi          = {10.57967/hf/6790},
  url          = {https://huggingface.co/m5ghanba/SKeMa}
}

Links

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support