# Multi-Scale Flame Situation Detection Based on Pixel-Level Segmentation of Visual Images
## 4 Experiments
### Evaluation Metrics  
The performance of the fire pixel-level segmentation models is evaluated in three aspects: segmentation accuracy, model complexity, and inference speed. Segmentation accuracy is quantified using metrics such as mean accuracy (\(mAcc\)), mean F1-score (\(mF1\)), and mean intersection over union (\(mIoU\)). Model complexity analysis aims to assess the memory requirements, which are represented by the number of learnable parameters, denoted as \(Param\). Inference speed refers to the number of image frames per second that the model detects, which is measured by frames per second (\(FPS\)). The calculation processes for each metric are detailed below. \(mAcc\) represents the average ratio of the number of correctly predicted pixels for each category to the number of true pixels in that category. It is calculated as follows:  
\[mAcc=\frac{1}{c}\sum_{i=1}^{c}\frac{TP_{i}}{TP_{i}+FP_{i}+TN_{i}+FN_{i}} \tag{33}\]  
where \(c\) is the number of categories. \(TP_{i}\) (true positive) represents the number of pixels correctly classified by the model as category \(i\) out of the pixels belonging to category \(i\). \(FP_{i}\) (false positive) is the number of pixels incorrectly classified by the model as category \(i\) out of the pixels not belonging to category \(i\). \(TN_{i}\) (true negative) indicates the number of pixels correctly classified by the model as not belonging to category \(i\) out of the pixels not belonging to category \(i\). \(FN_{i}\) (false negative) is the number of pixels incorrectly classified by the model as not belonging to category \(i\) out of the pixels belonging to category \(i\). \(mF1\) calculates the average F1-score for each category, as a measure of the classification or segmentation model performance. The F1-score is the harmonic mean of precision and recall. \(mF1\) is computed by the formula  
\[mF1=\frac{1}{c}\sum_{i=1}^{c}F1_{i}=\frac{1}{c}\sum_{i=1}^{c}\frac{2\times prec _{i}\times rec_{i}}{prec_{i}+rec_{i}} \tag{34}\]  
where \(prec_{i}\) and \(rec_{i}\) denote the precision and recall of class \(i\), respectively. They are defined, respectively, as  
\[prec_{i}=\frac{TP_{i}}{TP_{i}+FP_{i}} \tag{35}\]  
\[rec_{i}=\frac{TP_{i}}{TP_{i}+FN_{i}}. \tag{36}\]  
The intersection over union (\(IoU\)) is a commonly employed evaluation metric for image segmentation tasks.It measures the ratio of the intersection area between the predicted  
Figure 8: Several images in FLAME dataset along with their corresponding segmentation results. The first row displays the original images, while the second row shows the segmentation results. Flame pixels are highlighted in green, while background pixels remain uncolored, consistent with the original image. and labeled regions to the total area covered by both regions. \(IoU\) is expressed by the following equation:  
\[IoU=\frac{|PT\cap GT|}{|PT\cup GT|} \tag{37}\]  
where \(PT\) is the set of pixel locations within the predicted region, and \(GT\) represents a set of pixel locations within the true labeled region. In the case of multiple classifications, the above equation is extended to \(mIoU\) by averaging the IoU values for each category:  
\[mIoU=\frac{1}{c}\sum_{i=1}^{c}IoU_{i}=\frac{1}{c}\sum_{i=1}^{c}\frac{TP_{i}}{ TP_{i}+FP_{i}+FN_{i}} \tag{38}\]  
where \(IoU_{i}\) is the intersection ratio of category \(i\). The task of flame segmentation is a binary classification problem, and the pixels in the flame image are divided into two classes: flame and background. Therefore, for the above three metrics, \(c=2\). The count of parameters in a model encompasses all trainable elements, including convolutional kernel weights, weights in fully connected layers, and others.