A vision-based fire detection method and apparatus

CN122990595APending Publication Date: 2026-10-27BEIJING UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610942890.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-26
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0005]有鉴于此,本发明提出一种基于视觉的火灾检测方法及设备,解决现有技术中需要调用深度目标检测模型对每一帧视频图像均进行深度推理导致的处理延迟、功耗升高和系统吞吐下降等问题

Benefits of technology

本发明提供一种基于视觉的火灾检测方法及设备,通过根据当前帧图像及其前一帧图像的视觉信息,确定出当前帧图像的突变显著性得分,并根据当前帧图像的历史帧统计信息,确定当前帧图像的自适应控制上界阈值,以根据自适应控制上界阈值与突变显著性得分,对当前帧图像进行异常候选帧判定,并在判定当前帧图像为异常候选帧时,对当前帧图像进行火灾检测的技术方案,能够以显著低于深度神经网络前向推理的计算代价,对相邻帧之间的火灾相关视觉变化进行快速响应,使其既具备物理可解释性,又能够作为目标检测模型调用前的有效预筛选依据,并且动态生成当前帧的自适应判定边界,能够适应不同摄像头、不同时间段、不同背景活动水平和不同光照条件下帧间变化分布不同的问题,避免了环境因素对异常帧筛选的影响,提高了异常帧筛选的准确性以及其对不同环境的适应性,减少了固定阈值对人工调参的依赖,并且本发明通过筛选出的异常帧进行火灾检测,能在保持火灾检测可靠性的同时,降低目标检测模型调用频次,减少无事件帧上的重复推理消耗,提高了边缘端视频火灾检测系统的实时性、可部署性和工程适应能力。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122990595A_ABST
    Figure CN122990595A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of intelligent security and protection, and discloses a visual-based fire detection method and device, which comprises the following steps: determining a mutation saliency score of a current frame image based on visual information of the current frame image and a previous frame image of the current frame image; determining an adaptive control upper limit threshold of the current frame image based on historical frame statistical information of the current frame image; performing abnormal candidate frame judgment on the current frame image based on the adaptive control upper limit threshold and the mutation saliency score; and performing fire detection on the current frame image in response to the judgment that the current frame image is an abnormal candidate frame. Through the above scheme, the visual change related to fire between adjacent frames can be quickly responded, the calling frequency of a target detection model is reduced, repeated reasoning consumption on non-event frames is reduced, and the adaptive judgment boundary of the current frame is dynamically generated, so that the influence of different environmental factors on abnormal frame screening can be avoided, and the accuracy of abnormal frame screening is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent security technology, and in particular to a vision-based fire detection method and device. Background Technology

[0002] Automated fire detection based on video images is an important technological direction in intelligent security, industrial park safety, warehouse fire protection, industrial production monitoring, and urban public safety. Compared with traditional point-based smoke detectors, temperature detectors, or flame detectors, video fire detection can utilize existing surveillance cameras to acquire image information over a larger spatial range, making it particularly suitable for semi-open or semi-closed scenarios with existing video surveillance infrastructure, such as industrial parks, factories, warehouses, greenhouses, and logistics centers. In recent years, with the development of publicly available flame / smoke image datasets, deep learning target detection algorithms, and edge intelligent hardware, video fire detection technology based on image processing, machine learning, and deep neural networks has become an important research direction for early fire warning.

[0003] Existing video fire detection methods primarily employ deep convolutional neural networks as their core target detection approach. For example, general-purpose target detection models such as Faster R-CNN, EfficientDet, and the YOLO series have achieved good results in various visual recognition tasks and have been widely transferred to fire detection. In the field of fire video detection, research has utilized models such as Faster R-CNN, CNN, LSTM, YOLOv3, and YOLOv8 to identify fires. These models can automatically learn high-level semantic features from complex backgrounds, exhibiting stronger feature representation capabilities compared to traditional manual rules.

[0004] The advantages of this type of method lie in its high detection accuracy, strong end-to-end capabilities, and ability to learn robust fire visual features under complex lighting conditions, different flame patterns, and diverse backgrounds. However, at the engineering deployment level, deep object detection models generally suffer from high forward inference computational overhead. If full deep inference is performed on each frame according to the native frame rate of the video stream, the system needs to continuously process high-resolution images at 25-30fps. For ordinary CPUs, low-power ARM processors, smart camera built-in chips, or edge nodes without independent GPUs, frame-by-frame deep inference can easily lead to processing latency, increased power consumption, and decreased system throughput. Summary of the Invention

[0005] In view of this, the present invention proposes a vision-based fire detection method and device, which solves the problems of processing delay, increased power consumption and decreased system throughput caused by the need to call a deep target detection model to perform deep inference on each frame of video image in the prior art.

[0006] On one hand, embodiments of the present invention provide a vision-based fire detection method, which performs the following steps on each frame of an image in a video stream: Based on the visual information of the current frame image and its previous frame image, determine the abruptness significance score of the current frame image; Based on the historical frame statistics of the current frame image, determine the adaptive control upper limit threshold of the current frame image; Based on the adaptive control upper bound threshold and the mutation significance score, the current frame image is used to determine abnormal candidate frames; In response to determining that the current frame image is an abnormal candidate frame, fire detection is performed on the current frame image.

[0007] In some implementations, the step of determining the abrupt change significance score of the current frame image based on visual information from the current frame image and its previous frame image includes: Based on the visual information of the current frame image and its previous frame image, determine the visual feature metric vector of the current frame image; Based on the visual feature metric vector of the current frame image, the abrupt change significance score of the current frame image is determined.

[0008] In some implementations, the visual feature metric vector includes hue distribution divergence, and the step of determining the visual feature metric vector of the current frame image based on visual information from the current frame image and its previous frame image includes: Construct two-dimensional joint normalized histograms of hue and saturation for the current frame image and the previous frame image, respectively; Calculate the shape distribution similarity between the two-dimensional joint normalized histogram of the current frame image and the two-dimensional joint normalized histogram of the previous frame image; Based on the shape distribution similarity, the tonal distribution divergence of the current frame image compared to the previous frame image is determined.

[0009] In some implementations, the visual feature metric vector further includes an edge density variation rate, and the step of determining the visual feature metric vector of the current frame image based on the visual information of the current frame image and its previous frame image further includes: Determine the edge maps of the current frame image and the previous frame image respectively; Based on the edge map of the current frame image and the edge map of the previous frame image, the edge density variation rate of the current frame image compared to the previous frame image is determined.

