# Estimation of River Velocity and Discharge Based on Video Images and Deep Learning
## 3 Results and Discussion
### Model Performance Comparison
#### 3.2.2 Ablation Experiment  
In order to facilitate the ablation experiments, we designed models 0 to 3. The basic structure of the module for model 0 is shown in Figure 8a, while the basic structure of the modules for models 1 to 3 is shown in Figure 8b.  
Model 0 is the original ShuffleNetV2_2.0, model 1 only reduces the \(1\times 1\) convolution in the main branch of the downsampling unit and basic unit, model 2 enlarges the DWConv  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Model** & **TOP1/\%** & **TOP5/\%** & **Params/M** & **FLOPs/G** \\ \hline ShuffleNetV2\_0.5 & 51.36 & 85.12 & 0.43 & 0.04 \\ ShuffleNetV2\_1.0 & 53.09 & 85.86 & 1.35 & 0.16 \\ ShuffleNetV2\_1.5 & 55.62 & 87.10 & 2.59 & 0.32 \\ ShuffleNetV2\_2.0 & 58.70 & 89.81 & 5.56 & 0.63 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Experimental results of ShuffleNetV2 series.  
Figure 8: Module structure improvement of ShuffleNetV2_2.0. (**a**) Module structure of model 0; (**b**) module structure of models 1 to 3.  
kernel from 3 \(\times\) 3 to 5 \(\times\) 5 based on model 1, and model 3 increases BAM attention based on model 2. The ablation experiments are conducted and the results are detailed in Table 3, where Lite_1 \(\times\) 1 means to delete the 1 \(\times\) 1 convolution operation, K_size = 5 means to change the DWConv kernel to 5 \(\times\) 5, and \"\(\surd\)\" indicates that this operation is performed.  
It is noticeable that the performance of the model is gradually improved with the addition of each improvement factor. To be specific, model 1 exhibits a reduction of 27.52% in the number of parameters and 34.92% in the number of FLOPs compared to model 0 and the accuracy of model 2 is increased by 2.97% and 0.81%, respectively, on the original basis. Model 3 integrates all the improvement factors, resulting in a significant improvement in performance. The TOP1 accuracy is increased by 5.99%, the TOP5 accuracy is improved by 0.75% over the original ShuffleNetV2_2.0, and the numbers of parameters and calculations are reduced by 20.14% and 34.92%, respectively. All in all, deleting 1 \(\times\) 1 convolution, enlarging the DWConv kernel, and introducing BAM attention all significantly enhance the classification performance, proving that the improved methods are effective.  
In addition, in order to further verify the superiority of the BAM attention mechanism in improving the model effect, a comparison experiment was conducted between BAM attention mechanism and the Efficient Channel Attention (ECA) [23], the Convolutional Block Attention Module (CBAM) [24], and the Squeeze-and-Excitation (SE) [25] attention mechanisms, and the experimental results are shown in Table 4.  
The experimental results show that the addition of various attention mechanisms to model 2 has different effects on the classification performance. In particular, the BAM attention mechanism is the most effective. In contrast, the performance of ECA and CBAM attention in this experiment is not as good as that of the basic model, while the SE attention mechanism has some performance improvement, but the effect is still not as good as BAM. The BAM attention mechanism enhances the ability to extract different image features more effectively than other attention mechanisms, while ignoring those with less correlation. Although there is a slight increase in parameters and computation with the addition of BAM, the increase is worthwhile.