## 6 Results and Discussion
### Results Detecting the Thermal Defects of the Images  
When evaluating an algorithm in the context of object detection, some concepts and metrics should be properly defined forehand. Intersection Over Union \((IOU)\) is measured based on Jaccard Index that evaluates the overlap between two bounding boxes. It requires a ground truth bounding box and a predicted bounding box. \(IOU\) is calculated as the area of the overlap divided by the area of the union. By comparing the \(IOU\) with a given threshold \(t\), a detection can be classified as being correct or incorrect. In this context, a \(TP\) is considered as a correct detection of a ground-truth bounding box (detection with \(IOU>t\)), a \(FP\) is considered as an incorrect detection of a nonexistent object or a misplaced detection of an existing object (detection with \(IOU<t\)), and \(FN\) is considered as an undetected ground-truth bounding box. It is important to note that, in the object detection context, a \(TN\) result does not apply, as there is an infinite number of bounding boxes that should not be detected within any given image. For evaluating the algorithm, the threshold \(t\) was set to 50%. The standard metrics are precision and recall in order to evaluate an object detection algorithm [32]. Precision is the ability of a model to only identify the relevant objects. It is the percentage of correct positive predictions. Recall is the ability of a model to find all of the relevant cases (all ground truth bounding boxes). It is the percentage of true positive detected among all relevant ground truths. A Precision of 0.976 and a Recall of 0.923 are achieved detecting the thermal defects of the images. Figure 14 provide a qualitative perspective of the results included in these previous subsections. More specifically, in Figure 13(a), the results detecting the thermal defects are shown. In can be seen that all of the thermal defects are identified. Additionally, the image has also been classified as correct, because the calculated error after correcting the perspective of all the identified PV panels is low. Figure 13(b) shows two images without thermal defects, reflecting that the operator will only review positive images (containing defects) and, hence, will not review negative images. Figure 13(c) shows two images where the processing procedure calculated a high error when correcting the perspective of the detected PV panels. In both cases, the images do not contain full PV panels. In Figure 13(c), the first image corresponds to the background. Many images captured by the UAV only contains background. Additionally, Figure 13(c) shows a second image where not the \begin{table}
\begin{tabular}{c c} \hline \hline
**Metric** & **Value** \\ \hline True Positive (TP) & 80 \\ True Negative (TN) & 241 \\ False Positive (FP) & 3 \\ False Negative (FN) & 2 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Contingency table for the binary classification of the images. PV panels are fully registered. In both cases, the processing procedure does not continue processing the images. The proposed algorithm can provide state-of-the-art results in the context of detecting, classifying and geopositioning thermal defects. Based on the review of the literature, and as far as the authors know, this is the first time that the surface of the panels is detected. This way, all of the thermal defects that can be potentially detected by the next steps of the proposed system are located inside the panels. Hence, many false-positive thermal anomalies can be efficiently eliminated. Moreover, this is also the first time that the panels are perspective corrected. Applying perspective correction,  
Figure 14: Results of the fault detection procedure. (**a**) Detection of the thermal defects, (**b**) Images without thermal defects. (**c**) Images with high error when correcting the perspective. the geometry of the thermal defect can be properly obtained. Furthermore, this is also the first time the thermal defects are automatically geopositioned.