File size: 10,211 Bytes
03790d2 28791f4 ba1f45d 28791f4 ba1f45d de58e36 dabdd18 de58e36 8385d9b 03790d2 7f5ad83 05a1662 35490f9 7f5ad83 03e3401 7f5ad83 b268fce 7f5ad83 05a1662 7f5ad83 17151c4 7f5ad83 3fe9576 7f5ad83 dde1d4d 7f5ad83 3dff620 7f5ad83 ef6e0e9 7f5ad83 17151c4 7f5ad83 0c865a7 17151c4 50876a1 7f5ad83 50876a1 014ad5d 7f5ad83 03e3401 7f5ad83 03e3401 7f5ad83 b268fce |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
---
license: agpl-3.0
library_name: ultralytics
tags:
- satellite imagery
- marine traffic
- sentinel-2
- yolov8
model-index:
- name: mayrajeo/marine-vessel-detection-yolov8
results:
- task:
type: object-detection
metrics:
- type: precision
value: 0.880
name: [email protected](box)
- type: precision
value: 0.858
name: [email protected]
- type: recall
value: 0.875
name: [email protected]
- type: precision
value: 0.453
name: mAP(box)
---
# Model Card for YOLOv8 models for detecting marine vessels from RGB Sentinel-2 images
<!-- Provide a quick summary of what the model is/does. -->
## Model Details
### Model Description
<!-- Provide a longer summary of what this model is. -->
These model weights are meant for detecting marine vessels from RGB Sentinel-2 imagery.
The models are trained and validated on human-annotated marine vessel data. These annotations, information of which Sentinel-2 product they correspond to, and instructions on how to convert them into COCO or YOLO format datasets are available as GeoPackage files on Zenodo portal: [https://zenodo.org/records/10046342](https://zenodo.org/records/10046342).
- **Developed by:** Janne Mäyrä
- **Model type:** Object Detection
- **Finetuned from model:** YOLOv8 pretrained models
### Model Sources
<!-- Provide the basic links for the model. -->
- **Paper:** [http://dx.doi.org/10.2139/ssrn.4827287](http://dx.doi.org/10.2139/ssrn.4827287)
- **Demo:** [https://huggingface.co/spaces/mayrajeo/marine-vessel-detection](https://huggingface.co/spaces/mayrajeo/marine-vessel-detection)
## Uses
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
### Direct Use
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
Models are trained to process 320x320 pixel patches of Sentinel-2 RGB images with 10m resolution and detect marine vessels which are upsampled into 640x640 pixels during training and inference. The models will detect targets from outside of the water areas, but those detections can be eliminated by using external datasets such as land masks.
### Out-of-Scope Use
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
These models are not suitable for other purposes than for detecting potential marine vessels from satellite imagery.
### Recommendations
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
The models are most accurate on more closed water areas such as denser archipelagos and close to the coast instead of open sea. Especially during windy conditions the models incorrectly detect a large number of wakes and glint as marine vessels.
## How to Get Started with the Model
[https://github.com/mayrajeo/ship-detection] provides examples on how to use the models.
## Training Details
### Training Data
<!-- This should link to a Data Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
The model is trained using the following Sentinel-2 mosaics and manually annotated marine vessel data. Archipelago sea 2 and Kvarken were used as test data. Other three locations were sliced into 320x320 pixel patches. These patches were then spatially split into five equal sized folds so that each fold contained data from all timesteps and locations, and all patch locations that contained an annotated vessel in any timestep were included in the folds. In total, this dataset contained 3264 320x320 pixel image patches, of which 1974 contained annotated vessels and 1290 were background patches.
The annotations are available as GeoPackages on Zenodo portal: [https://zenodo.org/doi/10.5281/zenodo.10046341](https://zenodo.org/doi/10.5281/zenodo.10046341)
Training and validation data:
|Location|Date|Number of annotations|Annotated patches|Background patches|
|-----|----|-------|------|------|
|Archipelago sea|2022-06-19|519|271|269|
|Archipelago sea|2022-07-21|1518|387|153|
|Archipelago sea|2022-08-13|1368|402|138|
|Gulf of Finland|2022-06-06|278|138|241|
|Gulf of Finland|2022-06-26|1206|269|110|
|Gulf of Finland|2022-07-21|971|260|119|
|Bothnian Bay|2022-06-27|122|81|88|
|Bothnian Bay|2022-07-12|162|98|71|
|Bothnian Bay|2022-08-28|98|68|101|
#### Training Hyperparameters
Training configs can be found from each model directory, in the file `args.yaml`.
## Evaluation
<!-- This section describes the evaluation protocols and provides the results. -->
### Testing Data, Factors & Metrics
#### Testing Data
<!-- This should link to a Data Card if possible. -->
Test data consists of six Sentinel-2 mosaics:
|Location|Date|Number of annotations|
|--------|----|---------------------|
|Bothnian sea|2021-07-14|450|
|Bothnian sea|2022-06-24|424|
|Bothnian sea|2022-08-13|399|
|Kvarken|2022-06-17|83|
|Kvarken|2022-07-12|183|
|Kvarken|2022-08-26|88|
#### Factors
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
Before evaluating, the predictions for the test set are cleaned using the following steps:
1. All prediction whose centroid points are not located on water are discarded. The water mask used contains layers `jarvi` (Lakes), `meri` (Sea) and `virtavesialue` (Rivers as polygon geometry) from the Topographical database by the National Land Survey of Finland. Unfortunately this also discards all points not within the Finnish borders.
2. All predictions whose centroid points are located on water rock areas are discarded. The mask is the layer `vesikivikko` (Water rock areas) from the Topographical database.
3. All predictions that contain an above water rock within the bounding box are discarded. The mask contains classes `38511`, `38512`, `38513` from the layer `vesikivi` in the Topographical database.
4. All predictions that contain a lighthouse or a sector light within the bounding box are discarded. Lighthouses and sector lights come from Väylävirasto data, `ty_njr` class ids are 1, 2, 3, 4, 5, 8
5. All predictions that are wind turbines, found in Topographical database layer `tuulivoimalat`
6. All predictions that are obviously too large are discarded. The prediction is defined to be "too large" if either of its edges is longer than 750 meters.
#### Metrics
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
Precision and Recall with IoU-threshold of 0.5, mAP50 and mAP.
### Results
5-fold cross-validation results:
| Model | ('Precision', 'max') | ('Precision', 'mean') | ('Precision', 'min') | ('Recall', 'max') | ('Recall', 'mean') | ('Recall', 'min') | ('mAP', 'max') | ('mAP', 'mean') | ('mAP', 'min') | ('mAP50', 'max') | ('mAP50', 'mean') | ('mAP50', 'min') |
|:--------|-----------------------:|------------------------:|-----------------------:|--------------------:|---------------------:|--------------------:|-----------------:|------------------:|-----------------:|-------------------:|--------------------:|-------------------:|
| yolov8n | 0.84688 | 0.82316 | 0.81273 | 0.79587 | 0.783928 | 0.76895 | 0.38816 | 0.380828 | 0.37637 | 0.84323 | 0.827192 | 0.81776 |
| yolov8s | 0.86363 | 0.834556 | 0.80835 | 0.83639 | 0.825554 | 0.81469 | 0.41098 | 0.406258 | 0.40374 | 0.86933 | 0.858632 | 0.84776 |
| yolov8m | 0.83592 | 0.827938 | 0.81134 | 0.84939 | 0.83238 | 0.80153 | 0.41739 | 0.410742 | 0.40496 | 0.87071 | 0.860378 | 0.84545 |
| yolov8l | 0.8545 | 0.846998 | 0.83973 | 0.84975 | 0.83072 | 0.82398 | 0.41694 | 0.411712 | 0.40505 | 0.87459 | 0.863334 | 0.85743 |
| yolov8x | 0.84028 | 0.834728 | 0.83019 | 0.84891 | 0.828462 | 0.80858 | 0.42065 | 0.411532 | 0.40231 | 0.86203 | 0.858136 | 0.85131 |
Models with best performance for test set for each model architecture:
| Model | Fold | Precision | Recall | mAP50 | mAP |
|:------|------|-----------|--------|-------|-----|
|yolov8n| 1| 0.820806|0.838452| 0.842|0.403|
|yolov8s| 4| 0.844485|0.860565| 0.865|0.422|
|yolov8m| 4| 0.858866|0.874693| 0.880|0.453|
|yolov8l| 1| 0.840909|0.863636| 0.862|0.443|
|yolov8x| 1| 0.855746|0.859951| 0.876|0.450|
### Compute Infrastructure
#### Hardware
NVIDIA V100 GPU with 32GB of memory, hosted on computing nodes of Puhti supercomputer by CSC - IT Center for Science, Finland.
#### Software
Models were trained as Slurm batch jobs in Puhti.
## Citation [optional]
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
**BibTeX:**
```
@misc{mayraMappingRecreationalMarine2024,
type = {{{SSRN Scholarly Paper}}},
title = {Mapping Recreational Marine Traffic from Sentinel-2 Imagery with Yolov8},
author = {M{\"a}yr{\"a}, Janne and Virtanen, Elina and Jokinen, Ari-Pekka and Koskikala, Joni and V{\"a}kev{\"a}, Sakari and Attila, Jenni},
year = {2024},
doi = {10.2139/ssrn.4827287},
}
```
**APA:**
Mäyrä, Janne and Virtanen, Elina and Jokinen, Ari-Pekka and Koskikala, Joni and Väkevä, Sakari and Attila, Jenni, Mapping Recreational Marine Traffic from Sentinel-2 Imagery with Yolov8. Available at SSRN: https://ssrn.com/abstract=4827287 or http://dx.doi.org/10.2139/ssrn.4827287
## Model Card Contact
Janne Mäyrä |