## 5 Model Application
### Results  
Figure 16 shows three inference results (EX1 to EX3) where the classified instances are similar to the ground truth. Example 1 demonstrates the detection of small instances under normal lighting conditions, showing a successful inference given the similarity between the prediction and the ground truth. Example 2 shows a situation where a small dark spot was mistaken for corrosion, but all other instances, also of reduced size, were correctly detected. The several identified corrosion points are located at the ends/contours of the plates (in the intersection between panels), which illustrates that the difficult conditions in which the algorithm demonstrated assertiveness. It should also be noted that the roofing shape used in the prediction image is slightly different from the geometries used in training. Finally, Example 3 shows situations in which the model detected small instances at the edges of the roofing system and in poor lighting conditions (shadow zones). The algorithm successfully identified all the marked instances and even detected unlabelled corrosion by extrapolation.  
Figure 17 shows three examples of inferences (EX1 to EX3) in the presence of complex backgrounds. In Example 1, the instances were successfully predicted, even with two similar roofing systems and some shading. The fiber cement roofing system has a texture that seems like a corrosion anomaly. However, no false positives were produced. Example 2 successfully identifies small and large instances under complex backgrounds. This identification is challenging because it is an interface region with a fiber cement roofing  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Precision Metric** & **(\%)** \\ \hline \(\text{AP}_{50}\)\(\text{Detect}\) & 65.1 \\ \(\text{AP}_{50}\)\(\text{Segm}\) & 59.2 \\ \(\text{AP}_{\text{L}}\)\(\text{Detect}\) & 35.6 \\ \(\text{AP}_{\text{L}}\)\(\text{Segm}\) & 28.2 \\ \hline \hline \end{tabular}
\end{table}
Table 8: Precision metrics values for the test dataset.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Number of Samples** \\ \hline True positives & 2514 \\ False negatives & 445 \\ False positives & 515 \\ \hline \hline \end{tabular}
\end{table}
Table 9: Results of each classified instance of the dataset.  
system, with some visible dirt over the metallic plates and under different lighting conditions. Finally, example 3 illustrates the detection capability of the algorithm in a complex background with several debris and under quite distinct lighting conditions.  
Figure 18 shows two examples (EX1 and EX2) where corrosion instances occur in areas outside the roofing system. In both situations, the model did not produce any false positives in not labeled elements with corrosion since they were not part of the roofing system. This is the case of the protection grid of a rainwater culvert located in an adjacent street, in the case of Example 1, and on roofing elements that are not metallic plates but are located close to them (e.g., metallic inclined hangers and other types of roofing system), in the case of Example 2.  
Figure 16: Examples of classification with small instances/poor illumination conditions (EX1 to EX3): (**a**) original image, (**b**) ground truth, and (**c**) prediction.  
Figure 17: Examples of classification with complex backgrounds (EX1 to EX3): (**a**) original image, (**b**) ground truth, and (**c**) prediction.  
Figure 18: Examples of no classification in the presence of corrosion outside the area of the roofing system (EX1 and EX2): (**a**) original image, (**b**) ground truth, and (**c**) prediction.