Frame-to-Panorama Localization and Context-Aware Sampling for Scene-Specific Ship Detection in a Smart Marina Testbed
Organizations: Department of Computer Science University of Nicosia Nicosia, Cyprus · Maritime Digitalization Centre Cyprus Marine and Maritime Institute Larnaca, Cyprus
Abstract
Smart maritime infrastructures provide continuous access to heterogeneous sensing streams, enabling repeated experimentation, digital-twin development, and AI-based maritime services. However, sensing hardware alone is not sufficient for scene-specific model development: historical video streams must also be spatially indexed, contextualized, and reduced to informative subsets for annotation. This paper presents a frame-to-panorama localization and context-aware sampling pipeline for ship detection in historical PTZ maritime video lacking reliable pan, tilt, and zoom metadata. The main contribution is an end-to-end data-curation approach that recovers camera-view information from historical PTZ video and combines it with environmental context and visual diversity to construct compact, scene-specific training sets. Specifically, frames are localized on a reference panorama using SuperPoint and LightGlue, enriched with weather and solar-state metadata, and selected through diversity sampling to preserve variation across camera view and environmental conditions. A second context-aware stage targets under-represented distant-vessel cases near the horizon using tile-level visual embeddings and Gaussian Mixture Model clustering. Applied within the CMMI MDigi-I Smart Marina testbed, the proposed pipeline reduces 40,718 candidate frames to 220 images for annotation, corresponding to a 99.5% reduction. A YOLO26-m detector fine-tuned on this subset achieves a mean AP50 of 94.78% 0.51% and a mean AP50-95 of 75.10% 1.73% under sequence-grouped five-fold cross-validation. These results demonstrate that highly redundant infrastructure video streams can be transformed into compact, spatially and contextually diverse training sets for scene-specific detector adaptation while substantially reducing annotation effort.
Figures & tables
| Algorithm | Accuracy | Macro Average | Weighted Average | ||||
|---|---|---|---|---|---|---|---|
| Precision | Recall | -Score | Precision | Recall | -Score | ||
| SuperPoint+LightGlue | 87.36% | 62.69% | 68.82% | 62.83% | 93.67% | 87.36% | 89.93% |
| SIFT+FLANN | 12.34% | 7.29% | 7.03% | 6.39% | 12.77% | 12.34% | 11.22% |
| Fold | Precision | Recall | F1-score | ||
|---|---|---|---|---|---|
| Fold 1 | 0.9438 | 0.9015 | 0.9222 | 0.9485 | 0.7485 |
| Fold 2 | 0.9599 | 0.8928 | 0.9252 | 0.9500 | 0.7623 |
| Fold 3 | 0.9339 | 0.9092 | 0.9214 | 0.9527 | 0.7647 |
| Fold 4 | 0.9532 | 0.8738 | 0.9117 | 0.9392 | 0.7221 |
| Fold 5 | 0.9566 | 0.9067 | 0.9310 | 0.9486 | 0.7574 |
| Mean SD |