Multi-scenario flame detection method, device and storage medium

By using the screening model and the detection model to make double judgments in the multi-scene flame detection method, the problem of flame detection relies on manual monitoring in the prior art is solved, and automated and efficient detection of multi-scene flames is achieved.

CN114155465BActive Publication Date: 2024-11-15HARBIN INST OF TECH SHENZHEN GRADUATE SCHOOL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111440706.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-30
Publication Date
2024-11-15
Estimated Expiration
2041-11-30

AI Technical Summary

Technical Problem

In the prior art, fire or flame detection mainly relies on manual monitoring, which leads to time-consuming and labor-intensive and easy to miss inspection, and lacks automated and highly accurate multi-scene flame detection methods.

Method used

A multi-scene flame detection method is proposed. By obtaining the image information to be detected, using a preset filter model to generate a moving area map, performing color analysis, calculating the difference value, and comparing it with the discriminant threshold, and combining the detection model to make double judgments to achieve Automatic detection of flames.

Benefits of technology

It realizes automated and efficient detection of flames in multiple scenarios, reduces the dependence of manual monitoring, and improves detection accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114155465B_ABST
    Figure CN114155465B_ABST
Patent Text Reader

Abstract

The present invention discloses a multi-scenario flame detection method, device and storage medium. The invention belongs to the field of image detection. The multi-scenario flame detection method of the present invention can obtain image information to be detected; screen the image information to be detected by a preset screening model to generate a motion area map; perform color analysis on the motion area map to obtain a differential value; compare the differential value with a preset first discrimination threshold to obtain a comparison result; wherein the comparison result includes a first comparison result or a second comparison result; when the first comparison result is received, a discrimination confidence is calculated and generated according to the image information to be detected, and compared with a preset second discrimination threshold to obtain discrimination data; when the first discrimination data is received, the image information to be detected is detected according to a preset detection model to generate first scene information or second scene information. The method can automatically and accurately monitor flame graphics in multiple scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image detection, and in particular to a multi-scene flame detection method, device and storage medium. Background Art

[0002] In the related art, fire detection in different scenarios or flame detection tasks is often carried out by manually monitoring video images. This method is not only time-consuming and laborious, but also may lead to missed fire detection due to personal factors of the monitoring personnel. Therefore, how to provide an automated and highly accurate multi-scenario flame detection method has become an urgent problem to be solved. Summary of the invention

[0003] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes a multi-scenario flame detection method, which can realize automatic monitoring of flames in multiple scenes.

[0004] The present invention also provides a multi-scene flame detection device having the multi-scene flame detection method.

[0005] The present invention also provides a computer-readable storage medium.

[0006] A multi-scenario flame detection method according to a first aspect of an embodiment of the present invention includes:

[0007] Obtaining image information to be detected;

[0008] The image information to be detected is screened and processed by a preset screening model to generate a motion area map;

[0009] Performing color analysis on the motion area map to obtain a differential value;

[0010] Comparing the difference value with a preset first discrimination threshold to obtain a comparison result; wherein the comparison result includes a first comparison result or a second comparison result;

[0011] When the first comparison result is received, a judgment confidence is calculated based on the image information to be detected;

[0012] Compare the discrimination confidence with a preset second discrimination threshold to obtain discrimination data; wherein the discrimination data includes first discrimination data and second discrimination data;

[0013] When the first discrimination data is received, the image information to be detected is detected according to a preset detection model to generate first scene information or second scene information.

[0014] The multi-scenario flame detection method according to the embodiment of the present invention has at least the following beneficial effects: the multi-scenario flame detection method provided by the present invention can obtain the image information to be detected corresponding to different scenes, and screen the image information to be detected through a preset screening model to obtain a motion area map that may contain flame patterns within a period of time. By performing color analysis processing on the motion area map, the method can obtain the color information corresponding to all the image information in the current motion area map and form a differential value. By comparing the differential value with the preset first discrimination threshold, the method can make a preliminary judgment on whether there is a flame in the current motion area map, and obtain a corresponding comparison result, wherein the comparison result includes a first comparison result and a second comparison result, and when the first comparison result is obtained, the corresponding discrimination confidence is calculated according to the image information to be detected. By comparing the discrimination confidence with the preset second discrimination threshold, the method can further judge whether there is a flame within the current range of the image information to be detected, and obtain discrimination data according to the judgment result, wherein the discrimination data includes the first discrimination data and the second discrimination data, and when the first discrimination data is obtained, the image information to be detected is detected according to the preset detection model to obtain the first scene information or the second scene information. Through this method, the present invention can preliminarily screen the image information to be detected in the current scene, and by performing two analysis and comparisons on the image data in the motion area map, accurately judge whether there is a flame in the current scene, so as to detect the final comparison result again through the detection model to realize the final judgment of the flame information in the current scene, and then realize the automatic and efficient detection of the flame in the scene.

