# RHS-YOLOv8: A Lightweight Underwater Small Object Detection Algorithm Based on Improved YOLOv8
## 1 Introduction
For underwater object detection in the field of single-stage modeling, [PERSON] [24] and others proposed the SSD model, which uses feature maps at different scales to detect targets, improving the detection speed and the effect of small-target detection while maintaining high efficiency. However, SSD is poorly adapted to high-density backgrounds and is prone to miss detecting objects in noisy backgrounds, and the efficiency of the model decreases at larger image sizes. The RetinaNet model proposed by [PERSON] [25] et al. introduces Focal Loss to alleviate the positive and negative sample imbalance problem, which improves the performance of the single-stage detection model with small and sparse objects, making it more accurate when detecting small objects in complex underwater backgrounds. However, the RetinaNet network is deeper and has a higher demand for computational resources; thus, it is deficient in real-time performance. DETR, proposed by [PERSON] [26] et al., utilizes the Transformerstructure for object detection, which avoids the step of region proposal generation, resulting in the model's robustness in complex scenes and improves the model's feature extraction capability in complex backgrounds. However, the training cost of the model is very high, and it is highly dependent on a substantial amount of data. In the case of underwater data scarcity, the effect of DETR is difficult to guarantee, and at the same time, its inference speed is slow, which is not suitable for underwater tasks with high real-time requirements. [PERSON] [27] et al. improved upon YOLOv5 by enhancing the Path Aggregation Network (PANet) for multi-scale feature fusion, enabling the model to focus on combining the most relevant resolution features. Additionally, they introduced an improved confidence loss function, tailored to different detection layers, which encourages the network to prioritize learning high-quality positive anchor frames, thereby enhancing its object detection capabilities. However, the model remains large and does not fully meet the efficiency requirements for underwater detection tasks. [PERSON] [28] et al. introduced the Convolutional Block Attention Module (CBAM) [29] in YOLOv7 and proposed a detection model suitable for object detection in underwater environments, which has stronger feature extraction capability and better detection speed in underwater scenes. However, CBAM contains two modules, channel and spatial attention, each of which needs to compute the global information of the feature map, thus introducing additional computational overhead and memory requirements. In large networks or real-time applications, this leads to a decrease in model speed and is not favorable for deployment to devices with limited computational resources. [PERSON] [30] et al. used FasterNet-T0 [31] instead of the backbone of YOLOv8 to obtain faster training speed and fewer model parameters, but with a greater loss in detection accuracy. Based on the above analysis, the current research still suffers from the problems of more complex algorithms and lower detection accuracy, and some of the research, even though it improves the detection accuracy, is not enough to satisfy the demand for high real-time performance and light computational overhead for underwater target detection. To efficiently and accurately recognize the object marine organisms in underwater images in complex environments, a lightweight and improved RHS-YOLOv8 detection algorithm is proposed, and the main contributions of this paper are as follows:  
* A new Ref-Dilated block is redesigned to replace the original bottleneck block in the C2f module of YOLOv8 [32], which combines the multi-scale receptive field of the cavity convolution and the strong feature extraction capability of RefConv, so as to satisfy the detection model's feature extraction and multi-scale feature fusion capability, and the computation amount is greatly reduced.