# Ship Detection in Sentinel 2 Multi-Spectral Images with Self-Supervised Learning
## 3 Results
### Comparison of SSL to Baseline Approaches  
Next, we compare our best pre-training method (SEN12 MS+RA) to the ImageNet pretraining and to the BL-NDWI baseline. Table 4 presents this comparison, Table 5 analyzes the false alarm rate for the different methods and Figure 7 compares the results by image. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Method (w. CO Filtering)**} & \multicolumn{3}{c}{**Transfer Learning**} & \multicolumn{3}{c}{**Fine-Tuning**} \\ \cline{2-7}  & **Precision** & **Recall** & **F1** & **Precision** & **Recall** & **F1** \\ \hline Scratch & - & - & - & **46.9** & 73.3 & **53.1** \\ \hline ImageNet & 39.2 & **76.5** & **47.9** & 42.9 & **76.8** & 50.2 \\ \hline SEN12 MS+RA & **39.5** & 76.4 & **47.9** & 44.4 & 75.5 & 52.2 \\ \hline BL-NDWI & 25.0 & 39.0 & 27.8 & 25.0 & 39.0 & 27.8 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Ship detection performance—best SSL based approach versus baselines. Average precision, recall, and F1-score computed over the 16 folds. Best results are presented in bold font. Figure 6: Impact of dataset size on F1 score in the TL settings with the A pretext task. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Pre-Training Dataset**} & \multirow{2}{*}{**SSL Pretext Task**} & \multicolumn{3}{c}{**False Alarm (FA) Rate (ship/km?)**} \\ \cline{3-6}  & & **No Filt.** & **CO Filt.** & **OS Filt.** & **\#FA 1** & **\#FA 2** \\ \hline EuroSAT & A & 1.70 & 0.92 & 0.22 & \(-0.78\) & \(-1.48\) \\ \hline BigEarthNet & A & 1.60 & 0.84 & 0.16 & \(-0.76\) & \(-1.44\) \\ \hline SEN12 MS & A & 1.20 & **0.63** & **0.14** & \(-0.57\) & \(-1.06\) \\ \hline SEN12 MS & RA & **1.19** & 0.65 & 0.19 & \(-0.54\) & \(-1.00\) \\ \hline SEN12 MS & RA-lo & 1.23 & 0.68 & 0.21 & \(-0.55\) & \(-1.02\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: False alarm rates for the various SSL settings (Transfer Learning). Best results are presented in bold font. Table 4 shows that when all methods are filtered with land/sea map, deep learning algorithms lead to largely better results than the BL-NDWI method: in transfer learning mode, it gains 20 percentage points of F1 and double the recall. This means that many ships are not detected with BL-NDWI, and one explanation could be the threshold choice for the NDWI that is not generally optimal to all images. The problem of sub-optimal threshold can be seen in Figure 7, where, for some test images, such as Suez 1 and 2, the threshold is almost perfectly chosen, whereas on Suez 3, Suez 5, and Suez 6 the detection is really weak. As the threshold of the NDWI is chosen to maximize performance over the whole dataset, it is suboptimal on individual images. For deep learning methods, such as SEN12 MS-RA, generalizing problems are evidenced on images Suez 2, Panama, and Rotterdam 2, but this is mainly due to the challenging conditions induced by those test images, rather than domain difference : large land cover (Suez canal), clouds (Rotterdam, Panama), and turbulent sea (Panama). Our SSL based pipeline achieves similar results to ImageNet pre-training in the transfer learning setting and two percentage points higher F1 score in the fine-tuning setting. It is worth noticing that training from scratch achieved better F1 score in the fine-tuning setting. When training on 15 images, learning from scratch seems a better choice due to simplicity and better performance. Indeed, most works use this setting for remote sensing applications. However, our aim is to study few shot learning performance and in this setting, as shown in the following sections, learning from scratch is disadvantaged. Generally, deep learning methods are weak in areas with dark background (grass, cloud shadow), waves or large boat trail, where they lead to many false positives.