A detector of marine debris with Sentinel-2 scenes
Project description
Large Scale Detection of Marine Debris with Sentinel-2
Rußwurm M, Venkatesa J. S., Tuia D. (2023; in preparation) Large-scale Detection of Marine Debris in Coastal Areas with Sentinel-2
Getting Started
We provide a python package for easy installation and model predictions
Installation of the Python Package
pip install git+https://github.com/marccoru/marinedebrisdetector
or
git clone https://github.com/MarcCoru/marinedebrisdetector.git
cd marinedebrisdetector
pip install .
You now have a marinedebrisdetector
program to make predictions of Sentinel-2 tif images on the console.
Check marindebrisdetector --help
for information on parameters and options.
Predict the qualitative test images from the paper with this command.
marinedebrisdetector --plot-qualitative
predict a Sentinel-2 scene (Durban) with these commands
# download example scene (~300 MB) to ("durban_20190424.tif")
marinedebrisdetector --download-durban
# predict the durban example scene
marinedebrisdetector durban_20190424.tif
the prediction should be in the same folder named durban_20190424_prediction.tif
. You can inspect the prediction scene in any image viewer,
but best in a GIS program QGIS or ArcGIS that allows you inspect and overlay other georeferenced data.
The tested prediction times of the scene prediction above are:
- 11 sec on NVIDIA GeForce RTX 3090
- 15 sec on NVIDIA GeForce GTX 970
- 11 minutes on Macbook Pro CPU
Pre-trained Models
We provide pre-trained weights for 12-channel Sentinel-2 imagery. A detailed list of weights can be found on the models page
pretrained segmentation models can be loaded via the torch hub in python
import torch
torch.hub.load("marccoru/marinedebrisdetector", "unetpp")
torch.hub.load("marccoru/marinedebrisdetector", "unet")
# trained without label refinement (can lead to thinner more fine-grained predictions)
torch.hub.load("marccoru/marinedebrisdetector", "unetpp", label_refinement=False)
The marinedebrisdetector
defaults to the unetpp/unet++
.
Datasets
We trained the underlying Unet++ segmentation model (implementation from Pytorch Segmentation Models) on an aggregated a combination of existing datasets for training FloatingObjects Dataset (Mifdal et al., 2020), Marine Debris Archive (Kikaki et al., 2022), S2Ships (Ciocarlan et al., 2021), and newly annotated a refinedFloatingObjects dataset and Sentinel-2 images of the Plastic Litter Projects (Papageorgiou et al., 2022; under review)
More details in a dedicated data page.
Executing the training script (see this "model training" page) with --download
will automatically download and uncompress the required datasets (116 GB (uncompressed)).
Model Training
We provide a a training script powered by Pytorch Lightning and Weights and Biases to train new models and reproduce our results. More details on training commands and ablations in a dedicated page for model training
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file marinedebrisdetector-0.0.2.tar.gz
.
File metadata
- Download URL: marinedebrisdetector-0.0.2.tar.gz
- Upload date:
- Size: 32.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b1fe368cfc4e0709f28211a97eeae0aeb6fd2fd49327c487c278b198063b74d |
|
MD5 | aeb9073cc822799b3378e195be4602f1 |
|
BLAKE2b-256 | aa703d2a13c51e1e893d791b12f2fad720aade1f7ca8ed1078c097cd5253707d |
File details
Details for the file marinedebrisdetector-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: marinedebrisdetector-0.0.2-py3-none-any.whl
- Upload date:
- Size: 46.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbf76cdb02fe3ae29bb042bee384484835defe6e00b457cb36f33542f8a808c3 |
|
MD5 | 7b6446ffa98f08797429bcf2039550f7 |
|
BLAKE2b-256 | 675d36cc7883085efbd5462928418d2fc64e2b0f0f6cbbc1e2af93e24642c647 |