[0010] In some implementations, the visual feature metric vector further includes a global brightness mean shift, and the step of determining the visual feature metric vector of the current frame image based on the visual information of the current frame image and its previous frame image further includes: Determine the arithmetic mean vectors of the current frame image and the previous frame image in the RGB channels respectively; Based on the arithmetic mean vector of the RGB channels of the current frame image and the arithmetic mean vector of the RGB channels of the previous frame image, the global brightness mean shift of the current frame image relative to the previous frame image is determined.

[0011] In some implementations, determining the adaptive control upper bound threshold of the current frame image based on historical frame statistics of the current frame image includes: Construct a circular sliding window queue, which is used to store the abrupt change significance scores of the previous N frames of the current frame image; Based on the abrupt change significance scores of the previous N frames stored in the circular sliding window queue, the historical frame statistics of the current frame image are determined, and the adaptive control upper bound threshold of the current frame image is determined based on the historical frame statistics of the current frame image.

[0012] In some implementations, the historical frame statistics include the mean. and standard deviation The step of determining the adaptive control upper bound threshold of the current frame image based on the historical frame statistics of the current frame image includes: Based on the following formula, combined with the mean of the current frame image... and standard deviation Determine the adaptive control upper threshold of the current frame image. :

[0013] in, k This is the control factor.

[0014] In some implementations, the step of determining abnormal candidate frames for the current frame image based on the adaptive control upper bound threshold and the mutation significance score includes: Compare the mutation significance score with the upper bound threshold of the adaptive control; In response to a mutation significance score greater than the upper bound threshold of the adaptive control, the current frame image is marked as an anomalous candidate frame. In response to the mutation significance score not being greater than the upper bound threshold of the adaptive control, the circular sliding window queue is updated based on the mutation significance score of the current frame image, and the step of determining the mutation significance score of the current frame image based on the visual information of the current frame image and its previous frame image is returned, so as to perform fire detection on the next frame image.

[0015] In some implementations, the step of performing fire detection on the current frame image includes: Perform dual-class target detection of flames and smoke on the current frame image; In response to the detection of flames and / or smoke, a fire warning is triggered, and the updating of the cyclic sliding window queue is stopped.

[0016] On the other hand, embodiments of the present invention also provide a vision-based fire detection electronic device, which includes: at least one processor; and a memory storing a computer program executable on the processor, characterized in that the processor executes the steps of the method as described in any of the above embodiments when executing the program.

[0017] On the other hand, embodiments of the present invention also provide a computer storage medium, which stores a computer program that, when executed by a processor, performs the steps of the method described in any of the above embodiments.

[0018] The present invention has at least the following beneficial effects: This invention provides a vision-based fire detection method and device. By determining the abrupt change significance score of the current frame image based on visual information from the current frame and its previous frame, and by determining an adaptive control upper bound threshold for the current frame image based on historical frame statistics, the method identifies anomalous candidate frames for the current frame image based on the adaptive control upper bound threshold and the abrupt change significance score. When the current frame image is identified as an anomalous candidate frame, fire detection is performed. This technical solution can rapidly respond to fire-related visual changes between adjacent frames with a significantly lower computational cost than deep neural network forward inference, making it both physically interpretable and usable as a target image. This invention provides an effective pre-screening basis before calling the target detection model and dynamically generates adaptive judgment boundaries for the current frame. It can adapt to the problem of different frame variation distributions under different cameras, time periods, background activity levels, and lighting conditions, avoiding the influence of environmental factors on the selection of abnormal frames, improving the accuracy of abnormal frame selection and its adaptability to different environments, reducing the dependence on manual parameter tuning for fixed thresholds, and using the selected abnormal frames for fire detection. This invention can reduce the frequency of target detection model calls while maintaining the reliability of fire detection, reducing the consumption of repeated inference on frames without events, and improving the real-time performance, deployability, and engineering adaptability of the edge video fire detection system. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these drawings without creative effort.

[0020] Figure 1 A flowchart illustrating a vision-based fire detection method provided in an embodiment of the present invention; Figure 2 A flowchart illustrating yet another vision-based fire detection method provided in an embodiment of the present invention; Figure 3 The flowchart illustrates the determination of the visual feature metric vector and the mutation significance score in the vision-based fire detection method provided in this embodiment of the invention. Figure 4 This is a probability density distribution map of normal inter-frame changes and fire / smoke inter-frame changes on three significance measurement dimensions, obtained by the vision-based fire detection method provided in this embodiment of the invention. Figure 5 The abrupt change significance score of each frame of image obtained by the vision-based fire detection method provided in this embodiment of the invention. (Thin gray line) and adaptive control limit (Thick red line) Evolution along the time axis and corresponding standard deviation changes; Figure 6a This is a grouped bar chart showing the model call rate of different data sets and different k-value combinations obtained through the vision-based fire detection method provided in this embodiment of the invention. Figure 6b A comparative chart showing the call rates of the vision-based fire detection method, frame-by-frame fire detection scheme, and fixed-frame-skipping fire detection scheme provided in the embodiments of the present invention. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to specific examples and the accompanying drawings.

[0022] It should be noted that all uses of "first" and "second" in the embodiments of the present invention are for the purpose of distinguishing two entities or parameters with the same name but different names. It is clear that "first" and "second" are only for the convenience of expression and should not be construed as limiting the embodiments of the present invention. Subsequent embodiments will not explain this in detail.

[0023] To address the issues of processing latency, increased power consumption, and decreased system throughput caused by the need to call deep object detection models for deep inference on every frame of video image in existing technologies, one exemplary fire detection scheme employs a fixed frame skipping method (i.e., taking one frame out of every five frames). While this scheme reduces the model call rate to some extent, its recall rate also decreases accordingly. Another exemplary fire detection scheme uses a fixed threshold anomaly screening approach, judging whether inter-frame differences are abnormal using a fixed threshold. However, the setting of this fixed threshold is highly dependent on the scene, camera installation location, lighting conditions, and background dynamics. Once the scene changes from daytime to nighttime, or from a static state to a high-activity state, the fixed threshold may result in false triggers or missed triggers. Therefore, there is currently no fire detection scheme in the relevant technologies that balances detection accuracy and efficiency.