[0015] According to some embodiments of the present invention, the differential value is compared with a preset first discrimination threshold to obtain a comparison result; and after the comparison result includes the first comparison result or the second comparison result, the method further includes:

[0016] When the second comparison result is received, second scene information is generated.

[0017] According to some embodiments of the present invention, after the discrimination confidence is compared with a preset second discrimination threshold to obtain discrimination data, wherein the discrimination data includes first discrimination data and second discrimination data, the method further includes:

[0018] When the second discrimination data is received, second scene information is output.

[0019] According to some embodiments of the present invention, acquiring the image information to be detected includes:

[0020] Get original image information;

[0021] Detect the original image information according to a preset target detection model to obtain detection frame information;

[0022] The original image information is cropped according to the detection frame information to obtain the image information to be detected.

[0023] According to some embodiments of the present invention, the step of screening the image information to be detected by using a preset screening model to generate a motion area map includes:

[0024] Analyzing the image to be detected to obtain image frame data;

[0025] The image frame data is screened and processed by the screening model to obtain a frame difference mask model;

[0026] The image to be detected is calculated using the frame difference mask model to obtain the motion area map.

[0027] According to some embodiments of the present invention, the step of performing color analysis on the motion region map to obtain a differential value includes:

[0028] Comparing the motion region map according to a preset color threshold to obtain a color difference map;

[0029] Performing a sum calculation on the color difference map to obtain a calculated value;

[0030] The calculated value is divided by the area of ​​the image to be detected to obtain the difference value.

[0031] According to some embodiments of the present invention, when the first comparison result is received, calculating and generating a discrimination confidence according to the image information to be detected includes:

[0032] Generate a first discriminant function and a second discriminant function according to the image information to be detected and a preset boundary value;

[0033] An average value is calculated for the first discriminant function and the second discriminant function to generate the discriminant confidence.

[0034] According to some embodiments of the present invention, when the first discrimination data is received, detecting the image information to be detected according to a preset detection model to generate the first scene information or the second scene information includes:

[0035] Extracting a feature database of the image information to be detected according to the detection model;

[0036] Perform matching processing on each piece of data information in the feature database and the flame label file corresponding to the data information to obtain a flame label set;

[0037] Obtaining the cosine similarity corresponding to the feature database;

[0038] Filter the flame label files in the flame label set according to the cosine similarity to obtain pending flame label data;

[0039] Calculating the average value of the pending flame tag data to obtain a third discriminant function;

[0040] Obtaining a detection threshold according to the number of the flame tag files in the pending flame tag data;

[0041] Perform one of the following steps according to the third discriminant function and the detection threshold:

[0042] If the function value of the third discriminant function within the preset detection period is greater than the detection threshold, generating the first scene information;

[0043] or,

[0044] If the function value of the third discriminant function within the preset detection period is less than or equal to the detection threshold, the second scene information is generated.

[0045] A multi-scenario flame detection device according to a second aspect of an embodiment of the present invention includes:

[0046] at least one processor, and

[0047] A memory communicatively coupled to the at least one processor

[0048] Wherein, instructions are stored in the memory, so that when the at least one processor executes the instructions, the multi-scenario flame detection method as described in the embodiment of the first aspect of the present invention can be implemented.

