Home

Awesome

MADOS Logo

[paper][project page][dataset]

Marine Debris and Oil Spill (MADOS) is a marine pollution dataset based on Sentinel-2 remote sensing data, focusing on marine litter and oil spills. Other sea surface features that coexist with or have been suggested to be spectrally similar to them have also been considered. MADOS formulates a challenging semantic segmentation task using sparse annotations.

In order to download MADOS go to https://doi.org/10.5281/zenodo.10664073.

Installation

conda create -n mados python=3.8.12

conda activate mados

conda install -c conda-forge gdal==3.3.2

pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu113 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.11/index.html

conda install pytables==3.7.0

Evaluate MariNeXt

To evaluate MariNeXt, place the MADOS dataset under the data folder, download the pretrained models (5 different runs) from here and place them under the marinext/trained_models folder and then run the following:

python marinext/evaluation.py --path ./data/MADOS --model_path marinext/trained_models/1

Train MariNeXt

To train MariNeXt from scratch, run the following:

python marinext/train.py --path ./data/MADOS

Stack Patches

To stack the image patches to form multispectral images, run the following:

python utils/stack_patches.py --path ./data/MADOS

Spectral Signatures Extraction

To extract the spectal signatures of MADOS dataset (after stacking) and store them in a HDF5 Table file (DataFrame-like) run the following:

python utils/spectral_extraction.py --path ./data/MADOS_nearest

Alternatively, you can download the dataset.h5 file from here.

To load the dataset.h5, run in a python cell the following:

import pandas as pd

hdf = pd.HDFStore('./data/dataset.h5', mode = 'r')

df_train = hdf.select('Train')
df_val = hdf.select('Validation')
df_test = hdf.select('Test')

hdf.close()

Acknowledgment

This implementation is mainly based on MARIDA, SegNeXt, mmsegmentaion, Segformer and Enjoy-Hamburger.

If you find this repository useful, please consider giving a star :star: and citation:

Kikaki K., Kakogeorgiou I., Hoteit I., Karantzalos K. Detecting Marine Pollutants and Sea Surface Features with Deep Learning in Sentinel-2 Imagery. ISPRS Journal of Photogrammetry and Remote Sensing, 2024.