[0024] Based on this, the introduction of statistical process control into inter-frame saliency screening in this invention has significant engineering implications. On the one hand, it can estimate the normal fluctuation range online based on the recent video change level; on the other hand, when flames or smoke cause simultaneous abrupt changes in multiple saliency indicators such as hue, edge, and brightness, the abrupt change statistics will exceed the adaptive control limit, thereby triggering deep semantic verification. Compared to fixed frame skipping schemes, statistical adaptive screening can dynamically adjust the trigger frequency according to the scene change rate; compared to frame-by-frame deep inference schemes, it can avoid consuming deep model inference resources with a large number of event-free frames; and compared to single visual threshold schemes, it can reduce the dependence on manual parameter tuning during scene transitions by utilizing historical distribution characteristics.

[0025] The present invention will now be described in detail with reference to the embodiments and accompanying drawings.

[0026] The first aspect of this invention provides a vision-based fire detection method that can be applied to each frame of a video stream. For example... Figure 1 As shown, the method includes steps S100 to S400.

[0027] S100. Based on the visual information of the current frame image and its previous frame image, determine the significance score of the mutation in the current frame image.

[0028] Visual information refers to information that can be directly obtained from an image, such as color, brightness, and edge contours. Based on this, the abrupt change significance score of the current frame image compared to the previous frame image can be determined. By calculating the abrupt change significance score of the current frame image compared to the previous frame image, a rapid response to fire-related visual changes between adjacent frames can be achieved at a significantly lower computational cost than the forward inference of deep neural networks. This provides an effective basis for abnormal frame screening before the target detection model is invoked.

[0029] S200. Based on the historical frame statistics of the current frame image, determine the adaptive control upper limit threshold of the current frame image.

[0030] Historical frame statistics are used to calculate the mean and standard deviation of abrupt change significance scores for several historical frames preceding the current frame. Based on this historical frame statistics, an adaptive control upper threshold for the current frame can be determined. By dynamically generating the adaptive judgment boundary for the current frame, it can adapt to the problem of different inter-frame variation distributions under different cameras, time periods, background activity levels, and lighting conditions. This avoids the influence of environmental factors on abnormal frame screening, improving the accuracy of abnormal frame screening and its adaptability to different environments.

[0031] S300: Based on the adaptive control upper bound threshold and the mutation significance score, the current frame image is used to determine abnormal candidate frames.

[0032] The mutation significance score is compared with the upper bound threshold of the adaptive control. If the mutation significance score is greater than the upper bound threshold of the adaptive control, the current frame image is marked as an abnormal candidate frame; otherwise, the next frame image is processed.

[0033] S400: In response to determining that the current frame image is an abnormal candidate frame, fire detection is performed on the current frame image.

[0034] When an abnormal candidate frame is encountered, the object detection model is invoked to detect fires within that frame. If a fire is detected, a fire warning is immediately triggered. The object detection model can be a general-purpose model such as Faster R-CNN, EfficientDet, or the YOLO series, or a lightweight model (e.g., YOLOv8n). Before use, the model is trained on a fire dataset, and fire detection is performed based on the trained model.

[0035] This invention determines the abrupt change significance score of the current frame image based on visual information from the current frame image and its previous frame image, and determines an adaptive control upper bound threshold for the current frame image based on historical frame statistics. This adaptive control upper bound threshold and the abrupt change significance score are used to determine abnormal candidate frames for the current frame image. When the current frame image is determined to be an abnormal candidate frame, fire detection is performed on it. This technical solution can rapidly respond to fire-related visual changes between adjacent frames with a computational cost significantly lower than that of deep neural network forward inference. It possesses both physical interpretability and can serve as a reference for target detection models. The system provides effective pre-screening criteria and dynamically generates adaptive judgment boundaries for the current frame. This allows it to adapt to different camera angles, time periods, background activity levels, and lighting conditions, preventing environmental factors from affecting the screening of abnormal frames. This improves the accuracy of abnormal frame screening and its adaptability to different environments, reduces the reliance on manual parameter tuning for fixed thresholds, and enables fire detection using the screened abnormal frames. This maintains the reliability of fire detection while reducing the frequency of target detection model calls and minimizing redundant inference on frames without events. This enhances the real-time performance, deployability, and engineering adaptability of the edge-end video fire detection system.

[0036] In some embodiments of the present invention, such as Figure 2 As shown, step S100 (determining the mutation significance score of the current frame image based on the visual information of the current frame image and its previous frame image) includes steps S110 to S120.

[0037] S110. Based on the visual information of the current frame image and its previous frame image, determine the visual feature measurement vector of the current frame image.

[0038] In this embodiment of the invention, the visual feature metric vector can be a three-dimensional metric vector composed of hue distribution divergence, edge density variation rate, and global brightness mean shift. By calculating the hue distribution divergence, the pollution of scene colors by the characteristic orange-yellow hue of flames or the neutral gray hue of smoke can be captured. The edge density variation rate can capture the physical blurring phenomenon generated when smoke spreads. The global brightness mean shift can capture strong interference such as flickering, deflagration, or turning on lights in the scene's total energy. Based on the above visual feature metric vector, a rapid response can be made to fire-related visual changes between adjacent frames, thus providing an effective basis for abnormal frame screening before the target detection model is invoked.

[0039] In embodiments of the present invention, such as Figure 3 As shown, the tonal distribution divergence of the current frame image compared to the previous frame image can be determined through steps S111~S113.

[0040] S111. Construct two-dimensional joint normalized histograms of hue and saturation for the current frame image and the previous frame image, respectively.

[0041] S112. Calculate the shape distribution similarity between the two-dimensional joint normalized histogram of the current frame image and the two-dimensional joint normalized histogram of the previous frame image.

[0042] S113. Based on shape distribution similarity, determine the tonal distribution divergence of the current frame image compared to the previous frame image.

[0043] Specifically, two images can be converted from the RGB (red, green, blue) color space to the HSV (hue, saturation, brightness) color space. The H (hue) and S (saturation) channels are each divided into 128×64 bins, and a two-dimensional joint histogram is calculated. After normalizing the histograms, the Pearson correlation coefficient of the two-dimensional joint histograms in the HSV space is used to calculate the shape distribution similarity between the two-dimensional joint normalized histograms of the current and previous frames. Based on the calculated shape distribution similarity *r*, the hue distribution divergence is determined. .

[0044] In this embodiment of the invention, chromaticity distribution divergence The calculation formula is:

[0045] in, ∈[0,2].

[0046] In real-world applications, when flames appear, the orange-red warm color components and saturation in the image increase simultaneously, causing a structural shift in the histogram distribution and a decrease in the r-value. rise.

