# RHS-YOLOv8: A Lightweight Underwater Small Object Detection Algorithm Based on Improved YOLOv8
## 3 Experiments
### Evaluation Metrics  
To demonstrate the improvement effect of this paper more intuitively, the performance of the model is evaluated by using the FPS (Frames Per Second), GFLOPs, precision (P), recall (R), and mean Average Precision (mAP). FPS stands for the number of images processed by the model per second. FLOPs, i.e., floating point operations, refer to the number of floating-point operations performed in a computational model, including operations such as addition, multiplication, and so forth. GFLOPs are a unit of FLOPs, where 1 GFLOPs is 10\({}^{9}\) FLOPs. Usually, the computation of deep learning models mainly comes from the GFLOPs in the convolutional layer, fully connected layer, and other operations. GFLOPs are used to evaluate the computational complexity of the model. Higher GFLOPs mean that the model is more computationally intensive, which also means that the model may require a longer inference time or higher computational resources. E.g., assuming that there is a convolutional layer with input size \(W_{in}\times H_{in}\times C_{in}\) (width, height and number of channels), convolutional kernel size k \(\times\) k, and output size \(W_{out}\times H_{out}\times C_{out}\), the floating point operations of this convolutional layer are shown in Equation (16).  
\[\text{FLOPs}=W_{out}\times H_{out}\times C_{out}\times(k\times k\times C_{in}+1) \tag{16}\]  
which denotes the multiplication operation for each convolution kernel, followed by 1 because the convolution operation also contains an addition operation. Precision is used to evaluate the accuracy of the model's prediction and recall is used to evaluate the model's ability to find the correct sample. The precision and recall are shown in Equations (17) and (18).  
\[\text{P}= \frac{\text{TP}}{\text{TP}+\text{FP}} \tag{17}\] \[\text{R}= \frac{\text{TP}}{\text{TP}+\text{FN}} \tag{18}\]  
where TP is true positive, FP is false positive, and FN is false negative. Average Precision (AP) denotes the average accuracy of the model on a category, and mAP is the average of the AP values across all categories, which is used to measure the overall performance of the model on all categories, as shown in Equations (19) and (20).  
\[\text{AP}= \int_{0}^{1}\text{P}(\text{R})\text{dR} \tag{19}\]  
\begin{table}
\begin{tabular}{c c} \hline
**Environment** & **Version or Model** \\ \hline Operating system & Ubuntu 20.04.3 \\ CUDA version & 11.3 \\ CPU & Intel(R) Xeon(R) Gold 6330 \\ GPU & NVIDIA GeForce 3090(24G) \\ Python version & Python 3.9 \\ Deep learning framework & PyTorch-1.13.1 \\ \hline \end{tabular}
\end{table}
Table 1: The experimental configuration.  
\[\text{mAP}=\frac{1}{n}\sum_{i=1}^{n}\text{AP}_{i} \tag{20}\]  
The precision-recall curve P(R) in Equation (19) is defined as the interpolated precision values across varying recall levels R, where P(R) corresponds to the maximum precision achieved at any recall value greater than or equal to R. The parameter n (specified in Equation (20)) represents the total number of object categories in the dataset. [EMAIL_ADDRESS] denotes the mean Average Precision calculated with a fixed IoU (Intersection over Union) threshold of 0.5, and [EMAIL_ADDRESS]:0.95 measures the mean Average Precision by averaging results across multiple IoU thresholds, ranging from 0.5 to 0.95 with a step size of 0.05.