[0049] The multi-scenario flame detection device according to the embodiment of the present invention has at least the following beneficial effects: the multi-scenario flame detection device provided by the present invention can execute instructions stored in the memory through a processor to implement the multi-scenario flame detection method provided by the embodiment of the first aspect of the present invention, thereby obtaining the image information to be detected corresponding to different scenes, and screening the image information to be detected through a preset screening model to obtain a motion area map that may contain flame graphics within a period of time. By performing color analysis processing on the motion area map, the method can obtain the color information corresponding to all the image information in the current motion area map and form a differential value. By comparing the differential value with the preset first discrimination threshold, the method can make a preliminary judgment on whether there is a flame in the current motion area map, and obtain a corresponding comparison result, wherein the comparison result includes a first comparison result and a second comparison result, and when the first comparison result is obtained, the corresponding discrimination confidence is calculated according to the image information to be detected. By comparing the discrimination confidence with the preset second discrimination threshold, the method can further judge whether there is a flame within the current range of the image information to be detected, and obtain discrimination data according to the judgment result, wherein the discrimination data includes the first discrimination data and the second discrimination data, and when the first discrimination data is obtained, the image information to be detected is detected according to the preset detection model to obtain the first scene information or the second scene information. Through this method, the present invention can preliminarily screen the image information to be detected in the current scene, and by performing two analysis and comparisons on the image data in the motion area map, accurately judge whether there is a flame in the current scene, so as to detect the final comparison result again through the detection model to realize the final judgment of the flame information in the current scene, and then realize the automatic and efficient detection of the flame in the scene.

[0050] According to the computer-readable storage medium provided in the third aspect of the present invention, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the multi-scenario flame detection method as described in the embodiment of the first aspect of the present invention.

[0051] The computer-readable storage medium according to the embodiment of the present invention has at least the following beneficial effects: by executing the computer instructions in the computer-readable storage medium provided by the present invention, the present invention can implement the multi-scenario flame detection method provided by the embodiment of the first aspect of the invention, thereby obtaining the image information to be detected in the corresponding different scenes, and screening the image information to be detected by a preset screening model to obtain a motion region map that may contain flame patterns within a period of time. By performing color analysis processing on the motion region map, the method can obtain the color information corresponding to all the image information in the current motion region map, and form a differential value. By comparing the differential value with the preset first discrimination threshold, the method can make a preliminary judgment on whether there is a flame in the current motion region map, and obtain a corresponding comparison result, wherein the comparison result includes a first comparison result and a second comparison result, and when the first comparison result is obtained, the corresponding discrimination confidence is calculated according to the image information to be detected. By comparing the discrimination confidence with the preset second discrimination threshold, the method can further judge whether there is a flame within the current range of the image information to be detected, and obtain discrimination data according to the judgment result, wherein the discrimination data includes the first discrimination data and the second discrimination data, and when the first discrimination data is obtained, the image information to be detected is detected according to the preset detection model to obtain the first scene information or the second scene information. Through this method, the present invention can preliminarily screen the image information to be detected in the current scene, and accurately judge whether there is a flame in the current scene by performing two analyses and comparisons on the image data in the motion area map, so as to detect the final comparison result again through the detection model to realize the final judgment of the flame information in the current scene, and then realize the automatic and efficient detection of the flame in the scene. Additional aspects and advantages of the present invention will be partially given in the following description, and partially will become obvious from the following description, or will be understood through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] The present invention will be further described below with reference to the accompanying drawings and embodiments, wherein:

[0053] Figure 1 A flowchart of a multi-scenario flame detection method according to an embodiment of the present invention;

[0054] Figure 2 for Figure 1 Specific flow chart of step S100 in FIG.

[0055] Figure 3 for Figure 1 Specific flow chart of step S200 in FIG.

[0056] Figure 4 for Figure 1 Specific flow chart of step S300 in FIG.

[0057] Figure 5 for Figure 1 Specific flow chart of step S500 in FIG.

[0058] Figure 6 for Figure 1 Specific flow chart of step S700 in FIG. DETAILED DESCRIPTION

[0059] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0060] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.

[0061] In the description of the present invention, "several" means more than one, "many" means more than two, "greater than", "less than", "exceed", etc. are understood to exclude the number itself, and "above", "below", "within", etc. are understood to include the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0062] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.

[0063] In the description of the present invention, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0064] First, refer to Figure 1 The present invention provides a multi-scenario flame detection method, comprising:

[0065] S100, obtaining image information to be detected;

[0066] S200, filtering and processing the image information to be detected by using a preset filtering model to generate a motion area map;

[0067] S300, performing color analysis processing on the motion area map to obtain a differential value;

