# GCBAM-UNet: Sun Glare Segmentation Using Convolutional Block Attention Module
## 4 Experiments and Analysis
### Comparison Results  
To evaluate the performance of our model GCBAM-UNet during training, we plot the accuracy and loss training curves. As shown in Figure 5, both training and validation accuracy values increase and try to converge to higher values. Also, training and validation accuracies keep increasing which indicates that the model did not encounter overfitting.  
Moreover, Figure 6 depicts the training and validation losses that decreased and converged to low values. The best model is achieved at epoch 58, where the validation loss converges to a low value without significantly diverging from the training loss. The best model is not just about the highest accuracy or lowest loss but also factors in model interpretability and how well it generalizes to new data.  
Also, the dataset was collected taking into consideration some lighting conditions. In effect, GCBAM-UNet was trained and evaluated on data representing a wide range of illumination scenarios, including direct sunlight, overcast conditions, and varying intensities of glare. This diverse training ensures that the model can generalize well to real-world environments and maintain a robust performance despite challenging and unpredictable lighting variations. By focusing on both spatial and channel-wise attention, GCBAM-UNet effectively adapts to these dynamic lighting conditions, demonstrating improved segmentation accuracy and resilience compared to traditional methods.  
[PERSON] and [PERSON] (2019) developed a dataset for sun glare detection using images from various cameras and adapted the U-Net architecture to create an optimized glare segmentation network. As shown in Table 3, when comparing GCBAM-UNet to their approach, our model outperforms theirs by 4.47% in AC and 32.57% in SE.  
Figure 5: The training accuracy of GCBAM-UNet.  
To validate our approach, we compared GCBAM-UNet against baseline models such as SegNet [43] and U-Net with standard attention mechanisms [44]. These comparisons were conducted to assess the effectiveness of our proposed model in handling the challenges of sun glare segmentation.  
The experimental results demonstrated that GCBAM-UNet consistently outperformed both SegNet and U-Net with standard attention mechanisms across all metrics. The CBAM module's ability to dynamically refine spatial and channel features enabled GCBAM-UNet to achieve superior segmentation performance, especially under challenging lighting conditions.  
Figure 7 depicts the outcomes of the model's segmentation. GCBAM-UNet exhibits a superior ability to segment glare-affected regions with sharp and accurate boundaries. The integration of the CBAM module ensures that the model focuses on critical spatial and channel features, leading to well-defined segmentation results even in challenging scenarios where glare intensity transitions are subtle. Compared to the baseline models SegNet and U-Net with standard attention mechanisms, GCBAM-UNet delivers cleaner separations between glare and non-glare regions.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Methods** & **AC** & **DC** & **JI** & **SE** & **SP** \\ \hline SegNet [43] & 92.31 & 75.26 & 48.50 & 78.70 & 99.28 \\ UNet with Attention [44] & 91.95 & 73.67 & 49.86 & 78.91 & 98.83 \\ Esfahani and Wang [33] & 88.31 & – & – & 57.56 & – \\ GCBAM-UNet & 92.78 & 86.09 & 66.52 & 90.13 & 99.21 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Comparison results (in %).  
Figure 6: The training loss of GCBAM-UNet.  
Figure 7: Segmentation outcomes of our proposed model compared to the SegNet model and UNet with attention mechanisms.