Method of reducing false detections of a flame
By setting a central region in the flame detection model and calculating the color mean and variance, the problem of false detection of solid-color items by the flame detection model is solved, thus improving the accuracy and reliability of detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-31
- Publication Date
- 2026-03-17
AI Technical Summary
Existing flame detection models are prone to false detections, leading to fire alarms, when they detect flame-like patterns on the clothing or outer packaging of items worn by operators, or when they detect items with pure colors similar to flame colors.
The detection model is used to obtain the detection area of the monitoring image, set the center area, calculate the color mean and variance of the center area, determine whether false detection occurs, and use deep learning neural network to train the dataset to optimize the model.
This reduces or avoids the probability of false detection caused by interference from solid-colored items that are similar in color to the flame, thus improving the accuracy and reliability of flame detection.
Smart Images

Figure CN115527174B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of security monitoring technology, and in particular to a method for reducing false detections of flames. Background Technology
[0002] In existing technologies, deep learning-based neural networks are typically used to train models on large amounts of labeled flame data. After a considerable training period, a usable flame detection model is obtained. However, in practical applications, existing flame detection models are prone to false detections and triggering fire alarms when they detect flame-like patterns on the clothing or packaging of items worn by operators, or when they detect items with pure colors similar to flame colors (e.g., red or blue).
[0003] To address the aforementioned issues, the flame detection model can be optimized by increasing the amount of labeled data and conducting long-term training. Experiments show that while the optimized flame detection model can eliminate interference from flame-like patterns, it still cannot avoid interference from solid-colored objects that are similar in color to flames. Therefore, a method is needed to further optimize the flame detection model, excluding objects with pure colors similar to flames during detection, thereby improving the model's performance and reducing the likelihood of false detections. Summary of the Invention
[0004] The purpose of this invention is to provide a method for reducing false detections in flame detection, thereby reducing or avoiding the probability of false detections caused by interference from solid-colored items that are similar in color to the flame, and improving the accuracy and reliability of the detection results.
[0005] To achieve the above objectives, the present invention provides a method for reducing false detections in flame detection, comprising:
[0006] A flame detection model is provided to detect the presence of flames in surveillance images;
[0007] When the flame detection model detects a flame, it acquires the monitoring image at the current moment and sets it as the image to be tested;
[0008] Image recognition is performed on the image to be tested to obtain the center point of the suspected flame area and a central region is set such that the center point is located at the center of the central region; and,
[0009] Calculate the first color mean and first variance of the central region, and determine whether a false detection has occurred based on the first color mean and first variance.
[0010] Optionally, the method for obtaining the central region includes:
[0011] Set a first pixel size, and set the area around the center point with a size equal to the first pixel size as the center region.
[0012] Optionally, the method for obtaining the central region includes:
[0013] A second pixel size is set. If the pixel size of the area to be tested is less than or equal to the second pixel size, then the area to be tested is set as the center area; if the pixel size of the area to be tested is greater than the second pixel size, then the pixel size of the area to be tested is proportionally reduced to a third pixel size.
[0014] If the size of the third pixel is less than or equal to the size of the second pixel, then the area around the center point with a size equal to the size of the second pixel is set as the central region; if the size of the third pixel is greater than the size of the second pixel, then the area around the center point with a size equal to the size of the third pixel is set as the central region.
[0015] Optionally, after setting the central region and before calculating the first color mean and first variance, the method further includes:
[0016] Obtain the R, G, and B values corresponding to each pixel in the central region, and establish the corresponding R value matrix, G value matrix, and B value matrix.
[0017] Optionally, calculate the first color mean. The method is as follows:
[0018]
[0019] Where N is the total number of pixels in the central region, C represents any one of the RGB primary colors, and X... Ci The value is the R, G, or B value corresponding to the i-th pixel in the central region.
[0020] Optionally, calculate the first variance. The method is as follows:
[0021]
[0022] Optionally, the process of determining whether a false detection has occurred based on the first color mean and the first variance includes:
[0023] Set the mean range and variance range for different colors. If the mean of the first color corresponding to different colors is within the corresponding mean range and the variance of the first color corresponding to different colors is within the corresponding variance range, then the central region is qualified and the flame detection model has not made a false detection; otherwise, the central region is unqualified and the flame detection model has made a false detection.
[0024] Optionally, after determining whether a false detection has occurred based on the first color mean and the first variance, the method further includes:
[0025] Several secondary center points and secondary center regions are set in the area to be tested, such that the secondary center points are located at the center of the secondary center regions;
[0026] Calculate the second color mean and second variance for all secondary central regions, and then determine whether a false detection has occurred based on the second color mean and second variance.
[0027] Optionally, the central region is rectangular in shape, and the four vertices of the central region are set as secondary center points. Four secondary center regions are set around the four secondary center points, and the pixel size of the secondary center regions is the same as that of the central region.
[0028] Optionally, several secondary center points are randomly set at the edge of the central region, and corresponding secondary center regions are set around all the secondary center points. The pixel size of the secondary center regions is the same as that of the central region.
[0029] Optionally, the process of re-evaluating whether a false positive has occurred includes:
[0030] The second color mean and second variance corresponding to the secondary center region are used to determine whether the secondary center region is qualified. If the qualification rate of all the secondary center regions is greater than a set value, the flame detection model has not made a false detection; otherwise, the flame detection model has made a false detection.
[0031] Optionally, the process of establishing the flame detection model includes:
[0032] A training dataset is obtained, which includes multiple training images, and the flames contained in the training images are all labeled. The deep learning neural network is trained using the training dataset to obtain the flame detection model.
[0033] In summary, this invention provides a method to reduce false detections in flame detection. It utilizes a flame detection model to detect the presence of a flame in a monitoring image and sets the monitoring image at the moment the flame is detected as the test image. Image recognition is performed on the test image to obtain the center point of the suspected flame area and a central region is set, ensuring the center point is located at the center of the central region. The first color mean and first variance of the central region are calculated, and a false detection is determined based on these values. This invention, by using a flame detection model to obtain a monitoring image containing a flame and the test area, setting a corresponding central region, and determining whether a false detection has occurred based on the first color mean and first variance corresponding to the central region, reduces or avoids the probability of false detections caused by interference from solid-colored objects similar in color to the flame, thus improving the accuracy and reliability of the detection results. Attached Figure Description
[0034] Figure 1 A flowchart illustrating a method for reducing false detections of flame according to an embodiment of the present invention;
[0035] Figure 2 The image to be tested is set in a method for reducing false detections of flames provided in an embodiment of the present invention;
[0036] Figure 3 and Figure 4 This is an embodiment of the present invention showing the arrangement of different central regions in a method for reducing false detections of flame.
[0037] Figure 5 A flowchart for determining whether a false detection has occurred in a method for reducing false detections of flame detection provided in an embodiment of the present invention;
[0038] Figure 6 This is a method for setting the secondary center region in the region to be tested in a flame detection reduction method provided by an embodiment of the present invention;
[0039] Figure 7 The flowchart illustrates a method for reducing false detections in flame detection according to an embodiment of the present invention, which involves determining again whether a false detection has occurred.
[0040] The accompanying figure is labeled as follows:
[0041] A1, A2 - Areas to be tested; P1, P2 - Center points; B1, B2 - Central area; M - Micro-pattern;
[0042] Q1, Q2, Q3, Q4 - secondary center points; D1, D2, D3, D4 - secondary center regions. Detailed Implementation
[0043] The specific embodiments of the present invention will now be described in more detail with reference to the accompanying drawings. The advantages and features of the present invention will become clearer from the following description. It should be noted that the drawings are all in a very simplified form and use non-precise proportions, and are only used to facilitate and clarify the illustration of the embodiments of the present invention.
[0044] Figure 1 A flowchart of a method for reducing false detections of flame, provided as an embodiment of the present invention.
[0045] See Figure 1 The method for reducing false detections of flame as described in this embodiment includes:
[0046] Step S01: Provide a flame detection model to detect whether a flame exists in the monitoring image;
[0047] Step S02: When the flame detection model detects a flame, it acquires the monitoring image at the current moment and sets it as the image to be tested;
[0048] Step S03: Perform image recognition on the image to be tested, obtain the center point of the suspected flame area to be tested, and set a central region, such that the center point is located at the center of the central region; and,
[0049] Step S04: Calculate the first color mean and first variance of the central region, and determine whether a false detection has occurred based on the first color mean and first variance.
[0050] The method for reducing false detections of flame as described in this embodiment is explained in detail below.
[0051] First, step S01 is executed to provide a flame detection model for detecting the presence of flames in a monitoring image. In this embodiment, the process of establishing the flame detection model includes: acquiring a training dataset, which includes multiple training images, and all flames contained in the training images are labeled; and training a deep learning neural network using the training dataset to obtain the flame detection model. In other embodiments of the present invention, other methods may be used to establish the flame detection model, and the present invention does not limit this.
[0052] Next, refer to Figure 2 In step S02, when the flame detection model detects a flame, it acquires the monitoring image at the current moment and sets it as the image to be tested.
[0053] Then refer to Figures 2 to 4 Step S03 involves performing image recognition on the image to be tested, obtaining the center point of the suspected flame area, and setting a central region such that the center point is located at the center of the central region. In this embodiment, for... Figure 2Image recognition can identify two potential flame detection areas, A1 and A2. A1 is a solid-colored garment worn by a worker that is similar in color to a flame (e.g., red or blue), and A2 is a flame itself. Because the garment is soft and its color is similar to a flame, and its shape changes constantly during movement, the flame detection model may misdetect the garment as a flame. In practical applications, the flame detection model may also be affected by other solid-colored objects similar in color to flames, leading to false detections. In this embodiment, both detection areas A1 and A2 are rectangular. In other embodiments of the invention, the shape of the detection areas can be set according to actual needs, and the invention does not impose any limitations on this. See also... Figure 2 The center point of the area to be tested A1 is P1, and the center point of the area to be tested A2 is P2.
[0054] It should be noted that the method for obtaining the central region can be comprehensively set according to factors such as system configuration, detection accuracy, and image size. This embodiment uses the test area A1 and the test area A2 as examples to introduce two different methods for setting the central region:
[0055] First, taking the area to be tested, A1, as an example, we will introduce the first method for setting the central region. (See reference...) Figure 3 Set a first pixel size, for example, set the first pixel size to 5×5. In the area to be tested A1, set the area around the center point P1 with a size of the first pixel size as the central area B1, that is, the pixel size of the central area B1 is 5×5, and the center of the central area B1 is the center point P1.
[0056] Next, taking the test area A2 as an example, another method for setting the center region is introduced. That is, a second pixel size is set, for example, the second pixel size is set to 4×7. If the pixel size of the test area is less than or equal to the second pixel size, then the test area is set as the center region; if the pixel size of the test area is greater than the second pixel size, then the pixel size of the test area is proportionally reduced to a third pixel size; if the third pixel size is less than or equal to the second pixel size, then the area around the center point with a size of the second pixel size is set as the center region; if the third pixel size is greater than the second pixel size, then the area around the center point with a size of the third pixel size is set as the center region.
[0057] See Figure 4The pixel size of the test area A2 is 100×140. Since the pixel size of the test area A2 is larger than the second pixel size, the pixel size of the test area A2 is proportionally reduced to 5×7 (i.e., the third pixel size). Because the third pixel size is larger than the second pixel size, the area around the center point P2 with a size equal to the third pixel size is set as the central area B2, i.e., the pixel size of the central area B2 is 5×7, and the center of the central area B2 is the center point P2. It should be noted that in the third pixel size m×n, the greatest common divisor between the parameter m representing the length and the parameter n representing the width is 1. Therefore, the third pixel size cannot be further proportionally reduced.
[0058] The two methods for setting the center region described above can be selected according to actual needs. The first method is suitable for situations with low system configuration, available memory, and detection accuracy, while the second method is suitable for situations with high system configuration, available memory, and detection accuracy. In actual application scenarios, the first pixel size and the second pixel size can be set according to actual needs, and this invention does not impose any restrictions on this.
[0059] Optionally, between steps S03 and S04, the method further includes: obtaining three different RGB color values (i.e., R color value, G color value, and B color value, hereinafter referred to as R value, G value, and B value) corresponding to each pixel in the central regions B1 and B2, and establishing corresponding R value matrices, G value matrices, and B value matrices. For example, the R value matrix in the central region B1 is:
[0060]
[0061] Next, step S04 is executed to calculate the first color mean and first variance of the central regions B1 and B2, and to determine whether a false detection has occurred based on the first color mean and first variance. As can be seen from step S02, in this embodiment, the flame detection result can be interfered with by items of a solid color similar to the flame color (such as clothing represented by A1), thus causing false detections. Therefore, it is necessary to obtain the R value, G value, and B value corresponding to each pixel in the central regions B1 and B2 for judgment to reduce the interference of color on the detection result.
[0062] In this embodiment, the first color mean is calculated. The method is as follows:
[0063]
[0064] Where N is the total number of pixels in the central region, C represents any one of the RGB primary colors, and X... CiThe value is the R, G, or B value corresponding to the i-th pixel in the central region.
[0065] Accordingly, the first variance is calculated. The method is as follows:
[0066]
[0067] It should be noted that, in other embodiments of the present invention, the first color average value can also be calculated using other methods. and the first variance For example, the R-value matrix, G-value matrix, and B-value matrix of the central region can be obtained directly, and the corresponding first color mean can be calculated using mathematical methods. and and the corresponding first variance and This invention does not impose any limitations on this.
[0068] See Figure 5 The process of determining whether a false detection has occurred based on the first color mean and first variance includes: setting the mean range and variance range corresponding to different colors; if the first color mean corresponding to different colors is within the corresponding mean range and the first variance corresponding to different colors is within the corresponding variance range, then the central region is qualified and the flame detection model has not caused a false detection; otherwise, the central region is unqualified and the flame detection model has caused a false detection.
[0069] In this embodiment, the central region B1 is unqualified, while the central region B2 is qualified. Therefore, a false detection occurs at the test region A1, where there is no flame in the region represented by A1. No false detection occurs at the test region A2, where there is a flame in the region represented by A2.
[0070] As can be seen, this embodiment obtains a monitoring image of a flame and a test area by using a flame detection model, sets a corresponding central area, and determines whether a false detection occurs based on the first color mean and first variance corresponding to the central area. This reduces or avoids the probability of false detection caused by interference from solid-color items that are similar in color to the flame, thereby improving the accuracy and reliability of the detection results.
[0071] In addition, please continue to refer to Figure 1 When the accuracy requirement for the flame detection model is high, step S04 may further include:
[0072] Step S05: Set several secondary center points and secondary center regions in the area to be tested, such that the secondary center points are located at the center of the secondary center regions;
[0073] Step S06: Calculate the second color mean and second variance of all secondary central regions, and determine again whether a false detection has occurred based on the second color mean and second variance.
[0074] The following section uses the test area A1 as an example to introduce a method for determining whether a false detection has occurred.
[0075] First, refer to Figure 6 Step S05 involves setting several secondary center points and secondary center regions in the area to be tested A1, with each secondary center point located at the center of its respective secondary center region. In this embodiment, the four vertices of the central region B1 are set as secondary center points Q1, Q2, Q3, and Q4, and four secondary center regions D1, D2, D3, and D4 are set around these four secondary center points. The pixel size of each of the secondary center regions D1, D2, D3, and D4 is the same as that of the central region B1, which is 5×5. In other embodiments of the present invention, the number and distribution of the secondary center points can be adjusted according to actual needs. The secondary center points can be randomly set at the edge of the central region or at any position in the central region other than the center point; the present invention does not impose any restrictions on this.
[0076] Next, refer to Figure 7 Then, proceed to step S06 to calculate the second color mean and second variance of all secondary center regions D1, D2, D3, and D4. Based on the second color mean and second variance, determine again whether a false detection has occurred. It should be noted that the calculation method for the second color mean is the same as the calculation method for the first color mean, and the calculation method for the second variance is the same as the calculation method for the first variance, which will not be repeated here.
[0077] Continue reading Figure 7 The sub-center region is judged to be qualified based on the second color mean and second variance corresponding to each sub-center region. If the qualification rate of all sub-center regions is greater than a set value, the flame detection model has not made a false detection; otherwise, the flame detection model has made a false detection.
[0078] In this embodiment, combined with Figure 6Analysis shows that there is a small pattern M (such as the LOGO or pattern of clothing, etc.) in the area where D3 is located, which makes the second variance corresponding to the sub-center area D3 relatively large and within the set variance range. Therefore, D3 is qualified. However, there are no obvious patterns in the areas where D1, D2, and D4 are located, which makes the second variances corresponding to the sub-center areas D1, D2, and D4 all relatively small and outside the set variance range. Therefore, D1, D2, and D4 are all unqualified. The qualification rate of all the sub-center areas is 25%, which is less than the set value (such as 70%). Therefore, a false detection occurs at the待测区域 A1, and there is no flame in the area represented by A1.
[0079] It can be seen that adding a sub-center area to the method of reducing false detection in flame detection and then judging whether a false detection occurs again can reduce the interference of small patterns on the item to the detection result, and further improve the accuracy and reliability of the detection result.
[0080] In summary, the present invention provides a method for reducing false detection in flame detection, which uses a flame detection model to detect whether there is a flame in a monitoring image, and sets the monitoring image at the moment when the flame is detected as a待测图像; performs image recognition on the待测图像, obtains the center point of the疑似火焰待测区域 and sets a center area, so that the center point is located at the center of the center area; calculates the first color mean value and the first variance of the center area, and judges whether a false detection occurs according to the first color mean value and the first variance. The present invention obtains the monitoring image and the待测区域 where there is a flame through the flame detection model, sets the corresponding center area, and judges whether a false detection occurs according to the first color mean value and the first variance corresponding to the center area, reduces or avoids the probability of false detection caused by the interference of items with pure colors and similar colors to the flame, and improves the accuracy and reliability of the detection result.
[0081] The above is only the preferred embodiment of the present invention and does not play any limiting role to the present invention. Any person skilled in the art within the technical field of the present invention, without departing from the scope of the technical solution of the present invention, makes any form of equivalent replacement or modification and other changes to the technical solution and technical content disclosed by the present invention, all of which belong to the content within the scope of the technical solution of the present invention and still fall within the protection scope of the present invention.
Claims
1. A method of reducing false detections of a flame detection, characterized by, The method comprises the following steps: a flame detection model is provided for detecting whether a flame exists in a monitoring image; when the flame detection model detects a flame, a monitoring image at a current time is obtained and set as a to-be-detected image; image recognition is performed on the to-be-detected image, a center point of a suspected flame to-be-detected region is obtained, and a center region is set, so that the center point is located at the center of the center region; and a first color mean value and a first variance of the center region are calculated, whether a false detection occurs is judged according to the first color mean value and the first variance, then a plurality of secondary center points and secondary center regions are set in the to-be-detected region, so that the secondary center points are located at the centers of the secondary center regions, a second color mean value and a second variance of all the secondary center regions are calculated, and whether a false detection occurs is judged again according to the second color mean value and the second variance.
2. The method of reducing false detections of a flame detection of claim 1, wherein, The method for obtaining the center region comprises: a first pixel size is set, and a region with a size of the first pixel size around the center point is set as the center region.
3. The method of reducing false detections of a flame detection of claim 1, wherein, The method for obtaining the center region comprises: a second pixel size is set, if a pixel size of the to-be-detected region is less than or equal to the second pixel size, the to-be-detected region is set as the center region, if the pixel size of the to-be-detected region is greater than the second pixel size, the pixel size of the to-be-detected region is reduced to a third pixel size in proportion; if the third pixel size is less than or equal to the second pixel size, a region with a size of the second pixel size around the center point is set as the center region, if the third pixel size is greater than the second pixel size, a region with a size of the third pixel size around the center point is set as the center region.
4. The method of reducing false detections of a flame detection of claims 1, 2, or 3, wherein, After the center region is set and before the first color mean value and the first variance are calculated, the method further comprises: R values, G values and B values corresponding to each pixel in the center region are obtained, and R value matrices, G value matrices and B value matrices are established.
5. The method of reducing false detections of a flame detection of claim 4, wherein, The method for calculating the first color mean value is: The method is: ; Wherein, N is the total number of pixel points in the center region, C represents any one of RGB three primary colors, is the R value, G value or B value corresponding to the i-th pixel point in the center region.
6. The method of reducing false detections of a flame detection of claim 5, wherein, The method of calculating the first variance is: 。 7. The method of reducing false detections of a flame detection of claim 6, wherein, The process of judging whether a false detection occurs according to the first color mean value and the first variance comprises: mean value ranges and variance ranges corresponding to different colors are set, if the first color mean values corresponding to different colors are all located in the corresponding mean value ranges, and the first variances corresponding to different colors are all located in the corresponding variance ranges, the center region is qualified, and the flame detection model does not have a false detection, if not, the center region is unqualified, and the flame detection model has a false detection.
8. The method of reducing false detections of a flame detection of claim 1, wherein, The center region is in a rectangular shape, four vertices of the center region are set as secondary center points, four secondary center regions are set around the four secondary center points, and pixel sizes of the secondary center regions are the same as a pixel size of the center region.
9. The method of reducing false detections of a flame detection of claim 1, wherein, A plurality of secondary center points are randomly set at edges of the center region, corresponding secondary center regions are set around all the secondary center points, and pixel sizes of the secondary center regions are the same as the pixel size of the center region.
10. The method of reducing false detections of a flame detection of claim 8 or 9, wherein, The process of judging whether a false detection occurs again comprises: According to the second color mean value and the second variance corresponding to the sub-center region, it is judged whether the sub-center region is qualified or not. If the qualification rate of all the sub-center regions is greater than a set value, the flame detection model does not have false detection. If not, the flame detection model has false detection.
11. The method of reducing false detections of a flame detection of claim 1, wherein, The process of establishing the flame detection model includes: A training data set is obtained, the training data set includes a plurality of training images, and the flames contained in the training images have been marked. The training data set is used to train a neural network of deep learning to obtain the flame detection model.
Citation Information
Patent Citations
Target recognition method and device, target recognition model training method and device and electronic device
CN110287817A
Facial residue detection method and related equipment
CN111325732A
Pantograph foreign matter detection method, storage medium and computer equipment
CN111738342A
Flame target detection method, electronic equipment and storage medium
CN114550078A