[0068] S400, comparing the difference value with a preset first discrimination threshold to obtain a comparison result; wherein the comparison result includes a first comparison result or a second comparison result;

[0069] S500, when receiving the first comparison result, calculating and generating the discrimination confidence according to the image information to be detected; S600, comparing the discrimination confidence with the preset second discrimination threshold to obtain discrimination data; wherein the discrimination data includes the first discrimination data and the second discrimination data;

[0070] S700,

[0071] When the first discrimination data is received, the image information to be detected is detected according to a preset detection model to generate the first scene information or the second scene information.

[0072] According to the multi-scenario flame detection method provided by the present invention, the present invention can obtain the image information to be detected corresponding to different scenes, and screen the image information to be detected through a preset screening model to obtain a motion region map that may contain flame patterns within a period of time. By performing color analysis processing on the motion region map, the present method can obtain the color information corresponding to all the image information in the current motion region map, and form a differential value. By comparing the differential value with a preset first discrimination threshold, the present method can make a preliminary judgment on whether there is a flame in the current motion region map, and obtain a corresponding comparison result, wherein the comparison result includes a first comparison result and a second comparison result, and when the first comparison result is obtained, the corresponding discrimination confidence is calculated according to the image information to be detected. By comparing the discrimination confidence with a preset second discrimination threshold, the present method can further judge whether there is a flame within the current image information to be detected, and obtain discrimination data according to the judgment result, wherein the discrimination data includes a first discrimination data and a second discrimination data, and when the first discrimination data is obtained, the image information to be detected is detected according to a preset detection model to obtain the first scene information or the second scene information. Through this method, the present invention can preliminarily screen the image information to be detected in the current scene, and accurately judge whether there is a flame in the current scene by performing two analyses and comparisons on the image data in the motion area map, so as to detect the final comparison result again through the detection model to achieve the final judgment of the flame information in the current scene, and then achieve automatic and efficient detection of the flame in the scene.

[0073] Reference Figure 2 In some embodiments, step S100 includes:

[0074] S110, obtaining original image information;

[0075] S120, detecting the original image information according to a preset target detection model to obtain detection frame information;

[0076] S130, cropping the original image information according to the detection frame information to obtain the image information to be detected.

[0077] The multi-scenario flame detection method provided by the present invention can obtain the original image information and effectively simplify the obtained data samples through a preset target detection model to obtain the area including the suspected flame pattern, and then obtain the detection frame information, and cut the obtained original image information through the detection frame information to obtain the image information to be detected. This method effectively extracts the characteristic flame image information that needs to be detected from the original image information, simplifies the image data that needs to be detected, and thus realizes efficient detection of flames in multiple scenes.

[0078] In some specific embodiments, the present invention first obtains the original image information, obtains each input frame image data, and obtains its corresponding length and width data by calculation. Through a preset target detection model such as YoloV5, each input frame graphic data is detected, and the method can obtain the detection frame information corresponding to each input frame graphic data. The detection frame information includes the minimum coordinate value of the X-axis, the maximum coordinate value of the X-axis, the minimum coordinate value of the Y-axis, the maximum coordinate value of the Y-axis, and the detection frame confidence of each detection frame. After completing the above operations, the method can use the corresponding detection frame information to crop each input frame image data to obtain the image information to be detected.

[0079] Reference Figure 3 In some embodiments, step S200 includes:

[0080] S210, analyzing the image to be detected to obtain image frame data;

[0081] S220, filtering the image frame data through the filtering model to obtain a frame difference mask model;

[0082] S230, calculating the image to be detected by using a frame difference mask model to obtain a motion area map.

[0083] The multi-scene flame detection method provided by the present invention can parse the image to be detected to obtain image frame data containing each input frame graphic data, thereby filtering out the data portion corresponding to the stationary object contained in the image frame data through a screening model to obtain a frame difference mask model, and then screening each input frame graphic data in the image frame data according to the motion area map according to the frame difference mask model to obtain the change area of ​​the image frame data, thereby obtaining a motion area map.

[0084] In some specific embodiments, the multi-scene flame detection method provided by the present invention can obtain K cropped images corresponding to the past K consecutive frames in the image to be detected to obtain a first set to be processed. Through a preset screening model such as YoloV5, the method can generate a differential mask containing only a value of 0 or a value of 1, wherein the valid position portion corresponds to a value of 1 and the invalid position portion corresponds to a value of 0, and calculate the differential mask corresponding to its cropped image to obtain a corresponding motion area map.

