# YOLO-PWSL-Enhanced Robotic Fish: An Integrated Object Detection System for Underwater Monitoring
## 4 Discussion  
The YOLO-PSWL object detection algorithm proposed in this study employs a local-global feature fusion block (LGFB) to achieve multi-level feature fusion, significantly enhancing the model's detection capabilities in turbid and occluded environments. The LGFB mechanism leverages local attention to capture detailed features while using global attention to correlate fish bodies with their surrounding environment, thereby suppressing folding and dense interference. Additionally, the algorithm incorporates shape constraints (ShapeIoU) into Wise-IoU and introduces a dynamic weighting strategy, significantly improving the localization accuracy of irregular fish shapes. By replacing standard convolutions with PConv convolutions, which only use effective pixels for computation, the model achieves higher accuracy while reducing the number of parameters. The multiple experiments in Tables 2-4 fully validated the effectiveness of each improved module, while the ablation experiments in Table 5 validated the effectiveness of the improved model, whose detection accuracy appeared to be significantly better than that of the previous algorithm model. Although the dual-branch attention mechanism and feature concatenation fusion operation of LGFB slightly increase the computational overhead, their impact on the model's overall computational cost is limited. More importantly, PConv uses selective convolution without additional branches, which not only does not increase FLOPs but also significantly reduces them. Therefore, the application of PConv effectively suppresses the computational cost increase caused by LGFB. As verified in Figure 12, this model can effectively improve the detection capabilities in complex environments, with folding and dense fish schools. However, it still requires a large amount of computational resources. Its various functions significantly affect the overall real-time performance. To achieve lower costs, it needs to be further lightweighted. This method was used in a biomimetic robotic fish system produced using 3D printing technology. It generates thrust by periodically inducing oscillations of the tail fin composed of two rudders, thereby reducing interference with fish schools. By adjusting the duty cycle of different servos, various motion modes can be achieved. It achieves the precise control of hovering and buoyancy through a depth sensor combined with a PID algorithm, providing a dynamically stable image acquisition environment for the YOLO-PSWL algorithm. Additionally, the system is equipped with multiple water quality monitoring sensors and a folding robotic arm, enabling real-time monitoring and operations on water samples. Compared to previous systems, it offers dynamic monitoring of water quality data, more stable hovering capabilities, and the ability to match environmental conditions to specific fish species, thereby better addressing water quality pollution issues in aquaculture. In addition, we will strive to improve the waterproof performance of the bionic fish system to \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline \multirow{2}{*}{**Samples**} & \multicolumn{3}{c}{**Water Temperature (\({}^{\circ}\)C)**} & \multicolumn{3}{c}{**Water Pressure (mm)**} & \multicolumn{3}{c}{**Turbidity (ppm)**} \\ \cline{2-10}  & **Test** & **Actual** & **Error** & **Test** & **Actual** & **Error** & **Test** & **Actual** & **Error** \\ \hline
1 & 43.00 & 43.24 & 0.24 & 305 & 309 & 4 & 9.897 & 10 & 0.103 \\
2 & 40.47 & 41.12 & 0.65 & 297 & 301 & 4 & 19.905 & 20 & 0.095 \\
3 & 40.78 & 40.41 & 0.37 & 232 & 237 & 5 & 29.841 & 30 & 0.159 \\
4 & 39.46 & 39.50 & 0.04 & 182 & 188 & 6 & 39.885 & 40 & 0.115 \\
5 & 38.54 & 38.61 & 0.07 & 147 & 155 & 8 & 49.877 & 50 & 0.123 \\
6 & 35.23 & 35.43 & 0.20 & 120 & 123 & 3 & 54.844 & 55 & 0.156 \\
7 & 27.13 & 27.27 & 0.14 & 83 & 88 & 5 & 69.881 & 70 & 0.119 \\
8 & 25.02 & 25.34 & 0.32 & 45 & 43 & 2 & 74.859 & 75 & 0.141 \\
9 & 22.69 & 22.93 & 0.24 & 25 & 14 & 11 & 99.87 & 100 & 0.130 \\ \hline \hline \end{tabular}
\end{table}