## 3 Proposed Model
### Improving Recall Through the Application of Loss Functions  
This study investigates appropriate analysis methods for detecting damage in structural environments such as railway bridges. In UAV-acquired imagery, the majority of the pixels often represent background rather than damage regions. Therefore, it is crucial to focus on adjusting the learning weights associated with background classes, which are typically classified as non-damage.  
Conventional analysis models using loss functions, such as Binary Cross-Entropy (BCE), distinguish between damage and non-damage by training on binary classifications. However, such methods are often limited by class imbalance issues, especially when the background is introduced as an additional class. To address this, the Focal Loss function was employed, which penalizes the model more heavily for misclassified damage regions while reducing the loss contribution from easily classified background samples. This mechanism reduces the learning rate for well-classified examples and increases the emphasis on harder, misclassified instances.  
[PERSON] [26] compared various U-Net-based approaches using Focal Loss, Dice Loss, and hybrid loss functions to improve feature extraction in complex backgrounds. The study concluded that hybrid loss functions are more suitable for foreground detection tasks. In this study, Focal Loss and Intersection over Union (IoU) Loss functions were applied and comparatively evaluated to determine the most effective approach for multi-class damage detection in railway bridge structures.  
Conventional object detection models typically rely on binary cross-entropy (BCE) loss for classification. However, this approach is prone to performance degradation in scenarios involving significant class imbalance, as is often the case in structural damage datasets. In particular, easily classified negative samples (i.e., background) tend to dominate the training process, thereby diminishing the model's sensitivity to rare or subtle damage classes. To mitigate this issue, Focal Loss was introduced by [PERSON] et al. [27], incorporating a modulating factor that reduces the relative loss contribution of well-classified examples. The mechanism involves applying both a weighting factor (\(\alpha\)) and a scaling exponent (\(\gamma\)), which allow the model to focus more effectively on hard-to-classify samples. In this study, we implemented Focal Loss in conjunction with a U-Net architecture to improve the model's capability in detecting minority damage classes under challenging environmental conditions.  
In addition to classification loss optimization, we explored IoU (Intersection over Union) Loss, also referred to as Jaccard Loss, as a spatially aware evaluation metric. IoU Loss measures the degree of overlap between predicted and ground-truth segmentation masks, offering a more holistic assessment of model performance in pixel-wise tasks [28]. Unlike traditional pixel-wise losses, IoU Loss does not require explicit balancing between foreground and background and instead operates on the geometrical congruence of predicted masks. This makes it particularly useful for semantic segmentation tasks involving multi-class surface defects. Both Focal Loss and IoU Loss were incorporated into our multi-class U-Net training pipeline. Comparative experiments showed that their integration substantially improved the recall and segmentation accuracy for low-frequency damage classes.