[0085] Reference Figure 4 In some embodiments, step S300 includes:

[0086] S310, comparing the motion region map according to a preset color threshold to obtain a color difference map;

[0087] S320, performing sum calculation on the color difference image to obtain a calculated value;

[0088] S330, dividing the calculated value by the area of ​​the image to be detected to obtain a difference value.

[0089] The multi-scenario flame detection method provided by the present invention can compare the motion region map according to a preset color threshold to obtain a color difference map after color discrimination, and perform sum calculation on the color difference map to obtain a calculated value, and perform a division operation on the calculated value and the area of ​​the image to be detected to obtain a differential value. Specifically, the present invention first performs channel separation on the change area in the motion region map to obtain a three-channel image and a corresponding image at each moment in the motion region map. This method can be performed by a preset pixel-by-pixel indicator function and , and obtain a color difference map. For example, in some specific embodiments, the color difference map Among them, "∧" represents: "AND" operation. When the conditions in the brackets in the formula are met, the color difference map Ω k The value of is "1"; in addition, σ R The present invention can obtain the differential value ΔU in the corresponding motion area map by summing the calculated value obtained by calculating the color difference map at each moment and dividing it by the area of ​​the image to be detected. k . Specifically, Through this method, the present invention effectively provides a basis for judging the color of the motion area map, and provides a technical basis for realizing the color judgment of the motion area map, the preliminary screening of the flames in the scene, and the automatic screening of the flames.

[0090] In step S400 of some embodiments, by comparing the differential value with a preset first discrimination threshold, the method can make a preliminary judgment on whether there is a flame in the current motion area map, and obtain a corresponding comparison result, wherein the comparison result includes a first comparison result and a second comparison result, so that when the first comparison result is obtained, the corresponding discrimination confidence can be calculated according to the motion area map.

[0091] In some embodiments, after step S400, the following steps are further included:

[0092] When the second comparison result is received, second scene information is generated.

[0093] The multi-scene flame detection method provided by the present invention can suppress the detailed output of the second scene information by detecting the second comparison result obtained, so as to end the judgment process of the flame pattern detection in the current scene, thereby improving the judgment speed of flame detection in multiple scenes, reducing the detection steps required for the multi-scene flame judgment method, effectively reducing the occupation of system resources and effectively improving the detection efficiency of the flame detection method.

[0094] Reference Figure 5 In some embodiments, step S500 includes:

[0095] S510, generating a first discriminant function and a second discriminant function according to the image information to be detected and a preset boundary value;

[0096] S520, calculating the average of the first discriminant function and the second discriminant function to generate a discriminant confidence.

[0097] The multi-scene flame detection method provided by the present invention can generate a first discriminant function and a second discriminant function according to the image information to be detected and a preset boundary value, and calculate the average value of the first discriminant function and the second discriminant function to generate a discriminant confidence that can be used to discriminate whether there is a flame in the current scene, thereby calculating whether there is a flame in the current scene through the discriminant confidence, and the preset boundary value includes a first upper boundary value, a first lower boundary value, a second upper boundary value and a second lower boundary value. Specifically, by obtaining the first comparison result output in the past continuous K frames, the present invention can obtain the average scale change value ΔS corresponding to the corresponding continuous K frames k ,in Correspondingly, Respectively represent the height and width of the detection frame at time j, It can be obtained according to the window size of the image information to be detected. By changing the average scale value ΔS k With the preset first upper boundary value and the preset first lower boundary value By comparison, this method can obtain the first discriminant function f s ().in It is used to determine whether a suspected flame pattern detected in a scene is jittering according to the characteristics of flame jittering.

[0098] The present invention can also be performed by the image information to be detected, the preset second upper boundary value and the preset second lower boundary value Calculate whether the suspected flame pattern in the current scene has strong mobility, so as to judge whether there is flame in the current scene. Specifically, the present invention obtains the average moving distance ΔC corresponding to the past K consecutive frames of the image information to be detected by obtaining the past K consecutive frames of the image information to be detected. k .in, And by the average moving distance ΔC k With the preset upper boundary value and the preset lower boundary value Compare and get the second discriminant function f c (),in And through f s (k) and f c (k) Calculate the average value to get the confidence level p k ,in And for each confidence p in the past K frames k The average value is calculated to obtain the confidence level p, where

