File size: 9,101 Bytes
03790d2 28791f4 ba1f45d 28791f4 ba1f45d de58e36 dde1d4d de58e36 03790d2 7f5ad83 05a1662 7f5ad83 b268fce 7f5ad83 05a1662 7f5ad83 17151c4 7f5ad83 dde1d4d 7f5ad83 dde1d4d 7f5ad83 ef6e0e9 7f5ad83 17151c4 7f5ad83 dde1d4d 17151c4 50876a1 7f5ad83 50876a1 dde1d4d 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 |
---
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.810
name: mAP@0.5(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 will be made available as GeoPackage files on Zenodo portal in the near future.
- **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:** Under progress
- **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.
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|433|
|Bothnian sea|2022-06-24|413|
|Bothnian sea|2022-08-13|391|
|Kvarken|2022-06-17|79|
|Kvarken|2022-07-12|167|
|Kvarken|2022-08-26|81|
#### 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.806493 | 0.787567 | 0.774563 | 0.844089 | 0.827987 | 0.809585 | 0.288 | 0.2826 | 0.275 | 0.771 | 0.7492 | 0.73 |
| yolov8s | 0.82737 | 0.816531 | 0.809291 | 0.867093 | 0.852268 | 0.842173 | 0.309 | 0.3044 | 0.298 | 0.789 | 0.7776 | 0.763 |
| yolov8m | 0.849967 | 0.824472 | 0.804688 | 0.874121 | 0.856741 | 0.832588 | 0.323 | 0.3162 | 0.311 | 0.81 | 0.784 | 0.765 |
| yolov8l | 0.837152 | 0.823104 | 0.811286 | 0.867093 | 0.860703 | 0.854313 | 0.323 | 0.3206 | 0.315 | 0.795 | 0.7888 | 0.782 |
| yolov8x | 0.830968 | 0.821126 | 0.804322 | 0.86262 | 0.852013 | 0.823003 | 0.32 | 0.3132 | 0.301 | 0.793 | 0.781 | 0.752 |
Models with best performance for test set for each model architecture:
| Model | Fold | Precision | Recall | mAP50 | mAP |
|:------|------|-----------|--------|-------|-----|
|yolov8n| 1| 0.794348|0.844089| 0.771|0.288|
|yolov8s| 4| 0.817963|0.867093| 0.784|0.303|
|yolov8m| 4| 0.825090|0.874121| 0.810|0.323|
|yolov8l| 1| 0.811603|0.867093| 0.795|0.322|
|yolov8x| 1| 0.825183|0.862620| 0.793|0.317|
### 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:**
TBA
**APA:**
TBA
## Model Card Contact
Janne Mäyrä |