This repository contains the implementation and additional resources for the following paper:
Transformer Assisted UNet for Marine Litter Detection on Sentinel-2 Imagery
Daniel Torres, Bartomeu Garau, Francesc Alcover, Ivan Pereira-Sánchez, Julia Navarro, Catalina Sbert, Joan Duran
The contamination of marine environments with man-made litter is a growing nation-wide concern. Satellite imagery combined with deep learning–based detection models has emerged as a robust and cost-effective solution for large-scale marine litter monitoring. In this article, we present a novel deep learning-based scheme to detect marine litter using Sentinel-2 imagery based on the Deep UNet architecture, introducing self- and cross-attention mechanisms into the decoder via transformer layers. The model leverages all Sentinel-2 bands except B10, and the NDVI and FDI indices are additionally incorporated to better guide the segmentation process. To evaluate the proposed method, we train it on the FloatingObjects dataset, a widely used benchmark for marine debris detection, and the results show that it compares favorably against state-of-the-art approaches.
You can set up the development environment using either Conda or pip.
-
Create the environment:
conda env create -f environment.yml
-
Activate the environment:
conda activate TAUNet
-
(Optional) Create and activate a virtual environment:
python -m venv venv source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt
To begin, create an .env file in the project root directory and define the DATASET_PATH variable, pointing to the directory where your dataset is stored.
The DataModule is built specifically for FloatingObjects dataset.
Run the following command:
python train.py - Upload definitive checkpoints.
This work was funded by MCIN/AEI/10.13039/501100011033/ and by the European Union NextGenerationEU/PRTR via the MaLiSat project TED2021-132644B-I00.