Abstract:Forward-looking sonar is a crucial sensor in ocean exploration, widely used for target detection and tracking over long distances. However, sonar data acquisition is often compromised by environmental noise in the ocean, which is unevenly distributed and reduces the accuracy of target detection in sonar images. Traditional convolutional neural networks (CNNs) for tracking forward-looking sonar targets often fail due to the low frame rates of sonar image sequences and unclear target features. To address the issue of noise pollution in forward-looking sonar images, this paper proposes an enhanced BM3D (Block Matching and 3D Filtering) algorithm tailored to the specific characteristics of sonar images. The Manhattan distance is utilized in place of the Euclidean distance to compute similar block-matching distances, improving noise handling across different types and intensities. Additionally, to mitigate target loss, we introduce a forward-looking sonar image target detection algorithm based on an improved YOLOv8-s network. This enhancement includes modifications to the ConvNeXt-based C2N algorithm, the addition of a shallow feature detection head, and improvements to the normalized Wasserstein distance (NWD) loss function. Experimental results from sonar image data acquisition show that the accuracy of the improved model is 87.2%, with an mAP@0.5 of 85.4%. Compared to the original YOLOv8-s model, the modified model′s size increased by only 4.6 MB, while precision improved by 5.1 percentage points, and mAP@0.5 rose by 4 percentage points. The improved YOLOv8-s outperforms other detection models, significantly enhancing target detection accuracy in sonar images.