[0047] In embodiments of the present invention, such as Figure 3 As shown, the edge density variation rate of the current frame image compared to the previous frame image can be determined through steps S114~S115.

[0048] S114. Determine the edge maps of the current frame image and the previous frame image respectively.

[0049] S115. Based on the edge map of the current frame image and the edge map of the previous frame image, determine the edge density variation rate of the current frame image compared to the previous frame image.

[0050] Specifically, the two images can be converted to grayscale first. Then, the Canny edge detection operator is used to extract high-frequency edge structures, resulting in a binarized edge map. Next, the relative edge density change rate is obtained by calculating the global pixel mean of the two edge binary maps. When smoke spreads, it produces physical blur, and this edge density variation rate can be used to capture the drastic visual fluctuations caused by smoke diffusion.

[0051] In this embodiment of the invention, the edge density variation rate The calculation formula can be defined as:

[0052] in, The edge density of the current frame image. The edge density is the value of the previous frame image, and ε is a very small amount to prevent division by zero (e.g., ε = 10). -8 ), ∈[0,1].

[0053] In real-world applications, when smoke diffuses and obscures the outlines of background objects, edge density decreases. Increase; this metric also responds when the flame introduces new, irregular edges.

[0054] In embodiments of the present invention, such as Figure 3 As shown, the global brightness mean shift of the current frame image relative to the previous frame image can be determined through steps S116~S117.

[0055] S116. Determine the arithmetic mean vectors of the current frame image and the previous frame image in the RGB channels respectively.

[0056] S117. Based on the arithmetic mean vector of the RGB channels of the current frame image and the arithmetic mean vector of the RGB channels of the previous frame image, determine the global brightness mean shift of the current frame image relative to the previous frame image.

[0057] Specifically, the arithmetic mean vectors of the current frame and the previous frame in the R, G, and B channels can be calculated respectively. , Subsequently based on calculation and The three-dimensional Euclidean distance between the two frames is used as the global average brightness displacement of the current frame relative to the previous frame. This global average brightness displacement allows for a very short response to strong disturbances such as flickering, explosions, or the switching on of lights in the scene's total energy.

[0058] S120. Based on the visual feature metric vector of the current frame image, determine the mutation significance score of the current frame image.

[0059] In this embodiment of the invention, the hue distribution divergence, edge density variation rate, and global brightness mean in the visual feature measurement vector can be weighted and summed to obtain the mutation significance score of the current frame image. During the weighted summation process, the weight corresponding to the hue distribution divergence can be configured higher than the weights corresponding to the edge density variation rate and the global brightness mean, thereby improving the sensitivity of the mutation significance score to flames.

[0060] In this embodiment of the invention, the mutation significance score of the current frame image is calculated by using a visual feature metric vector, which can prevent false alarms from a single dimension and improve the accuracy and reliability of candidate frame determination.

[0061] In some embodiments of the present invention, such as Figure 2 As shown, step S200 (determining the adaptive control upper threshold of the current frame image based on the historical frame statistics of the current frame image) may include steps S210 to S230.

[0062] S210. Construct a circular sliding window queue.

[0063] S220. Based on the abrupt change significance scores of the previous N frames stored in the circular sliding window queue, determine the historical frame statistics of the current frame image.

[0064] S230. Based on the historical frame statistics of the current frame image, determine the adaptive control upper limit threshold of the current frame image.

[0065] In this embodiment of the invention, a circular sliding window queue To store the mutation significance scores of the previous N frames of the current frame image, a circular sliding window queue of length N can be maintained. (Excluding the current frame), calculate at each time step Sample mean of each element with sample standard deviation :

[0066]

[0067] The upper control limit (UCL) threshold for the current frame is then determined according to the following formula:

[0068] Where k is the control limit coefficient, and its value range can be 1.9 ≤ k ≤ 3.5.

[0069] The scientific basis of this formula is the Chebyshev Inequality: for any probability distribution, the value of a random variable deviates from the expected value. k The probability of a deviation greater than one standard deviation does not exceed [amount]. For example, when k When the probability score is 2.5, the upper bound of this probability is 16%. If we further assume a significant mutation score... In steady-state scenarios, the probability of false triggering is approximately 1-Φ(2.5) ≈ 0.62%, where Φ is the standard normal cumulative distribution function. (This hypothesis was not rejected on D-Fire steady-state scenario data by KS test p>0.05.)

[0070] The adaptive control upper threshold determined by the above scheme can ensure the reliability and accuracy of abnormal frame screening in practical application scenarios: when the scenario remains stable for a long time, Approaching 0, The control limits are very tight, even for minor anomalous disturbances. Elevation can also be captured; when the scene is in a normal but continuously changing phase (such as personnel / vehicle activity during work hours). As the threshold is increased, the control limits are correspondingly relaxed to filter out inter-frame fluctuations caused by routine activities; when a fire suddenly occurs, all three significance metrics simultaneously produce strong responses. Rising sharply and breaking through This ensures that no critical event frames are missed.

