arXiv:2608.24756cs.CVAug 2026

Manuscript Offprint

arXiv:2608.24756

Weakly Supervised Seafloor Segmentation for Seagrass Habitat Mapping in Side-Scan Sonar Imagery

Hayat Rajani, Nuno Gracias, Rafael Garcia

Hayat Rajani, Member, IEEE, Nuno Gracias, Member, IEEE, and Rafael Garcia, Member, IEEE

Abstract—Seagrass meadows are crucial blue-carbon habitats, and mapping their extent is a prerequisite for coastal management and carbon inventory. Optical satellite sensors cover large areas but cannot reach deep or turbid water, whereas side-scan sonar (SSS) images the seabed at high resolution and at any depth. Interpreting SSS, however, still relies on dense manual annotation, which is slow and costly. We address this by adapting a weakly supervised semantic segmentation framework to SSS benthic habitat mapping, so that pixel-level maps are learned from image-level labels alone. The framework couples a ViT-based encoder-decoder with a classification branch, extracts class activation maps, and refines them into pseudo-labels with a dense conditional random field that we tune for the noise and weak boundaries of acoustic imagery. It follows an iterative self-training scheme, together with a sampling strategy to cope with the strong class imbalance of the data. We also study the effect of different loss functions on segmentation quality, finding Lovász-Softmax loss the most effective. On a held-out transect, the refined pseudo-labels reached an mIoU of 89.3% against the ground truth, and the segmentation branch, trained without any pixel-level labels, reached 87.6%. Self-supervised pretraining on unlabelled SSS added a further 3% in mean intersection-over-union. Field trials further demonstrate the generalizability of the trained model. These results show that accurate and label-efficient benthic habitat mapping from side-scan sonar is feasible at the scale needed for coast-wide seagrass monitoring.

Index Terms—side-scan sonar, weakly-supervised semantic segmentation, seafloor segmentation, benthic habitat mapping, seagrass mapping, blue carbon footprint

I. INTRODUCTION

SEAGRASS meadows are among the most valuable coastal ecosystems. They provide habitat and nursery grounds, stabilise sediments, and store large amounts of organic carbon in their soils over long time scales, a service commonly termed blue carbon [1]. Their global extent has declined by about 29% since records began in 1879, driven by coastal development, declining water quality, and climate change [2]. In the Mediterranean, the endemic seagrass Posidonia oceanica forms extensive meadows that hold some of the largest sedimentary carbon stores in the basin, while Cymodocea nodosa frequently occupies shallower, sandy, or disturbed areas alongside it [1]. Reliable mapping of the spatial extent of these meadows is therefore a prerequisite for coastal management and for any inventory of the carbon they hold [3].

Mapping these meadows over large areas requires imaging the seabed at fine spatial resolution. Side-scan sonar (SSS) produces high-resolution acoustic imagery of the seabed and is widely used in underwater applications such as marine archaeology, structural inspection, and environmental monitoring [4]. It has long been applied to map Mediterranean seagrass meadows, including Posidonia oceanica, at depths where optical sensors cannot operate [3]. Optical satellite and aerial sensors map shallow meadows well but cannot reach the deeper limits of these habitats, so acoustic mapping with SSS complements space-borne and airborne Earth observation rather than competing with it [3]. Unlike optical imagery, however, SSS lacks mature automated or semi-automated annotation tools. General-purpose segmenters such as the Segment Anything Model (SAM) [5] and curated underwater image databases such as FathomNet [6] are built for optical data and do not transfer to acoustic imagery. As a result, interpreting SSS maps still relies on the manual annotation of terrain and structural features, which is labour-intensive and costly [7]. Automating seabed classification would make large-area habitat mapping practical, and running it on board autonomous underwater vehicles (AUVs) would allow classification to proceed during the survey and support more informed, real-time decisions.

This work builds on our earlier work [7], in which we developed an encoder-decoder architecture that combines Vision Transformers (ViTs) and convolutional neural networks (CNNs) for semantic segmentation of the seafloor in SSS imagery. The model improved on the previous state-of-the-art by a large margin while meeting real-time computational requirements. Despite its strong performance and its generalisation to unseen data, it was trained under noisy supervision. The seafloor categorisations provided by geophysicists are often produced at a coarse level on SSS mosaics, whereas time-critical online processing must operate directly on raw SSS waterfalls. Transferring annotations from mosaics to waterfalls is not straightforward, especially without access to the internal parameters used for mosaicing, and this introduces discrepancies. The dense ground truth used for supervision is therefore not pixel-accurate. This setting can be treated as a form of weak supervision, in which training proceeds under noisy or incomplete labels.

Weakly supervised semantic segmentation (WSSS) aims to produce a pixel-level segmentation while relying only on coarse or inexpensive labels, for example image-level tags that state which classes appear in an image without indicating where they are [8], [9]. This lowers the annotation effort substantially, at the cost of a harder learning problem, and it is well suited to domains such as SSS where dense labels are scarce. This motivates the main objective of the present work, a segmentation pipeline for side-scan sonar aimed at label-efficient benthic habitat mapping at the scale needed for coast-wide seagrass monitoring.

In this work, we do not propose a new model. Instead, we adapt an existing WSSS framework and analyse the effect

All authors are with the Computer Vision and Robotics Research Institute (ViCOROB) of the University of Girona, Spain.

Corresponding author: Hayat Rajani (hayat.rajani@udg.edu).

of label refinement and loss function design. Specifically, we tune the parameters of a dense conditional random field (CRF) [10] and compare segmentation performance under several loss functions, including cross-entropy, focal loss [11], and Lovász-Softmax loss [12]. Our analysis also shows that commonly used evaluation metrics such as the mean intersection-over-union (mIoU) can obscure meaningful differences between models, particularly under class imbalance. The improvements we report are better understood by interpreting the metric together with the qualitative segmentation behaviour.

We frame the study around three questions:

  • Can a weakly supervised approach based on image-level labels produce accurate benthic habitat maps from SSS imagery?

• How does it compare with fully supervised methods in terms of accuracy and efficiency?

• What are its limitations for large-area seagrass and seafloor mapping, and how can they be addressed?

• How well does the approach transfer across survey sites and acoustic conditions, as required for large-area habitat monitoring?

References (31)