[0099] In step S600 of some embodiments, by comparing the judgment confidence with a preset second judgment threshold, the method can further judge whether there is a flame within the current motion area map, and obtain judgment data based on the judgment result, wherein the judgment data includes first judgment data and second judgment data, so that when the first judgment data is obtained, the motion area map can be detected according to a preset detection model to obtain the first scene information or the second scene information.

[0100] In some embodiments, after step S600, the method further includes:

[0101] When the second discrimination data is received, the second scene information is output.

[0102] The multi-scene flame detection method provided by the present invention can directly output the second scene information when the second discrimination data is obtained, so that when the method detects the flame pattern in the scene for the second time, the flame condition in the current scene can be quickly judged according to the discrimination data, thereby effectively improving the discrimination efficiency of the method for flame detection and reducing the load of the method on system resources.

[0103] Reference Figure 6 In some embodiments, step S700 includes:

[0104] S710, extracting a feature database of the image information to be detected according to the detection model;

[0105] S720, performing matching processing on each piece of data information in the feature database and the flame label file corresponding to the data information to obtain a flame label set;

[0106] S730, obtaining the cosine similarity corresponding to the feature database;

[0107] S740, filtering the flame label files in the flame label set according to the cosine similarity to obtain pending flame label data;

[0108] S750, calculating the average value of the flame tag data to be determined to obtain a third discriminant function;

[0109] S760, obtaining a detection threshold according to the number of flame label files in the pending flame label data;

[0110] S770, performing one of the following steps according to the third discriminant function and the detection threshold:

[0111] S771, if the function value of the third discriminant function within the preset detection period is greater than the detection threshold, generating first scene information; or

[0112] S772: If the function value of the third discriminant function within the preset detection period is less than or equal to the detection threshold, the second scene information is generated.

[0113] The multi-scenario flame detection method provided by the present invention can extract the feature database in the image information to be detected through the detection model, and match each data information in the feature database with the corresponding flame label file to obtain a flame label set. The present invention can obtain pending flame label data by calculating the cosine similarity corresponding to the feature database, and filtering the flame label files in the flame label set according to the cosine similarity, and then obtain the third discriminant function by calculating the average value of the pending flame label data. Through the third discriminant function, the present invention can perform one of the following steps according to the third discriminant function and the detection threshold: if the function value of the third discriminant function is greater than the detection threshold within the preset detection period, the first scene information is generated; or, if the function value of the third discriminant function within the preset detection period is less than or equal to the detection threshold, the second scene information is generated. Through this method, the present invention can effectively re-discriminate the image information that has been screened twice, and then provide a multi-scenario flame detection method that can automatically identify flame graphics and has higher recognition accuracy.

[0114] In some specific embodiments, the present invention can form a detection model through a preset deep convolutional network such as Resnet-34, and use this detection model to extract features from each input frame image data in the acquired motion area map to obtain a feature embedding vector E corresponding to each input frame image data. m , thus forming a feature database E = (E1, E2, ..., E m). At the same time, record the real flame label G = (g1, g2, ..., g m ), and match the feature database E with the real flame tag G to generate a flame tag set. The present invention can also call a preset KNN algorithm, and obtain a feature point E in the feature database through the KNN algorithm t The corresponding cosine similarity sim(E t , E j ),in A feature point E t The selection of is determined by whether a flame pattern is detected at the corresponding time t. The present invention uses the cosine similarity sim(E t , E j ) Filter out the real flame label G and E t Similar data points, and the filtered data points g1, g2, ..., g k As the flame label file, the pending flame label data is obtained, and the pending flame label data is averaged according to the cosine similarity to obtain the third discriminant function g t ,in The present invention obtains g1, g2, ..., g k The number of can confirm that the detection threshold is k / 2. In some specific embodiments, the detection threshold can also be fixed to 0.5, and the detection threshold is compared with the value of the third discriminant function to determine whether there is a flame pattern in the current scene. Specifically, when, When the present invention determines that there is a flame pattern in the current scene, and outputs the first scene information; or when When the flame pattern does not exist in the current scene, the present invention determines that the flame pattern does not exist in the current scene and outputs the second scene information.