[0071] In some embodiments of the present invention, during the initial detection stage, The number of samples in the data is insufficient to support reliable data. and Estimate. At this point, a preset initial control upper limit threshold can be used. (For example, ( ) to make a transitional judgment.

[0072] That is, compare the significance score of the mutation in the current frame image with the initial upper control threshold. The system is used to determine abnormal frames. Once the number of accumulated samples in the queue is ≥ min(N, 100), it automatically and smoothly switches to the adaptive control limit mode mentioned above. That is, it compares the significance score of the sudden change in the current frame image with the adaptive control upper limit threshold to determine abnormal frames. This improves the reliability and accuracy of abnormal frame determination in the early stage of fire detection.

[0073] In some embodiments of the present invention, such as Figure 2As shown, step S300 (determining abnormal candidate frames for the current frame image based on the adaptive control upper bound threshold and mutation significance score) may include steps S310 to S330.

[0074] S310, compare the significance score of mutations and the upper limit threshold of adaptive control.

[0075] S320. In response to a mutation significance score greater than the upper bound threshold of the adaptive control, the current frame image is marked as an abnormal candidate frame.

[0076] S330, In response to the mutation significance score not being greater than the upper bound threshold of the adaptive control, the circular sliding window queue is updated based on the mutation significance score of the current frame image, and the step of determining the mutation significance score of the current frame image based on the visual information of the current frame image and its previous frame image is returned.

[0077] Specifically, the abrupt change significance score of the current frame image is compared with the upper bound threshold of the adaptive control. If the abrupt change significance score is greater than the upper bound threshold, the current frame image is marked as an anomalous candidate frame, and the fire detection step for the current frame image is performed. If the abrupt change significance score is not greater than the upper bound threshold, the circular sliding window queue is updated based on the abrupt change significance score of the current frame image, and the step of determining the abrupt change significance score of the current frame image based on the visual information of the current frame image and its previous frame image is returned, so as to perform fire detection for the next frame image.

[0078] In some embodiments of the present invention, such as Figure 2 As shown, step S400 (fire detection of the current frame image) includes steps S410 to S420.

[0079] S410. Perform dual-class target detection of flame and smoke on the current frame image.

[0080] S420, in response to the detection of flame and / or smoke, triggers a fire warning and stops updating the cyclic sliding window queue.

[0081] Specifically, in this embodiment of the invention, the current frame image is activated only when it is marked as an abnormal candidate frame.

[0082] In this embodiment of the invention, a lightweight target detection model can be trained using a publicly available fire detection dataset (such as the D-Fire dataset) to obtain the trained target detection model, which is the fire detection model required for fire detection in this application. In some specific embodiments, in order to balance training efficiency and detection accuracy, a certain number of data samples can be randomly selected from the complete D-Fire dataset, and the selected data samples can be used to construct a dataset for training the lightweight target detection model.

[0083] In this embodiment of the invention, when the current frame image is determined to be an abnormal candidate frame, a fire detection model can be invoked to perform dual-category target detection of flame and smoke, and a fire warning can be triggered if flame and / or smoke classification is detected.

[0084] In this embodiment of the invention, when flame and / or smoke classification is detected, the updating of the cyclic sliding window queue can also be stopped.

[0085] When flame and / or smoke classifications are detected, it indicates the presence of a fire. After a fire occurs, the mutation score remains consistently high. If the scores of fire frames are blindly stored in the sliding window, it will cause a vicious cycle of mean and standard deviation inflation, raising the adaptive control upper bound threshold too high and resulting in missed detections of subsequent fire development frames (i.e., baseline contamination). Therefore, upon detection of flame and / or smoke classifications, updates to the cyclic sliding window queue can be stopped until the fire ends (e.g., the alarm is manually deactivated). This ensures that the adaptive control upper bound threshold T remains at a reasonable sensitivity threshold throughout the fire's duration, preventing the missed detection of any subsequent fire images.

[0086] The following section uses a practical application scenario to illustrate the update process of the sliding window queue.

[0087] Scenario A (Not triggered or false alarm triggered): Significance score of sudden change in the current frame (This indicates that deep learning was not triggered), or although... However, after deep inference by the backend YOLOv8n, it was confirmed that there were no fire / smoke targets (indicating that the interference was due to false alarms such as a high-intensity light switch), and the system considered the current environment safe. At this point, the mutation score S of the current frame is pushed into the end of the sliding window, and the oldest frame data is popped out, keeping the total number of windows at N. This allows the adaptive control upper bound threshold to perfectly follow the gradual change in normal environment, such as from day to night.

[0088] Scenario B (Confirming the fire was actually triggered): Furthermore, YOLOv8n accurately identified real fire or smoke targets within the abrupt frame, immediately locking the sliding window and ceasing all updates until the alarm was manually deactivated. Throughout the fire's spread, the data within the window remained at the normal historical baseline prior to the fire. This ensured that the adaptive threshold T remained at a reasonable sensitivity level throughout the entire disaster, preventing any subsequent fire footage from being missed.

[0089] This invention performs fire detection by selecting abnormal frames, which can reduce the frequency of target detection model calls and reduce the overhead of repeated inference on frames without events while maintaining the reliability of fire detection. This improves the real-time performance, deployability, and engineering adaptability of the edge video fire detection system.

[0090] The vision-based fire detection method provided by the present invention will be explained and illustrated below through specific embodiments. It should be understood that the following embodiments are only used to explain the present invention and are not intended to limit the present invention.

[0091] Example 1 The fire detection process includes the following three levels, assuming the input video signal is... in This is the RGB three-channel color image of frame t. System-maintained state variables: previous frame image. and mutation score history sequence .

[0092] Level 1: Multi-dimensional visual saliency measurement operating at all times For each pair of adjacent frames Perform three lightweight visual saliency measurement operations, each with a computational complexity of O(H·W), and denot the resulting three-dimensional feature measurement vector as follows. The three metrics capture the inter-frame differences in scene across three physical dimensions: tonal distribution, texture, and global brightness.

[0093] Measure 1: Hue Distribution Divergence

[0094] Will and Two-dimensional joint normalized histograms are constructed on the hue (H) and saturation (S) channels by mapping from the RGB color space to the HSV color space respectively. The binning density is 128×64. The distribution similarity between the histograms of two frames is quantified using the Pearson correlation coefficient. :

[0095] Based on distribution similarity Calculate the hue distribution divergence , , .

[0096] When flames appear, the orange-red warm color components and saturation in the image increase simultaneously, and the histogram distribution undergoes a structural shift. The value decreased. rise.

[0097] Measure 2: Marginal density variation rate

[0098] First, analyze the two frames of images. and The RGB images are processed to obtain the corresponding grayscale images. Then, Gaussian smoothing (kernel size 3×3, σ=1.0) is performed on the two grayscale images to suppress high-frequency noise. Finally, the Canny edge detection operator (low threshold 50, high threshold 150) is applied to obtain the binarized edge maps of the two images.

[0099] For the current frame image Take the process of edge detection and obtaining a binarized edge map as an example.

[0100] First to Perform grayscale processing to obtain the corresponding grayscale image, then apply Gaussian smoothing to the grayscale image to obtain the smoothed image. ,in,

[0101] Next, the smoothed image is processed using the Canny edge detection operator. Perform edge detection to obtain the binarized edge map of the current frame image. ,in,

[0102] Previous frame image Binarized edge map The process of determining is similar to the process described above, and will not be repeated here.

[0103] Two frames of images were obtained. and Binarized edge map and Next, the edge density (i.e., the ratio of edge pixels to total pixels) of the two frames is calculated separately. and ,in,

[0104]

[0105] based on and Determine the edge density variation rate of the current frame image. ,in,

[0106] Where ε=10 -8 .

[0107] When smoke diffuses and obscures the outline of a background object, the edge density decreases and φ_edge increases; this metric also responds when flames introduce new, irregular edges.

[0108] Measure 3: Global Brightness Mean Shift

[0109] First, calculate the spatial arithmetic mean vector of the two frames in the R, G, and B color channels, then calculate the current frame image. Spatial arithmetic mean vector For example, , These are the arithmetic mean of all pixel values ​​in the corresponding channel for the current frame image. The previous frame image... Spatial arithmetic mean vector Calculation process and The calculation process is similar and will not be elaborated here.

[0110] Subsequently based on two frames of images and arithmetic mean vector and Calculate the mean brightness shift between two frames. ,in, The theoretical range is This metric is most sensitive to abrupt changes in ambient brightness and step changes in lighting conditions caused by flame emission.

[0111] The above metrics were compared using a dataset based on the D-Fire dataset (which includes 716 frames of normal inter-frame variation and 284 frames of fire / smoke inter-frame variation). , , Statistical analysis was performed to obtain the following results: Figure 4 The normalized histogram shown is... Figure 4 Normalized histograms are overlaid to compare the probability density distributions of normal inter-frame variations (gray) and fire / smoke inter-frame variations (red) across three significance dimensions. Dashed lines indicate the mean positions of each distribution, and the distribution separation, measured by standard deviation, is labeled in the figure. Figure 4 It can be seen that: normal inter-frame , and The sample means were 0.008, 0.010, and 0.006, respectively; fire / smoke frame intervals. , and The sample means were 0.028, 0.024, and 0.018, respectively, indicating that the fire / smoke frames... , and The sample mean is approximately equal to that of normal inter-frame frames. , and The sample mean was 3 to 4 times that of the target group. Measured by the Cohen d effect size (between mean difference and joint standard deviation), the discrimination of the three measures was approximately 3.5σ, 2.8σ, and 3.0σ, respectively. This demonstrates that the above measures have good statistical discrimination ability for changes in fire-related scenarios.

[0112] In one specific embodiment, the normal and fire distributions differ by 2.8σ in both the temporal gradient and color dimension. The significant spatial separation of 3.5σ allows for further setting of the coefficient k between 1.9 ≤ k ≤ 2.5. This enables precise anchoring of the control limit to the low-overlapping boundary between the two probability density distributions, thus intercepting fires in advance. This ensures that the system can suppress occasional noise under normal steady-state conditions with a high probability (suppression rate when k=2.5) and achieve immediate cross-barrier wake-up when the initial characteristics of a fire migrate to the fire mean (≥2.8σ), fundamentally eliminating the risk of missed reports due to statistical suppression.

[0113] In practical applications, by setting the coefficient k between 1.9 and k ≤ 2.5, weak signals in the early stages of a fire can be detected, preventing these signals from being filtered out as noise. This avoids the deep model being activated for fire detection only when the fire has grown large and the features exceed 3σ, thus preventing serious delays in fire alarms.

[0114] Figure 5 The above shows the mutation significance score for each frame of the image. (Thin gray line) and adaptive control limit (Thick red line) Evolution along the timeline; Figure 5 The standard deviation calculated based on the historical frame sequence for each frame image is shown below. The synchronous changes. Three typical state stages are distinguished by a light background color: the stable period (σ→0, ...). Tightening), Stabilized during the scenario change period (σ increases, Relaxation) and Transition during emergencies ( Rise sharply and break through The parameters are generated based on the actual statistical characteristics (μ≈0.008, σ≈0.004) of the AoF07 subset of the D-Fire dataset.

[0115] Second level: Filtering abnormal frames in real time The three-dimensional metric vector of the first level will be used at this level. The scalar mutation statistics are obtained through weighted fusion and aggregation. Drawing inspiration from Shewhart control charts in statistical process control (SPC), an online adaptive decision boundary is constructed. The specific process is as follows: 1) Calculate the significance score of mutations. for A convex combination of the three metric components, namely: Among them, the weight vector Satisfy normalization constraints The default weight configuration is as follows: However, it is not limited to this; other weighting configurations can also be used, which assign the highest weight to chromatic dispersion based on its highest single-feature detection rate demonstrated in ablation experiments. The weights can be optimized and calibrated through a grid search on the validation set.

