# RHS-YOLOv8: A Lightweight Underwater Small Object Detection Algorithm Based on Improved YOLOv8
## 4 Analysis and Discussion of Experimental Results
### Visualization and Analysis  
To further validate the model effect, underwater detection images in several different scenarios were sampled and tested, and the visualization results on the DUO dataset are shown in Figure 10 (where the leftmost side is the test sample and the right side is the detection results of each model). As shown in Figure 10, YOLOv5, v7-tiny, and v8 have the problem of missed detection in scenes where the targets are occluded, while the improved model is able to recognize these targets. In the scene with complex background, YOLOv5 and YOLOv8s have missed detection of larger but less recognizable scallops and smaller sea cucumbers that are closer in color to the environment in the silt zone of the seabed in the picture, and the accuracy of the detection is low, while both models s and l of the improved model are able to detect \begin{table}
\begin{tabular}{l c c c c c} \hline \hline
**Models** & **GFLOPs** & **P** & **R** & **[EMAIL_ADDRESS]** & **FPS** \\ \hline Faster R-CNN & 119.0 & 0.722 & 0.686 & 0.653 & 38 \\ RetinaNet & 74.6 & 0.693 & 0.653 & 0.639 & 113 \\ YOLOv5s & 16.4 & 0.835 & 0.772 & 0.810 & 161 \\ YOLOv5m & 50.3 & 0.859 & 0.819 & 0.816 & 129 \\ YOLOv5l & 114.1 & 0.863 & 0.822 & 0.825 & 107 \\ YOLOv7-tiny & **13.1** & 0.842 & 0.795 & 0.793 & **178** \\ YOLOv8s & 32.5 & 0.848 & 0.784 & 0.846 & 158 \\ YOLOv8m & 78.7 & 0.857 & 0.806 & 0.860 & 120 \\ YOLOv8l & 164.9 & 0.862 & 0.817 & 0.871 & 85 \\ RHS-YOLOv8s (ours) & 31.8 & 0.852 & 0.791 & 0.862 & 161 \\ RHS-YOLOv8m (ours) & 76.1 & 0.860 & 0.821 & 0.881 & 123 \\ RHS-YOLOv8l (ours) & 148.5 & **0.866** & **0.822** & **0.885** & 94 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: The results of each model on the RUOD dataset. Figure 10: Visual comparison of object detection effects: the three rows of results are for scenes with occluded objects, scenes with complex backgrounds, and scenes with a high concentration of small objects, respectively. them, with the latter having a higher accuracy rate. In the scenario of dense small targets, the improved RHS-YOLOv8l improves the accuracy of detecting small objects by 15%, 10%, and 6% compared to YOLOv5, v7-tiny, and v8s, respectively. Then, we further quantified the effect of background complexity on detection accuracy by defining the background complexity score using the texture complexity, color diversity, and background object density of the image, and analyzing the test samples in groups; the complexity layers of the background environments of the three test samples selected are, in order, low complexity, high complexity, and medium complexity. It can be seen that the confidence scores of our improved model in the low-complexity environment compared to the prediction frames of the other algorithms do not differ much, i.e., 0-0.2, whereas in the group of test results in the medium-complexity background, the difference in confidence scores, for example, in the case of sea urchins, comes to 0.2-0.3, and in the second group, which has the highest complexity in the background, the difference in confidence scores comes to 0.5-0.8. It can be seen that the detection performance of all models decreases as the background complexity score increases. However, the decrease in performance of RHS-YOLOv8 in complex backgrounds is significantly smaller than that of YOLOv5, v7-tiny, and the base model of YOLOv8. Especially in the group with the highest background complexity, the confidence score of the prediction frames of RHS-YOLOv8l is still maintained at 0.8, which is significantly better than that of the base model, 0.3. This result indicates that the confidence scores of the Ref-Dilated block and HBPFN are designed to effectively enhance the feature capture of the object, while suppressing the noise interference in the complex background, and have strong adaptability to complex background interference.