[0115] In some other embodiments, the multi-scenario flame detection method provided by the present invention can also automatically optimize and correct the method according to different scenarios. Specifically, the present invention can obtain the third discriminant function g t The fourth discriminant function f is obtained by combining the discriminant threshold k / 2 knn ,in When the fourth discriminant function f knn When the detection image information is verification error information, the feature embedding vector and flame label file of the corresponding detection image information are obtained, and the feature embedding vector is added to the feature database E, and the flame label file is added to the real flame label, so as to enrich and continuously update the multi-scene flame detection method provided by the method, improve the corresponding learning ability of the detection model provided by the method, and improve the discrimination accuracy of the method in different scenarios.

[0116] In a second aspect, the present invention provides a multi-scenario flame detection device, comprising:

[0117] at least one processor, and

[0118] A memory communicatively coupled to at least one processor

[0119] In which, instructions are stored in the memory, so that when at least one processor executes the instructions, the multi-scenario flame detection method as in the embodiment of the first aspect of the present invention can be implemented.

[0120] The multi-scenario flame detection device provided by the present invention can execute instructions stored in a memory through a processor to implement the multi-scenario flame detection method provided by the first aspect of the present invention, thereby obtaining the image information to be detected corresponding to different scenes, and screening the image information to be detected through a preset screening model to obtain a motion area map that may contain flame graphics within a period of time. By performing color analysis processing on the motion area map, the method can obtain the color information corresponding to all image information in the current motion area map and form a differential value. By comparing the differential value with a preset first discrimination threshold, the method can make a preliminary judgment on whether there is a flame in the current motion area map, and obtain a corresponding comparison result, wherein the comparison result includes a first comparison result and a second comparison result, and when the first comparison result is obtained, the corresponding discrimination confidence is calculated according to the image information to be detected. By comparing the discrimination confidence with the preset second discrimination threshold, the method can further judge whether there is a flame within the current range of the image information to be detected, and obtain discrimination data according to the judgment result, wherein the discrimination data includes the first discrimination data and the second discrimination data, and when the first discrimination data is obtained, the image information to be detected is detected according to the preset detection model to obtain the first scene information or the second scene information. Through this method, the present invention can preliminarily screen the image information to be detected in the current scene, and by performing two analysis and comparisons on the image data in the motion area map, accurately judge whether there is a flame in the current scene, so as to detect the final comparison result again through the detection model to realize the final judgment of the flame information in the current scene, and then realize the automatic and efficient detection of the flame in the scene.

[0121] In a third aspect, the present invention provides a computer-readable storage medium, which stores computer-executable instructions for causing a computer to execute the multi-scenario flame detection method of the first aspect of the present invention.

[0122] By executing the computer instructions in the computer-readable storage medium provided by the present invention, the present invention can implement the multi-scenario flame detection method provided by the first aspect embodiment, thereby obtaining the image information to be detected corresponding to different scenes, and screening the image information to be detected through a preset screening model to obtain a motion area map that may contain flame patterns within a period of time. By performing color analysis processing on the motion area map, the present method can obtain the color information corresponding to all the image information in the current motion area map and form a differential value. By comparing the differential value with a preset first discrimination threshold, the present method can make a preliminary judgment on whether there is a flame in the current motion area map, and obtain a corresponding comparison result, wherein the comparison result includes a first comparison result and a second comparison result, and when the first comparison result is obtained, the corresponding discrimination confidence is calculated according to the image information to be detected. By comparing the discrimination confidence with the preset second discrimination threshold, the method can further judge whether there is a flame within the current range of the image information to be detected, and obtain discrimination data according to the judgment result, wherein the discrimination data includes the first discrimination data and the second discrimination data, and when the first discrimination data is obtained, the image information to be detected is detected according to the preset detection model to obtain the first scene information or the second scene information. Through this method, the present invention can preliminarily screen the image information to be detected in the current scene, and by performing two analysis and comparisons on the image data in the motion area map, accurately judge whether there is a flame in the current scene, so as to detect the final comparison result again through the detection model to realize the final judgment of the flame information in the current scene, and then realize the automatic and efficient detection of the flame in the scene.