[0116] 2) Online calculation of adaptive control limits Maintain a circular sliding window queue of length N. (excluding the current frame) ), calculate at each time step Sample mean of internal elements with sample standard deviation ,in.

[0117]

[0118]

[0119] Then, the adaptive control upper threshold of the current frame is determined according to the following formula. :

[0120] Where k is the control limit coefficient, and its value range can be 1.9≤k≤3.5, with a default value of k=2.5.

[0121] Based on the above adaptive control upper bound threshold, abnormal frame filtering can be adapted to different scenarios: when the scenario remains stable for a long time... Approaching 0, The control limits are very tight, even for minor anomalous disturbances. Elevation can also be captured; when the scene is in a normal but continuously changing phase (such as personnel / vehicle activity during work hours). As the threshold is increased, the control limits are correspondingly relaxed to filter out inter-frame fluctuations caused by routine activities; when a fire suddenly occurs, all three significance metrics simultaneously produce strong responses. Rising sharply and breaking through This ensures that no critical event frames are missed.

[0122] Statistical analysis was performed on the model invocation rates for three k values ​​using three datasets based on the D-Fire dataset (dataset 1: AoF07, dataset 2: WEB104, and dataset 3: WEB117). The results are as follows: Figure 6a The chart shows the model call rate grouped into histograms for the three data groups × three k values. Figure 6b The chart shows a comparison of the call rates of different fire detection schemes.

[0123] Figure 6a This shows the call rate of the object detection model under different combinations of data sets and k values. The specific value of the call rate can be read from the vertical axis. Figure 6b The comparison shows that the fire detection scheme provided by this invention has a horizontal call rate of only 2.2% compared with the frame-by-frame fire detection scheme and the fixed-frame-skipping fire detection scheme. This is much smaller than the 20.0% of the fixed-frame-skipping detection scheme and the 100% of the frame-by-frame fire detection scheme.

[0124] 3) Cold start transition strategy During the initial system startup, The sample size is insufficient to support reliability. and Estimate. At this point, a preset fixed initial control limit is used. A transitional decision is made. Once the cumulative number of samples in the queue is ≥ min(N, 100), the system automatically and smoothly switches to the aforementioned adaptive control limit mode.

[0125] 4) Filtering Decision and Queue Update At each time step, execute the following decision logic: If Then Mark it as an "abnormal candidate frame" and activate the third-level fire detection process; otherwise, skip it directly. Then proceed to the next frame for processing.

