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
Metadata
Release files for marinedebrisdetector 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| marinedebrisdetector-0.0.2.tar.gz | 32.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| marinedebrisdetector-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 79.1 kB
Release files / marinedebrisdetector-0.0.2.tar.gz
| Download URL | marinedebrisdetector-0.0.2.tar.gz |
|---|---|
| Size | 32.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2b1fe368cfc4e0709f28211a97eeae0aeb6fd2fd49327c487c278b198063b74d
|
|
BLAKE2b-256 checksum How to use checksums |
aa703d2a13c51e1e893d791b12f2fad720aade1f7ca8ed1078c097cd5253707d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.12
|
Release files / marinedebrisdetector-0.0.2-py3-none-any.whl
| Download URL | marinedebrisdetector-0.0.2-py3-none-any.whl |
|---|---|
| Size | 46.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bbf76cdb02fe3ae29bb042bee384484835defe6e00b457cb36f33542f8a808c3
|
|
BLAKE2b-256 checksum How to use checksums |
675d36cc7883085efbd5462928418d2fc64e2b0f0f6cbbc1e2af93e24642c647
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.12
|
Security for marinedebrisdetector 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.