# Deep-Learning Integration of CNN-Transformer and U-Net for Bi-Temporal SAR Flash-Flood Detection
## 4 Results and Discussions
### Comparison of Computational Efficiency  
The assessment of computational efficiency reveals trade-offs between model complexity and performance, affecting deployment in resource-limited settings (Table 4). Conventional CNN architectures show excellent efficiency, with the 2D single-layer model needing only 2386 parameters (0.03 MB) and achieving an inference time of 0.0181 s per batch. The 3D CNN variants have a slight increase in parameters (4306-9618) while maintaining competitive inference speeds, demonstrating effective use of the temporal dimension. However, this efficiency correlates with lower accuracy compared to attention-based methods.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Model**} & \multirow{2}{*}{**\# Layers**} & \multirow{2}{*}{**\# Parameters**} & **Trainable** & **Model** & **Inference** & **Batch** \\  & & & **Parameters** & **Size (MB)** & **Time** & **Time** \\  & & & & **Batch (64) (s)** & **(Batch 64) (s)** \\ \hline CNN 2D-1 Layer & 4 & 2386 & 2386 & 0.03 & 0.0232 & 634.62 \\ \hline CNN 2D-2 Layers & 5 & 4754 & 4754 & 0.04 & 0.0181 & 495.86 \\ \hline CNN 3D-1 Layer & 4 & 4306 & 4306 & 0.03 & 0.0218 & 590.25 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Comparison of computational efficiency of the proposed and baseline models for flood detection based on the Erbil dataset.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Method** & **Kappa** & **OA** & **\(F1\) Score** & **mIoU** \\ \hline CNN 3D-1 Layer & 0.911 & 0.959 & 0.937 & 0.882 \\ \hline U-Net & 0.927 & 0.955 & 0.932 & 0.877 \\ \hline CNN 3D-2 Layers & 0.930 & 0.955 & 0.932 & 0.878 \\ \hline ViT & 0.945 & 0.961 & 0.941 & 0.896 \\ \hline Hybrid CNN & 0.936 & 0.962 & 0.942 & 0.894 \\ \hline CNN–Transformer & 0.958 & 0.968 & 0.952 & 0.915 \\ \hline
**CCT-U-ViT (ours)** & **0.969** & **0.979** & **0.966** & **0.933** \\ \hline \hline \end{tabular}
\end{table}
Table 3: _Cont._Transformer-based architectures require more computation, with ViT needing 372,770 parameters (1.57 MB) and the slowest inference time at 0.0383 s per batch, highlighting the quadratic complexity of self-attention. In contrast, the CNN-Transformer hybrid balances performance, having 407,683 parameters (1.64 MB) and faster inference (0.0231 s) than pure ViT, illustrating the benefits of convolutional inductive biases. U-Net shows moderate complexity with 237,946 parameters (1.12 MB) and competitive speed (0.0233 s), making it suitable for accuracy and efficiency. The CCT-U-ViT is the most complex architecture, with 669,482 parameters (2.82 MB) and an inference time of 0.0258 s per batch, positioned between pure transformers and hybrids in computational cost. Despite its size, CCT-U-ViT offers an excellent accuracy-efficiency balance, with only an 11% slower time than the fastest transformer method (CNN-Transformer), achieving greater accuracy. The parameter-to-performance ratio indicates CCT-U-ViT gains a 0.145% accuracy enhancement per additional 1000 parameters compared to CNN-Transformer, demonstrating effective model capacity use for flood detection. Operationally, the model's 2.82 MB size is feasible for modern systems, and its sub-second inference allows real-time processing of satellite imagery for emergency response.