Small-Sample Underwater Sonar Object Detection with CLAHE and P3-Branch Attention Enhancement for YOLOv8n
Abstract
Underwater sonar images commonly exhibit low contrast, weak textures, blurred boundaries, and background reverberation, while limited annotated data further restricts the feature-learning capability of deep detection models. To address these problems, this paper proposes an improved YOLOv8n-based sonar object detection method combining contrast enhancement and localized attention. Contrast-limited adaptive histogram equalization (CLAHE) is applied during preprocessing to enhance target echoes, shadows, and boundary information. An efficient multi-scale attention (EMA) module is then introduced into the high-resolution P3 branch of the neck to construct a C2f_EMA block for strengthening weak and small-object features. Experiments on the SCTD dataset show that CLAHE alone provides the most balanced improvement, increasing mAP50-95 from 67.5% to 70.9%. The combined CLAHE and EMA-P3 model achieves an mAP50 of 92.2% and an mAP50-95 of 71.2%, representing a 3.7-percentage-point improvement in mAP50-95 over the baseline. Compared with several YOLO-series detectors, the proposed model achieves the highest mAP50 and mAP50-95 while maintaining nearly unchanged network parameters and GFLOPs. The results demonstrate the effectiveness of input contrast enhancement and localized attention for limited-data sonar object detection, although the Recall of the combined model remains to be improved.