# Fire Detection and Geo-Localization Using UAV's Aerial Images and Yolo-Based Models
## 6 Geo-Localization
### Calibration Process  
The calibration procedure relied on a MATLAB application known as the Stereo Vision Camera Calibrator, which incorporates the OpenCV library along with other libraries frequently employed for intricate mathematical operations and specialized functions on arrays of varying dimensions. These libraries also facilitate data management and storage derived from various calibration processes. The core calibration steps were carried out \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline
**Model** & **Class** & **Precision** & **Recall** & **mAP50** & \begin{tabular}{c} **Macro-avg** \\ **Precision** \\ \end{tabular} & \begin{tabular}{c} **Macro-avg** \\ **Recall** \\ \end{tabular} & \begin{tabular}{c} **F1-Score** \\ \end{tabular} & \
\begin{tabular}{c} **Harmonic** \\ **Mean** \\ \end{tabular} &
\begin{tabular}{c} **Arithmetic** \\ **Mean** \\ \end{tabular} \\ \hline \multirow{3}{*}{YOLOv4-tiny} & Fire & 0.58 & 0.61 & 0.66 & & & & & & \\ \cline{2-9}  & Non-Fire & 0.72 & 0.71 & 0.72 & 0.61 & 0.60 & 0.61 & 0.58 & 0.6 \\ \cline{2-9}  & Smoke & 0.54 & 0.48 & 0.51 & & & & & \\ \hline \multirow{3}{*}{YOLOv5-s} & Fire & 0.62 & 0.66 & 0.68 & & & & & \\ \cline{2-9}  & Non-Fire & 0.73 & 0.72 & 0.75 & 0.63 & 0.62 & 0.62 & 0.60 & 0.62 \\ \cline{2-9}  & Smoke & 0.55 & 0.47 & 0.50 & & & & & \\ \hline \multirow{3}{*}{YOLOv8-s} & Fire & 0.64 & 0.67 & 0.70 & & & & & \\ \cline{2-9}  & Non-Fire & 0.76 & 0.76 & 0.83 & 0.67 & 0.64 & 0.65 & 0.62 & 0.64 \\ \cline{2-9}  & Smoke & 0.60 & 0.50 & 0.54 & & & & & \\ \hline \multirow{3}{*}{YOLO-NAS-s} & Fire & 0.67 & 0.71 & 0.73 & & & & & \\ \cline{2-9}  & Non-Fire & 0.81 & 0.78 & 0.87 & 0.70 & 0.66 & 0.68 & 0.63 & 0.66 \\ \cline{1-1} \cline{2-9}  & Smoke & 0.63 & 0.48 & 0.53 & & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: YOLO models evaluation results. using the OpenCV library, renowned for its potent computer vision capabilities, encompassing a range of functions pertaining to calibration procedures and a suite of tools that expedite development. In this work, the MATLAB toolboxes [41; 42] were harnessed. These toolboxes offer intuitive and user-friendly applications designed to enhance the efficiency of both intrinsic and extrinsic calibration processes. The outcomes derived from the MATLAB camera calibration toolbox are presented in subsequent sections. The stereo setup consisted of two identical cameras with uniform specifications, positioned at a fixed distance from each other. As depicted in Figure 5, the chessboard square dimensions, serving as the input for the camera calibration, needed to be known (in our instance, it was 28 mm). Upon image selection, the chessboard origin and X, Y directions were automatically defined. Subsequently, exporting the camera parameters to the MATLAB workspace was essential for their utilization in object localization. The outcomes of the simulations yielded the essential camera parameters, such as the focal length, principal point, radial distortion, mean projection error, and the intrinsic parameters matrix. The focal length and principal point values were stored within a 2 \(\times\) 1 vector, while the radial distortion was contained within a 3 \(\times\) 1 vector. The intrinsic parameters, along with the mean projection error, were incorporated into a 3 \(\times\) 3 matrix. These parameters are provided in Table 2.