[0126] Regardless of the verdict, it will be enforced. And when |Q|>N, remove the head element of the queue to keep the window length constant at N.

[0127] Level 3: On-demand activation of deep semantic fire detection confirmation Only when the second level will This level is only activated when a frame is marked as an anomalous candidate frame.

[0128] A target detection model based on YOLOv8n (the variant with the smallest number of parameters in the YOLOv8 series (approximately 3.0M parameters, computational cost of 8.1 GFLOPs at 640×640 input resolution)) was adopted for... Perform dual-class target detection for flame and smoke, with the detection categories being smoke (ID=0) and fire (ID=1). YOLOv8n's single-frame GPU inference time is 6.2 ms, and the CPU inference time is approximately 45-55 ms.

[0129] Example 2 The adaptive noise reduction mechanism in the fire detection process is explained below based on two application scenarios.

[0130] Scenario 1: Normal stable environment (simulated using the first 80 frames on the D-Fire validation set) The code generates tiny integer noise in the range [-3, 3] randomly from the previous frame and inserts it into the image to simulate common camera sensor thermal noise, slight wind rustling, or minor light fluctuations found in surveillance footage. Because this noise is extremely small and persistent, the standard deviation calculated by the sliding window adaptively remains within an extremely low range. At this point, the system's adaptive threshold automatically tightens, closely adhering to the noise baseline. The mutation score S of the current frame is almost always less than or equal to T, and the system determines the state as either a gradual scene change or a stable scene. In this state, the system directly blocks and skips the fire detection process of the YOLOv8n detection network.

[0131] Through the above mechanism, this invention successfully filters out 97.8% of the event-free redundant frames in the D-Fire verification set, greatly saving computing power.

[0132] Scenario 2: Sudden Fire / Smoke Outbreak (Simulated via the last 20 frames on the D-Fire validation set) The system simulates the extreme transient state of a fire's initial outbreak and the rapid spread of smoke by suddenly generating a large, completely random pixel value between [0, 255] to replace the current image. This causes a sudden spike in the color, edge, and brightness of the image, resulting in a dramatic change in the fused mutation score, far exceeding the current adaptive threshold. The system sensitively identifies this mutation and determines it as a scene mutation. The system immediately activates the lightweight YOLOv8n detection network in the GPU memory to process the current mutated frame. Fine-grained target inference at higher resolution. If YOLOv8n outputs a fire or smoke bounding box with a confidence level greater than 0.25, a system-level fire alarm is immediately triggered.

[0133] Example 3 The performance of the target detection model based on YOLOv8n was verified.

[0134] Full reproduction and ablation tests were performed on the complete D-Fire validation set containing 4306 images. The experimental hardware used was an Intel i7 CPU and an RTX 4060 GPU. The performance of each key metric is shown in Tables 1 and 2 below.

[0135] Table 1

[0136] Table 2

[0137] The data in the table shows that the control limit coefficient k exhibits extremely smooth, monotonic, and predictable linear characteristics. As the ablation coefficient k is monotonically adjusted, the model call rate and recall rate demonstrate exceptionally excellent linear controllability. For example, in the embodiment where k=2.5, the system achieves a recall rate of up to 87.1% and a precision rate of 92.1% with only 2.2% of the deep model call overhead, realizing true extreme computational power saving and high-precision parallelism at the edge.

[0138] The present invention achieves the following beneficial effects: 1) The call rate of the object detection model has been significantly reduced, and the computing power overhead at the edge has been greatly compressed. This invention changes the traditional video surveillance solution's indiscriminate full-scale, frame-by-frame deep inference mode for deep neural networks (such as YOLOv8n) by using an intelligent scheduling mechanism based on lightweight feature pre-screening and dynamic control graph linkage, thereby realizing on-demand allocation of computing power.

[0139] Filtering frames without events: Experimental data shows that the full-frame detection scheme (Baseline) maintains a model call rate regardless of whether anomalies exist in the scene. Even with fixed-interval frame skipping (e.g., processing 1 frame every 5 frames), the model call rate remains fixed. Furthermore, it carries an extremely high risk of frame loss and missed detection. This invention, however, operates within the standard control limit coefficient. With this configuration, the deep model call rate decreased from 100% to 2.2%.

[0140] Extremely fast pre-filtering: The first and second level algorithms responsible for event-triggered filtering have extremely low complexity. Under single-threaded conditions on an Intel i7 CPU platform, without any parallel or hardware acceleration optimizations, the feature extraction and joint computation time for a single frame is approximately 6 seconds. The inference time for each model call is only .

[0141] 2) Precision and recall are highly balanced. This invention achieves a balance between high precision and low overhead by deeply coupling multidimensional joint saliency measurement with adaptive control thresholds. As mentioned earlier, with a control coefficient k=2.5, the system achieves a precision of 92.1% while significantly filtering out 97.8% of redundant calculations, and maintains an extremely high recall of 87.1% (only slightly fluctuating compared to the limit recall of full-frame detection or overexposure triggering schemes). This strongly demonstrates that the frames filtered out by this invention are mostly "pure background noise frames" or "normal environmental gradient frames" that have no technical value for fire / smoke alarms, ensuring that the pre-triggered module can wake up the depth target detector without delay during the critical transients of initial fire and smoke diffusion.

[0142] 3) Multidimensional significance features provide strong statistical support and have extremely high distinguishability between fire and smoke features. The three physical saliency metrics extracted in this invention (hue distribution divergence) Edge density variation rate and global brightness mean shift This invention establishes a very clear statistical boundary between fire / smoke frames and normal frames, completely solving the common problem of false alarms caused by single-dimensional features: Statistical analysis of a large number of fire video sequences (D-Fire validation set) shows that the mean response of fire / smoke frames in these three physical feature dimensions is 3 to 4 times that of normal frames. Statistical effect size evaluation shows that the separation degree (Cohen's d effect size) of the three metrics extracted in this invention between the normal and abnormal distributions reaches [values ​​missing]. , This gives rise to the back-end joint mutation index. Its extremely robustness ensures from the underlying mathematical logic that even if the monitored environment experiences normal brightness fluctuations or personnel movement, the system will not generate serious false triggers.

[0143] 4) Introducing the concept of Statistical Process Control (SPC), it exhibits excellent scenario adaptability and calibration-free characteristics. This invention uses a sliding window algorithm to dynamically update historical standard deviations online. This allows the decision boundary to adaptively scale with the dynamic characteristics of the scene.