[0123] The embodiments of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above embodiments. Various changes can be made within the knowledge of ordinary technicians in the relevant technical field without departing from the purpose of the present invention. In addition, the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.

Claims

1. A multi-scenario flame detection method, characterized in that: include: Obtaining image information to be detected; The image information to be detected is screened and processed by a preset screening model to generate a motion area map; Performing color analysis on the motion area map to obtain a differential value; Comparing the difference value with a preset first discrimination threshold to obtain a comparison result; wherein the comparison result includes a first comparison result or a second comparison result; When the first comparison result is received, a judgment confidence is calculated based on the image information to be detected; Comparing the discrimination confidence with a preset second discrimination threshold to obtain discrimination data; The discrimination data includes first discrimination data and second discrimination data; When the first discrimination data is received, the image information to be detected is detected according to a preset detection model to generate first scene information or second scene information; Wherein, when the first comparison result is received, calculating and generating the determination confidence according to the image information to be detected includes: Determine, according to the image information to be detected, an average scale change value corresponding to K consecutive frames; Comparing the average scale change value, the preset first upper boundary value, and the preset first lower boundary value to obtain a first discriminant function; Determine the average moving distance corresponding to K consecutive frames according to the image information to be detected; Compare the average moving distance, the preset second upper boundary value, and the preset second lower boundary value to obtain a second discriminant function; An average value is calculated for the first discriminant function and the second discriminant function to generate the discriminant confidence.

2. The multi-scenario flame detection method according to claim 1, characterized in that: The differential value is compared with a preset first discrimination threshold to obtain a comparison result; wherein after the comparison result includes the first comparison result or the second comparison result, the method further includes: When the second comparison result is received, second scene information is generated.

3. The multi-scenario flame detection method according to claim 1, characterized in that: The determination confidence is compared with a preset second determination threshold to obtain determination data; After the discrimination data includes the first discrimination data and the second discrimination data, the method further includes: When the second discrimination data is received, second scene information is output.

4. The multi-scenario flame detection method according to any one of claims 1 to 3, characterized in that: The obtaining of the image information to be detected comprises: Get original image information; Detect the original image information according to a preset target detection model to obtain detection frame information; The original image information is cropped according to the detection frame information to obtain the image information to be detected.

5. The multi-scenario flame detection method according to any one of claims 1 to 3, characterized in that: The method of screening the image information to be detected by using a preset screening model to generate a motion area map includes: Analyzing the image to be detected to obtain image frame data; The image frame data is screened and processed by the screening model to obtain a frame difference mask model; The image to be detected is calculated using the frame difference mask model to obtain the motion area map.

6. The multi-scenario flame detection method according to any one of claims 1 to 3, characterized in that: The step of performing color analysis on the motion region map to obtain a differential value includes: Comparing the motion region map according to a preset color threshold to obtain a color difference map; Performing a sum calculation on the color difference map to obtain a calculated value; The calculated value is divided by the area of ​​the image to be detected to obtain the difference value.

7. The multi-scenario flame detection method according to any one of claims 1 to 3, characterized in that: When the first discrimination data is received, detecting the image information to be detected according to a preset detection model to generate first scene information or second scene information includes: Extracting a feature embedding vector of the image information to be detected according to the detection model, and constructing a feature database according to the feature embedding information; Perform matching processing on each piece of data information in the feature database and the flame label file corresponding to the data information to obtain a flame label set; Obtaining the cosine similarity corresponding to the feature embedding vector in the feature database; Filter the flame label files in the flame label set according to the cosine similarity to obtain pending flame label data; Calculating the average value of the pending flame tag data to obtain a third discriminant function; Obtaining a detection threshold according to the number of the flame tag files in the pending flame tag data; Perform one of the following steps according to the third discriminant function and the detection threshold: If the function value of the third discriminant function within the preset detection period is greater than the detection threshold, generating the first scene information; or, If the function value of the third discriminant function within a preset detection period is less than or equal to the detection threshold, the second scene information is generated.

8. Multi-scenario flame detection equipment, characterized in that: include: at least one processor, and a memory communicatively coupled to the at least one processor; Wherein, the memory stores instructions, so that when the at least one processor executes the instructions, the multi-scenario flame detection method according to any one of claims 1 to 7 is implemented.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the multi-scenario flame detection method according to any one of claims 1 to 7.