作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程

• •    

融合频域增强与边缘挖掘的水下图像语义分割

  • 发布日期:2026-09-14

Underwater Image Semantic Segmentation via Frequency-Domain Enhancement and Edge Mining

  • Published:2026-09-14

摘要: 针对水下图像因水体选择性吸收与悬浮颗粒散射而呈现颜色偏移、对比度衰减及高频细节丢失等问题,同时现有通用语义分割模型对高价值稀有目标的边界识别能力不足、分割精度欠佳,本研究致力于从特征表示与损失监督两个层面提升模型对水下图像中模糊目标的精细分割能力,特别是强化对稀有类别边缘轮廓的重建与判别。在技术实现上,以在水下场景中表现优异的UWSegFormer模型作为基准架构,在保留其水下图像质量注意力模块与多尺度聚合注意力模块的基础上,从频域增强和边缘监督两个维度提出针对性改进。一方面,设计了一种融合频域增强的多尺度聚合注意力模块(FS-MAA)。该模块在解码器多尺度特征融合阶段引入二维快速实数傅里叶变换(2D-RFFT),将空间域特征显式映射至频域,利用频域解耦特性分离代表全局语义的低频分量与表征纹理细节的高频分量,并对高频分量施加固定经验增益系数以补偿水体散射造成的高频损失,再通过二维逆离散傅里叶变换将增强后的频域特征恢复至空间域,最终与原始空间域特征进行残差聚合,从而在保留全局上下文语义的同时注入高频细节信息。另一方面,构建了一种基于在线模糊边缘挖掘的边缘学习损失(OHEM-ELL)。该损失在训练过程中利用Scharr算子分别计算预测掩码与真实标签的边缘响应图,获取每个边界像素的预测误差,随后按误差值降序排列并筛选出损失最大的前K%边界像素定义为困难样本,仅对这部分像素执行梯度回传与参数更新。该机制以极小的额外计算代价将网络的学习注意力动态聚焦于最难辨识的模糊边缘区域,有效缓解了背景水体等易分像素对损失的主导。整体损失函数由标准语义分割损失与所提出的OHEM-ELL线性加权构成,实现像素级分类与边缘优化的联合监督。实验在SUIM水下语义分割基准数据集和DUT-USEG真实水下图像数据集上开展,采用MiT-B0作为编码器并加载ImageNet-1K预训练权重。在SUIM数据集的6个主要类别上,得到平均交并比(mIoU)达到86.92%,较基线UWSegFormer的85.06%提升了1.86个百分点。消融实验表明,两者联合使用取得最佳效果,验证了两个模块在提升分割精度上的协同促进作用。在DUT-USEG数据集上,本文方法将mIoU从基线的68.12%提升至68.75%,验证了方法在跨数据集场景下的良好泛化性。模型参数量为16.81M,计算复杂度为6.48 GFLOPs,与基线几乎持平,表明所提改进未引入明显的额外计算负担。可视化结果进一步显示,FS-MAA模块有效恢复了水下浑浊环境中丢失的纹理细节,OHEM-ELL损失使目标边界预测更加连贯清晰,两者结合后的模型在视觉质量上取得了最优表现。综合以上结果,本研究得出如下结论:通过频域特征解耦与选择性高频增强,能够有效补偿水下成像过程中因散射导致的细节衰减,使网络在特征层面获得更完整的结构信息;通过在线困难边缘挖掘策略,能够引导网络将有限的参数量与梯度更新集中于最具判别挑战性的边界区域,显著改善稀有目标的轮廓刻画能力。

Abstract: To address the problems of underwater images suffering from color shift, contrast attenuation, and loss of high-frequency details due to selective light absorption and scattering by suspended particles, as well as the insufficient boundary recognition capability and limited segmentation accuracy of existing general-purpose semantic segmentation models for high-value rare objects, this study aims to improve the fine-grained segmentation performance for blurred underwater targets from two aspects: feature representation and loss supervision, with particular emphasis on enhancing the reconstruction and discrimination of edge contours of rare categories.Technically, this work adopts the UWSegFormer model, which has demonstrated excellent performance in underwater scenes, as the baseline architecture. While retaining its underwater image quality attention module and multi-scale aggregation attention module, we propose targeted improvements from two perspectives: frequency-domain enhancement and edge supervision. On one hand, we design a Frequency-Spatial Multi-scale Aggregation Attention (FS‑MAA) module. This module introduces Two-Dimensional Real-valued Fast Fourier Transform (2D‑RFFT) during multi-scale feature fusion in the decoder, explicitly mapping spatial-domain features to the frequency domain. It leverages the decoupling property of the frequency domain to separate low‑frequency components, which represent global semantics, from high‑frequency components, which characterize textural details. A fixed empirical gain coefficient is applied to the high‑frequency components to compensate for high‑frequency loss caused by water scattering. The enhanced frequency-domain features are then restored to the spatial domain via inverse 2D Fourier transform and finally aggregated with the original spatial features through residual connection, thereby injecting high‑frequency detail information while preserving global contextual semantics. On the other hand, we construct an Online Hazy Edge Mining‑based Edge Learning Loss (OHEM‑ELL). During training, this loss computes edge response maps for both predicted masks and ground‑truth labels using Scharr operators, obtaining the prediction error for each boundary pixel. The errors are then sorted in descending order, and the top K% boundary pixels with the largest losses are selected as hard examples; only these pixels are used for gradient backpropagation and parameter updates. This mechanism dynamically focuses the network’s learning attention on the most difficult‑to‑recognize blurred edge regions with negligible additional computational cost, effectively alleviating the dominance of easily classified pixels (such as background water) in the loss. The overall loss function is a linear weighted combination of the standard semantic segmentation loss and the proposed OHEM‑ELL, enabling joint supervision of pixel‑wise classification and edge optimization.Experiments are conducted on the SUIM underwater semantic segmentation benchmark dataset and the DUT‑USEG real‑world underwater image dataset, using MiT‑B0 as the encoder with ImageNet‑1K pretrained weights. On the six major categories of the SUIM dataset, the proposed method achieves a mean Intersection over Union (mIoU) of 86.92%, which is 1.86 percentage points higher than the baseline UWSegFormer (85.06%). Ablation studies demonstrate that the combination of both modules yields the best performance, confirming their synergistic effect in improving segmentation accuracy. On the DUT‑USEG dataset, our method improves mIoU from the baseline of 68.12% to 68.75%, verifying its good cross‑dataset generalization ability. The model has 16.81M parameters and a computational complexity of 6.48 GFLOPs, almost identical to the baseline, indicating that the proposed improvements introduce no significant extra computational burden. Visualization results further show that the FS‑MAA module effectively recovers lost textural details in turbid underwater environments, while the OHEM‑ELL loss produces more coherent and sharper object boundaries; the model integrating both modules achieves the best visual quality. Based on the above results, this study draws the following conclusions: frequency‑domain feature decoupling with selective high‑frequency enhancement can effectively compensate for detail attenuation caused by scattering during underwater imaging, enabling the network to obtain more complete structural information at the feature level; and the online hard edge mining strategy can guide the network to concentrate its limited parameters and gradient updates on the most discriminatively challenging boundary regions, significantly improving the contour delineation capability for rare objects.