[0144] Static-period self-adjusting tightening: When the scene is in a stable state of long-term emptiness and no anomalies, It automatically approaches the minimum value, at which point the algorithm's decision boundary automatically tightens, and the system maintains extremely high sensitivity to abnormal mutations.

[0145] Dynamic self-adjustment relaxation: When the scene undergoes continuous and slow changes due to routine environmental disturbances, work activities, etc. The automatic increase in size allows the system's judgment boundary to be reasonably widened, effectively absorbing and filtering out these harmless anomalies. This eliminates the need for engineers to perform tedious manual parameter adjustments and calibrations for different camera positions and lighting environments, greatly improving the algorithm's engineering implementation and large-scale seamless deployment capabilities.

[0146] 5) Offers perfect ablation adjustment linearity, with excellent engineering expandability and maintainability. According to the ablation experiment results of the control coefficient k (as shown in Table 3), the control parameter k of the present invention exhibits extremely smooth, monotonic and predictable linear characteristics.

[0147] Table 3

[0148] Based on the same inventive concept, according to another aspect of the present invention, embodiments of the present invention also provide a vision-based fire detection electronic device, which includes a processor and a memory, the memory storing a computer program that can run on the processor, and the processor executing the program performing the steps of the method described above.

[0149] The memory, as a non-volatile storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the methods described in the embodiments of this application. The processor executes various functional applications and data processing of the device by running the non-volatile software programs, instructions, and modules stored in the memory, thereby implementing the methods described in the above embodiments.

[0150] The memory may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the device, etc. Furthermore, the memory may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory may optionally include memory remotely located relative to the processor, which can be connected to the local module via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0151] Finally, it should be noted that those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium for the program can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc. The above computer program embodiments can achieve the same or similar effects as any of the corresponding foregoing method embodiments.

[0152] The above are exemplary embodiments disclosed in this invention. Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the invention (including the claims) is limited to these examples. Within the framework of this invention, technical features from the above embodiments or different embodiments can be combined, and many other variations of different aspects of the invention as described above exist, which are not provided in the details for the sake of brevity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this invention should be included within the protection scope of this invention.

Claims

1. A vision-based fire detection method, characterized in that, Perform the following steps for each frame of the video stream: Based on the visual information of the current frame image and its previous frame image, determine the abruptness significance score of the current frame image; Based on the historical frame statistics of the current frame image, determine the adaptive control upper limit threshold of the current frame image; Based on the adaptive control upper bound threshold and the mutation significance score, the current frame image is used to determine abnormal candidate frames; In response to determining that the current frame image is an abnormal candidate frame, fire detection is performed on the current frame image.

2. The method according to claim 1, characterized in that, The step of determining the abrupt change significance score of the current frame image based on visual information from the current frame image and its previous frame image includes: Based on the visual information of the current frame image and its previous frame image, determine the visual feature metric vector of the current frame image; Based on the visual feature metric vector of the current frame image, the abrupt change significance score of the current frame image is determined.

3. The method according to claim 2, characterized in that, The visual feature metric vector includes hue distribution divergence. The step of determining the visual feature metric vector of the current frame image based on the visual information of the current frame image and its previous frame image includes: Construct two-dimensional joint normalized histograms of hue and saturation for the current frame image and the previous frame image, respectively; Calculate the shape distribution similarity between the two-dimensional joint normalized histogram of the current frame image and the two-dimensional joint normalized histogram of the previous frame image; Based on the shape distribution similarity, the tonal distribution divergence of the current frame image compared to the previous frame image is determined.

4. The method according to claim 3, characterized in that, The visual feature metric vector also includes the edge density variation rate. The step of determining the visual feature metric vector of the current frame image based on the visual information of the current frame image and its previous frame image further includes: Determine the edge maps of the current frame image and the previous frame image respectively; Based on the edge map of the current frame image and the edge map of the previous frame image, the edge density variation rate of the current frame image compared to the previous frame image is determined.

5. The method according to claim 4, characterized in that, The visual feature metric vector also includes a global brightness mean shift. The step of determining the visual feature metric vector of the current frame image based on the visual information of the current frame image and its previous frame image further includes: Determine the arithmetic mean vectors of the current frame image and the previous frame image in the RGB channels respectively; Based on the arithmetic mean vector of the RGB channels of the current frame image and the arithmetic mean vector of the RGB channels of the previous frame image, the global brightness mean shift of the current frame image relative to the previous frame image is determined.

6. The method according to claim 1, characterized in that, The step of determining the adaptive control upper bound threshold of the current frame image based on historical frame statistics of the current frame image includes: Construct a circular sliding window queue, which is used to store the abrupt change significance scores of the previous N frames of the current frame image; Based on the abrupt change significance scores of the previous N frames stored in the circular sliding window queue, the historical frame statistics of the current frame image are determined, and the adaptive control upper bound threshold of the current frame image is determined based on the historical frame statistics of the current frame image.

7. The method according to claim 6, characterized in that, The historical frame statistics include the mean. and standard deviation The step of determining the adaptive control upper bound threshold of the current frame image based on the historical frame statistics of the current frame image includes: Based on the following formula, combined with the mean of the current frame image... and standard deviation Determine the adaptive control upper threshold of the current frame image. : in, k This is the control factor.

8. The method according to claim 6, characterized in that, The step of determining abnormal candidate frames for the current frame image based on the adaptive control upper bound threshold and the mutation significance score includes: Compare the mutation significance score with the upper bound threshold of the adaptive control; In response to a mutation significance score greater than the upper bound threshold of the adaptive control, the current frame image is marked as an anomalous candidate frame. In response to the mutation significance score not being greater than the upper bound threshold of the adaptive control, the circular sliding window queue is updated based on the mutation significance score of the current frame image, and the step of determining the mutation significance score of the current frame image based on the visual information of the current frame image and its previous frame image is returned, so as to perform fire detection on the next frame image.

9. The method according to claim 8, characterized in that, The step of performing fire detection on the current frame image includes: Perform dual-class target detection of flames and smoke on the current frame image; In response to the detection of flames and / or smoke, a fire warning is triggered, and the updating of the cyclic sliding window queue is stopped.

10. A vision-based fire detection electronic device, comprising: At least one processor; as well as A memory storing a computer program executable on the processor, characterized in that the processor executes the program and performs the steps of the method as described in any one of claims 1 to 9.