## 3 Results and Discussion  
### Training and Test Results for Deep Learning Models  
The deep learning models YOLOv8 and YOLOv8-seg were used to effectively detect the flame objects and segment the flame regions, respectively. A dataset with 30,500 images was constructed for training and validation; representative images from the dataset are shown in Figure 5a. The dataset included fire images from various scenarios (such as building, forest, outdoor, and indoor fires) and non-fire images (such as various normal scenes, sunsets, night scenes, and artificial lighting) to enhance the robustness of the model. As illustrated in Figure 5b, annotation of flame objects was required for all training  
Figure 4: Photographs for fire experiments with various combustibles: (**a**) one box, (**b**) four boxes, (**c**) one wood crib, (**d**) four wood cribs, (**e**) corn oil in Calphalon® pan, and (**f**) corn oil in aluminum pan [37].  
data. Therefore, bounding-box annotations were applied for the object detection model (YOLOv8), and polygon-based pixel-level annotations were applied for the segmentation model (YOLOv8-seg). Transfer learning was conducted to effectively optimize the deep learning models for fire applications. Furthermore, hyperparameter tuning was performed, resulting in optimized YOLOv8 and YOLOv8-seg models with the best prediction accuracy.  
A test dataset comprising 1000 images was constructed to evaluate the flame detection performance of YOLOv8, which served as the base object detection model used in the YOLO-YCbCr model. This dataset included both fire and non-fire scenes from various environments. The evaluation results showed that the model achieved a precision (ratio of correctly detected flames to all detected flames) of 90.7% and a recall (ratio of correctly detected flames to all actual flames) of 90.2%. The mAP was 95.6%, indicating a high level of accuracy in flame detection. Before applying the HRR prediction model, the segmentation accuracy and robustness of the YOLO-YCbCr and YOLO-seg models were evaluated using the same test dataset. As shown in Figure 6, the mean IoU values were 64.4% and 72.5% for the YOLO-YCbCr and YOLO-seg models, respectively, indicating that the YOLO-seg model achieved approximately 8.1% higher segmentation accuracy. Analyzing the flame segmentation results from the two models revealed differences in their segmentation characteristics and performance based on the size and shape of the flame. For large and clear flames, the IoU value was greater for the YOLO-seg model than for the YOLO-YCbCr model. This can be attributed to the YOLO-seg model's characteristic of segmenting irregular and complex object shapes in a simple and blunt manner. Consequently, the YOLO-seg model overestimated the actual flame area (ground truth), which led to fewer undetected flame regions and, therefore, relatively higher IoU values. In contrast, for small and complex-shaped flames, the YOLO-YCbCr model exhibited excellent segmentation performance due to its pixel-level segmentation of flame regions using color-based rules. Therefore, in fire images with highly irregular and complex flame shapes, the YOLO-YCbCr model provided more precise flame segmentation than the YOLO-seg model. However, there are limitations to perfectly segmenting flame regions that have a wide range of colors using color-based rules. These limitations result in certain flame pixels being inadequately segmented, thereby leading to relatively low IoU values for the YOLO-YCbCr model.  
Figure 5: Representative images for the (**a**) training image dataset and (**b**) annotations.