A fire warning method based on video analysis

By using a fire identification network in the fire detection system, combining image features and wind speed data, comprehensively judging the fire situation, the problem of high false alarm rate in the existing technology is solved, and the accuracy and reliability of the fire early warning system is improved.

CN119992466BActive Publication Date: 2025-06-10ZHONGNAN INFORMATION TECH (SHENZHEN) CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510457983.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-14
Publication Date
2025-06-10
Estimated Expiration
2045-04-14

AI Technical Summary

Technical Problem

Existing fire detection technology is prone to false alarms when identifying artificially controllable fire use scenarios, affecting the effectiveness of the fire early warning system.

Method used

By obtaining images and wind speed data containing open flames and smoke, building a data set and training a preset neural network to obtain a fire recognition network. Combining the size, position changes of the flame target frame, the area and diffusion degree of the smoke target frame, combined with wind speed data, comprehensively judge the fire situation.

Benefits of technology

Effectively distinguish between normal fire scenes and actual fire situations, reduce false alarms, improve the reliability and practicality of the system, and is suitable for indoor and outdoor scenes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119992466B_ABST
    Figure CN119992466B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology. More specifically, the present invention relates to a fire warning method based on video analysis. The method includes: acquiring images containing open flames and smoke and wind speed data in various scenarios, and constructing a data set to train a fire recognition network to label the open flames and smoke in the current frame image; calculating the intensity of the flame by using the size of the flame target box extracted by the fire recognition network and the gray values of the pixel points within the target box; combining the smoke target box, the intensity of the flame, and the wind speed data to determine the degree of smoke diffusion in the scene corresponding to the current frame image; evaluating the possibility of a fire situation and determining whether to issue a fire alarm by analyzing the changing trends of the intensity of the flame and the degree of smoke diffusion. The present invention makes a comprehensive judgment on the fire situation through the size and position changes of the flame target box, the area and diffusion degree of the smoke target box, and in combination with the wind speed data, reduces false alarms, and improves the accuracy of detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing. More specifically, the present invention relates to a fire warning method based on video analysis. Background Art

[0002] In dense building complexes, a large number of people often live, and the distance between buildings is very small, making it difficult for people to evacuate. Once a fire breaks out, the fire will spread rapidly. In this environment, it is difficult for fire trucks to pass, bringing certain difficulties to the rescue of people and the extinguishment of fires. Therefore, early warning before the formation of a fire is an effective method to protect people's lives and property. Therefore, in the construction of smart communities, video surveillance is usually used to detect smoke and fire through target detection technology, and fire warnings are issued based on the detection results.

[0003] The existing Chinese patent application document with the publication number CN115271659A discloses a method and system for early warning of urban fire hazards based on video analysis, which relates to the technical field of smart cities. The video information of the target building object is analyzed through a fire hazard feature recognition model to obtain video hazard features. The additional recognition feature analysis is performed based on the building attribute information of the target building object to generate auxiliary recognition features. The auxiliary recognition features are added to the video hazard features for feature combination, and the hazard risk level analysis is carried out to obtain the hazard risk coefficient and output the hazard warning information according to the hazard risk coefficient. It solves the technical problem in the prior art that there is an overemphasis on rescue and a lack of emphasis on early warning for urban fire hazards, resulting in the infringement of people's lives and property and the waste of fire police force resources.

[0004] By analyzing the hazard risk coefficient, this application document achieves the technical effect of giving an early warning reminder of hazard risks before the occurrence of danger, facilitating the timely elimination of dangers, and protecting people's property and lives from infringement. However, in actual scenarios, there are some human-controlled fire-using scenarios, such as cooking and barbecuing, which also produce fire-related features such as smoke and fire, but are human-controlled fire-using scenarios. The existing fire detection technology only uses target detection to identify smoke and fire, which will identify such scenarios as fire and generate false alarms, affecting the effectiveness of the fire warning system. Summary of the Invention

[0005] To solve the problem that in actual scenarios, there are some human-controlled fire-using scenarios that are identified as fires and generate false alarms, affecting the effectiveness of the fire warning system, the present invention provides solutions in the following aspects.

[0006] A fire warning method based on video analysis, comprising: acquiring images containing open flames and smoke and wind speed data in various scenarios, constructing a data set, training a preset neural network according to the data set to obtain a fire recognition network, and annotating the open flames and smoke in the current frame image; determining the severity of the flame in the current frame image according to the current frame image and the frame image at a previous preset moment, using the size of the flame target box extracted by the fire recognition network and the gray values of the pixel points within the target box; determining the degree of smoke diffusion in the scenario corresponding to the current frame image according to the smoke target box, the severity of the flame, and the wind speed data extracted from the current frame image; determining the possibility of a fire in the scenario corresponding to the current frame image according to the change trends of the severity of the flame and the degree of smoke diffusion in the acquired image, and judging whether to issue a fire alarm; wherein, the possibility of a fire in the current frame image satisfies the following relational expression: ; in the formula, and respectively represent the severity of the flame and the degree of smoke diffusion in the th frame image, and respectively represent the average values of the severity of the flame and the degree of smoke diffusion between the th frame image and the frame image at a previous preset moment, and respectively represent the number of increasing values in the sequences corresponding to the severity of the flame and the degree of smoke diffusion between the th frame image and the frame image at a previous preset moment, represents the exponential function with the natural constant as the base.

[0007] The effect is that: by comprehensively considering the severity of the flame, the degree of smoke diffusion and their change trends, and combining the wind speed data, the fire situation can be judged more accurately. By analyzing the size, position change of the flame target box and the gray values of the pixel points within the target box, the severity of the flame can be accurately evaluated.

[0008] Preferably, the training process of the fire recognition network includes:

[0009] Setting different labels for the data set, where the labels include: smoke, flame, and background;

[0010] The preset neural network structure is the YOLOv5 object detection neural network. Using the cross-entropy loss function and the IOU loss function, when the cross-entropy loss and the IOU loss remain stable within multiple training cycles and no longer decrease significantly, the model training is completed to obtain the fire recognition network.

[0011] Preferably, the severity of the flame includes: ​

[0012] Taking the current frame image as the target image, the ratio of the sum of the areas of all flame target frames in the target image to the area of ​​the target image is calculated to obtain the proportion of the flame area; the absolute difference between the horizontal coordinate and the vertical coordinate of the center point of the largest flame target frame in the target image and the horizontal coordinate and the vertical coordinate of the center point of the largest flame target frame in the frame image at the previous preset time is calculated and summed, and then divided by the width and height of the target frame image respectively to obtain the horizontal and vertical change degrees of the flame;

[0013] The intensity of flame movement is obtained by dividing the average value of the sum of the lateral change degree and the longitudinal change degree by the number of frame images at the previous preset time; the product of the proportion of flame area and the intensity of flame movement is taken as the flame intensity of the target image.

[0014] The effect is that the flame area ratio can reflect the size of the flame in the image. The larger the ratio, the wider the flame range and the higher the possibility of fire; the movement of the flame in the image is reflected by analyzing the change of the flame position. The greater the degree of change, the more violent the flame movement and the higher the possibility of fire; by comprehensively considering the flame area ratio and the intensity of flame movement, the severity of the fire can be judged more accurately, providing support for timely fire extinguishing measures.

[0015] Preferably, the flame intensity also includes:

[0016] Taking the current frame image as the target image, calculate the ratio of the sum of the areas of all flame target frames in the target image to the area of ​​the target image to obtain the proportion of the flame area;

[0017] Calculate the absolute difference between the sum of the areas of all flame target frames in the target image and the sum of the areas of all flame target frames in the frame image at the previous preset moment, and divide the sum by the number of frame images at the previous preset moment to obtain the average value of the change in flame area between the target image and the frame image at the previous preset moment;

[0018] The product of the proportion of the flame area and the average value of the flame area change is taken as the flame intensity of the target image.

[0019] The effect is that the change in flame area reflects the expansion of the flame over time. The greater the change, the faster the flame area grows and the higher the possibility of fire. It can capture the dynamic changes of the flame and help the system identify whether the flame is continuing to expand, so as to more accurately assess the severity of the fire.

[0020] Preferably, the smoke diffusion degree includes:

[0021] Taking the current frame image as the target image, calculate the ratio of the sum of the areas of all smoke target frames in the target image to the area of ​​the target image to obtain the smoke proportion;

[0022] Calculate the difference between the area of the circumscribed rectangle common to all smoke target boxes in the target image and the sum of the areas of all smoke target boxes in the target image, and then divide it by the area of the circumscribed rectangle common to all smoke target boxes in the target image to obtain the diffusion degree. Take the wind speed data of the target image as the exponential power of the diffusion degree, and multiply it by the sum of the smoke occupancy ratio plus 1 to correct the flame intensity of the target image, and obtain the smoke diffusion degree corresponding to the scene of the target image.

[0023] Its effect is as follows: By calculating the ratio of the sum of the areas of all smoke target boxes in the target image to the area of the target image, it reflects the range size of the smoke in the image. The larger the ratio, the wider the smoke range and the higher the possibility of a fire. By taking the wind speed data as the exponential power of the diffusion degree, the actual situation of smoke diffusion can be evaluated more accurately. The greater the wind speed, the wider the possible smoke diffusion range, but it may not be due to a fire. This method can reduce the interference of wind speed on fire judgment and improve the accuracy of the system.

[0024] Preferably, the smoke diffusion degree further includes:

[0025] Taking the current frame image as the target image, calculate the difference between the area of the circumscribed rectangle common to all smoke target boxes in the target image and the sum of the areas of all smoke target boxes in the target image, and then divide it by the area of the circumscribed rectangle common to all smoke target boxes in the target image to obtain the diffusion degree;

[0026] Take the wind speed data of the target image as the exponential power of the diffusion degree, and multiply it by the sum of the smoke occupancy ratio plus 1 to correct the flame intensity of the target image, and obtain the smoke diffusion degree corresponding to the scene of the target image.

[0027] Its effect is as follows: The diffusion degree reflects the diffusion range of the smoke in the image. The wider the diffusion range, the more obvious the smoke diffusion and the higher the possibility of a fire. By calculating the difference between the area of the circumscribed rectangle and the sum of the areas of the smoke target boxes, the diffusion situation of the smoke can be evaluated more accurately.

[0028] Preferably, the judgment of whether to issue a fire alarm includes:

[0029] In response to the possibility of a fire in the scene corresponding to the real-time frame image being greater than the safety threshold, a fire alarm is issued; otherwise, it is normal.

[0030] In a second aspect, a fire warning system based on video analysis includes: a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned fire warning method based on video analysis is implemented.

[0031] The present invention has the following effects:

[0032] 1. By analyzing the characteristics of flames and smoke and their changing trends, the present invention can effectively distinguish normal fire - using scenarios from actual fire situations; through the size and position changes of the flame target box, as well as the area and diffusion degree of the smoke target box, combined with wind speed data, a comprehensive judgment of the fire situation is made, reducing false alarms caused by normal fire - using scenarios and improving the reliability and practicality of the system.

[0033] 2. By considering the influence of wind speed on smoke diffusion, the present invention can more accurately judge the fire situation, and is not only applicable to indoor scenarios, but also can effectively handle fire detection in outdoor scenarios. Even in an outdoor environment with a relatively high wind speed, it can maintain a high detection accuracy. By calculating the changing trends of the flame intensity and the smoke diffusion degree, the system can quickly evaluate the fire risk of the current scenario. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] By reading the following detailed description with reference to the accompanying drawings, the above - mentioned and other objects, features, and advantages of the exemplary embodiments of the present invention will become readily understandable. In the drawings, several embodiments of the present invention are shown in an exemplary rather than restrictive manner, and the same or corresponding reference numerals represent the same or corresponding parts, where:

[0035] Figure 1 is a flowchart of the method from step S1 to step S3 in a fire warning method based on video analysis according to an embodiment of the present invention.

[0036] Figure 2 is a schematic diagram of the circumscribed rectangle of all smoke target boxes in a fire warning method based on video analysis according to an embodiment of the present invention.

[0037] Figure 3 is a structural block diagram of a fire warning system based on video analysis according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0038] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

[0039] Next, the specific embodiments of the present invention will be described in detail with reference to the accompanying drawings.

[0040] Referring to Figure 1 , a fire warning method based on video analysis includes steps S1 - S3, specifically as follows:

[0041] S1: Obtain images containing open flames and smoke and wind speed data in various scenarios, construct a dataset, train a preset neural network based on the dataset to obtain a fire recognition network, and label the open flames and smoke in the current frame image.

[0042] The training process of the fire recognition network includes:

[0043] Set different labels for the dataset, where the labels include: smoke, flame, and background;

[0044] The preset neural network structure is the YOLOv5 object detection neural network. Use the cross-entropy loss function and the IOU loss function. When the cross-entropy loss and the IOU loss remain stable within multiple training cycles and no longer decrease significantly, complete the model training to obtain the fire recognition network.

[0045] In this embodiment, the YOLOv5 object detection neural network is a well-known technology in the art and will not be described in detail. Use a pre-trained model based on the COCO dataset. Implementers can select the pre-trained model of the corresponding dataset according to the actual situation. The wind speed data is collected using a wind speed sensor.

[0046] Further analysis: Usually, the occurrence of a fire is accompanied by a large number of continuously expanding flames, with a strong motion pattern, while the fires in normal production and life are usually relatively stable with a relatively stable motion pattern. Therefore, to obtain the severity of the flames in the flame target box, the specific steps are as follows:

[0047] S2: According to the current frame image and the frame image at a preset previous moment, use the size of the flame target box and the grayscale values of the pixel points within the target box extracted by the fire recognition network to determine the severity of the flames in the current frame image; According to the smoke target box, the severity of the flames, and the wind speed data extracted from the current frame image, to determine the degree of smoke diffusion in the corresponding scenario of the current frame image.

[0048] The severity of the flames includes:

[0049] Taking the current frame image as the target image, calculate the ratio of the sum of the areas of all flame target boxes in the target image to the area of the target image to obtain the proportion of the flame area; Calculate the sum of the absolute differences between the abscissa and ordinate of the center point of the largest flame target box in the target image and the abscissa and ordinate of the center point of the largest flame target box in the frame image at a preset previous moment, and then divide by the width and height of the target frame image respectively to obtain the horizontal change degree and the vertical change degree of the flames;

[0050] Divide the average value of the sum of the horizontal change degree and the vertical change degree by the number of frame images at a previous preset moment to obtain the intensity of flame movement; take the product of the proportion of the flame area and the intensity of flame movement as the intensity of the flame in the target image.

[0051] Specifically, the intensity of the flame satisfies the following relational expression:

[0052] ;

[0053] In the formula, represents the intensity of the flame in the th frame image, represents the sum of the areas of all flame target boxes in the th frame image, represents the area size of the frame image, represents the number of frame images at a previous preset moment of the frame image, represents the width of the frame image, represents the height of the frame image, represents the abscissa of the center point of the largest flame target box in the image in the th frame image, represents the abscissa of the center point of the largest flame target box in the image in the image collected seconds before the th frame image, represents the ordinate of the center point of the largest flame target box in the image in the image collected seconds before the th frame image, represents the ordinate of the center point of the largest flame target box in the image in the image collected seconds before the th frame image.

[0054] In this embodiment, the preset number of frame images , and the implementer can determine the size of the preset time period and the number of images according to the actual situation. Due to the irregular shape of the flame, multiple flames will be generated during a fire, thus identifying multiple flame target boxes. When the fire continues to expand, the scattered flames will merge into one flame. Therefore, in the present invention, only the target box of the flame with the largest target box is used to measure the movement pattern of the flame.

[0055] That is to say, represents the size of the flame range in the image. When this value is larger, it indicates that the possibility of a fire existing in the corresponding scene of the image is greater, and when this value is smaller, it indicates that the possibility of a fire existing in the corresponding scene of the image is smaller.

[0056] and They respectively represent the degree of change in the horizontal position and the vertical position of the flame target box. The larger these two values are, the faster the flame spreads, the more uncontrollable the flame may be in the current scenario, and the higher the possibility of a fire. The smaller these two values are, the more stable the flame state is, the more controllable the flame may be in the current scenario, and the lower the possibility of a fire.

[0057] It represents the severity of the flame movement state in the current scenario. The larger this value is, the more intense the flame movement state is, the more likely the flame in the current scenario is to expand extensively and cause a fire, so the higher the possibility of a fire in the current scenario. The smaller this value is, the smoother the flame movement state is, the lower the possibility of the flame in the current scenario expanding extensively. At this time, the flame is more likely to be a controllable flame for normal production and living use, so the lower the possibility of a fire in the current scenario.

[0058] In addition, another embodiment further includes:

[0059] Taking the current frame image as the target image, calculate the ratio of the sum of the areas of all flame target boxes in the target image to the area of the target image to obtain the proportion of the flame area;

[0060] Calculate the absolute difference between the sum of the areas of all flame target boxes in the target image and the sum of the areas of all flame target boxes in the frame image at the previous preset moment, and then sum and divide by the number of frame images at the previous preset moment to obtain the average value of the flame area change between the target image and the frame image at the previous preset moment;

[0061] Take the product of the proportion of the flame area and the average value of the flame area change as the flame severity of the target image.

[0062] Specifically, the flame severity satisfies the following relational expression:

[0063] ;

[0064] In the formula, represents the flame severity of the th frame image, represents the sum of the areas of all flame target boxes in the th frame image, represents the area size of the frame image, represents the number of frame images preset before the frame image, represents the th frame image, and

[0065] That is to say, because Only considering the size of the flame range in a single-frame image cannot measure the motion state of the flame. Therefore, the motion state of the flame is measured by the size and position of the flame target box within a certain period of time before the current frame image, and is corrected. represents the degree of change in the size of the flame target box. The larger this value, the faster the flame spreads in the current scene, and the higher the possibility of a fire in the current scene. The smaller this value, the more stable and controllable the flame is in the current scene, and the lower the possibility of a fire in the current scene.

[0066] Further analysis: Only considering the flame intensity obtained from the flame target box may not be able to determine the size of the fire. For example, in a scenario where an image is collected outdoors but the fire point is indoors, a flame image can only be collected when the fire has developed to a certain extent, but by then, it may be too late to alarm. In such cases, a large amount of smoke is usually generated, and the smoke will be collected before the flame when collecting the image. Therefore, it is necessary to determine the degree of smoke diffusion in the scene corresponding to the current frame image by extracting the smoke target box from the image. The specific steps are as follows:

[0067] Taking the current frame image as the target image, calculate the ratio of the sum of the areas of all smoke target boxes in the target image to the area of the target image to obtain the proportion of smoke;

[0068] Calculate the difference between the area of the circumscribed rectangle common to all smoke target boxes in the target image and the sum of the areas of all smoke target boxes in the target image, and then divide it by the area of the circumscribed rectangle common to all smoke target boxes in the target image to obtain the degree of diffusion. Take the wind speed data of the target image as the exponential power of the degree of diffusion, and multiply it by the sum of the proportion of smoke plus 1 to correct the flame intensity of the target image, and obtain the degree of smoke diffusion in the scene corresponding to the target image.

[0069] Specifically, the degree of smoke diffusion satisfies the following relational expression:

[0070] ;

[0071] In the formula, represents the degree of smoke diffusion in the scene corresponding to the th frame image, represents the flame intensity of the th frame image, represents the area size of the frame image, represents the th frame image, and represents the sum of the areas of all smoke target boxes in the th frame image, represents the area of the circumscribed rectangle common to all smoke target boxes in the th frame image (all smoke target boxes have a circumscribed rectangle), and Wind speed at the time of the frame image.

[0072] That is, since the intensity of the flame in the image is obtained from the flame target box in the image and has certain limitations, the degree of smoke diffusion in the corresponding scene of the image is obtained by correcting through the smoke target box of the image. Represents the proportion of smoke in the image. The larger this value, the more smoke exists in the corresponding scene of the image, and the more likely the smoke in the corresponding scene of the image is caused by an out-of-control fire. The smaller this value, the less smoke exists in the corresponding scene of the image, and the relatively smaller the possibility of a fire in the corresponding scene of the image.

[0073] Represents the degree of smoke diffusion in the image. The larger this value, the wider the smoke diffusion range in the corresponding scene of the image, and the more likely the smoke in the corresponding scene of the image is caused by an out-of-control fire. The smaller this value, the smaller the smoke diffusion range in the corresponding scene of the image, and the relatively smaller the possibility of a fire in the corresponding scene of the image.

[0074] At the same time, considering the influence of wind speed outdoors, smoke with a small range will be blown to a larger range, causing a certain deviation in the judgment of the fire situation. Therefore, is corrected for . When is larger, a larger smoke range is more likely to be caused by the wind. Therefore, when is larger, is adjusted to make relatively smaller, reducing the influence of wind speed on the judgment of the fire situation. When is smaller, a larger smoke range is more likely to be caused by the fire. Therefore, when is smaller is larger.

[0075] Since the detection of the fire by the flame has hysteresis, when the intensity of the flame obtained from the flame target box is small, a large amount of smoke may actually have been generated and a large fire has formed. Therefore, is corrected upward for . The smaller is, the smaller the upward correction degree of . The larger is, the larger the upward correction degree of .

[0076] In addition, another embodiment further includes:

[0077] Taking the current frame image as the target image, calculate the difference between the area of the circumscribed rectangle common to all smoke target boxes in the target image and the sum of the areas of all smoke target boxes in the target image, and then divide by the area of the circumscribed rectangle common to all smoke target boxes in the target image to obtain the diffusion degree.

[0078] Taking the wind speed data of the target image as the exponential power of the diffusion degree, and multiplying by the sum of the proportion of smoke plus 1, correct the flame intensity of the target image to obtain the smoke diffusion degree of the corresponding scene of the target image.

[0079] Specifically, the smoke diffusion degree satisfies the following relational expression:

[0080] ;

[0081] In the formula, represents the smoke diffusion degree of the corresponding scene of the th frame image, represents the flame intensity of the th frame image, represents the sum of the areas of all smoke target boxes in the th frame image, represents the area of the circumscribed rectangle common to all smoke target boxes in the th frame image (all smoke target boxes have a circumscribed rectangle), represents the wind speed when collecting the th frame image.

[0082] It should be noted that referring to Figure 2 , the dotted line in the figure is the circumscribed rectangle common to the three solid rectangles.

[0083] S3: Determine the possibility of a fire in the corresponding scene of the current frame image according to the change trends of the flame intensity and smoke diffusion degree of the collected image, and judge whether to issue a fire alarm.

[0084] Specifically, the possibility of a fire in the current frame image satisfies the following relational expression:

[0085] ;

[0086] In the formula, represents the possibility of a fire in the corresponding scene of the th frame image, represents the flame intensity of the th frame image, represents the average value of the flame intensities of the th frame image and the frame image at the previous preset moment, represents the The number of increasing values in the sequence of the flame intensity of the frame image and the frame image at a previous preset moment represents the smoke diffusion degree of the scene corresponding to the frame image represents the average value of the smoke diffusion degree of the frame image and the frame image at a previous preset moment represents the number of increasing values in the sequence of the smoke diffusion degree of the frame image and the frame image at a previous preset moment represents the exponential function with the natural constant as the base

[0087] That is to say and to a certain extent can reflect the change trend of the flame intensity of the image and the smoke diffusion degree of the corresponding scene. Due to the instability of the flame and smoke, when using an open flame normally, there will be a situation where the flame weakens and then suddenly intensifies, resulting in a decrease and then an increase in the flame intensity of the image. And the flame generated by a fire will gradually expand, even greatly expand, causing the flame intensity of the image to gradually increase or even suddenly soar. Therefore, by correcting For the larger the smaller, the more likely the increase in the flame intensity of the image is gradual or even sudden. Then at this time the larger, the greater the possibility that there is a fire in the scene. When the smaller, the more likely the flame intensity of the image is to decrease first and then increase, or even may gradually decrease. Then at this time the smaller, the smaller the possibility that there is a fire in the scene. The principle of the influence of smoke and smoke diffusion degree on the possibility of a fire in the scene is similar and will not be elaborated here

[0088] Exemplarily, if the flame intensity of the currently acquired frame image and the flame intensity of five images within the previous seconds are obtained, and the sequence of the change amount of the flame intensity relative to the currently acquired frame image, for example, the sequence is is the sequence of the flame intensity of the currently acquired frame image and the previous images within seconds. 0.6 is the flame intensity of the currently acquired frame image. Then 0.5, 0.4, 0.3, 0.2, and 0.1 are the flame intensities of the images corresponding to 1 second, 2 seconds, 3 seconds, 4 seconds, and 5 seconds before the current moment of the currently acquired frame image respectively. The change difference in the flame intensity of each second's image and the previous second's image is 0.1. Then at this time , it indicates that the The number of increasing values in the sequence of the intensity of flames in the frame image and the frame image at a previous preset moment is 0. For example , then , if , then .

[0089] In response to the possibility of a fire in the scene corresponding to the real-time frame image being greater than the safety threshold, a fire alarm is issued; otherwise, it is normal.

[0090] In this embodiment, the safety threshold is 0.6.

[0091] The present invention also provides a fire warning system based on video analysis. As Figure 3 shown, the system includes a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, a fire warning method based on video analysis according to the first aspect of the present invention is implemented.

[0092] The system also includes other components well-known to those skilled in the art such as a communication bus and a communication interface. Their settings and functions are known in the art, so they will not be described in detail here.

[0093] In the present invention, the aforementioned memory can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, device, or component. For example, a computer-readable storage medium can be any suitable magnetic storage medium or magneto-optical storage medium, such as resistive random access memory (RRAM), dynamic random access memory (DRAM), static random access memory (SRAM), enhanced dynamic random access memory (EDRAM), high-bandwidth memory (HBM), hybrid memory cube (HMC), etc., or any other medium that can be used to store the required information and can be accessed by an application, module, or both. Any such computer storage medium can be part of the device or accessible or connectable to the device. Any application or module described in the present invention can be implemented by computer-readable / executable instructions stored or otherwise held by such a computer-readable medium.

[0094] In the description of this specification, "a plurality of" and "several" mean at least two, such as two, three, or more, unless otherwise specifically and clearly defined.

[0095] While this specification has shown and described several embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many variations, changes, and alternative forms will occur to those skilled in the art without departing from the spirit and scope of the present invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in practicing the invention.

Claims

1. A fire warning method based on video analysis, characterized in that: include: Obtain images and wind speed data containing open flames and smoke in various scenarios, build a data set, train a preset neural network based on the data set, obtain a fire recognition network, and mark the open flames and smoke in the current frame image; According to the current frame image and the frame image at the previous preset time, the size of the flame target frame extracted by the fire recognition network and the gray value of the pixel points in the target frame are used to determine the flame intensity of the current frame image; according to the smoke target frame, flame intensity and wind speed data extracted from the current frame image, the smoke diffusion degree of the scene corresponding to the current frame image is determined; According to the changing trend of the intensity of the flame and the diffusion of the smoke in the collected image, determine the possibility of fire in the scene corresponding to the current frame image, and decide whether to issue a fire alarm; Among them, the possibility that the current frame image exists is Satisfies the following relationship: ; In the formula, , Respectively represent The intensity of the flame and the extent of smoke diffusion in the frame image, , Respectively represent The average value of the intensity of the flame and the average value of the smoke diffusion between the frame image and the frame image at the previous preset time, , Respectively represent The number of times the value of the frame image increases in the sequence corresponding to the flame intensity and smoke diffusion degree of the frame image at the previous preset time, Expressed as a natural constant The exponential function of base .

2. A fire warning method based on video analysis according to claim 1, characterized in that: The training process of the fire identification network includes: Setting different labels for the data set, where the labels include: smoke, flame and background; The preset neural network structure is the YOLOv5 target detection neural network, and the cross entropy loss function and the IOU loss function are used. When the cross entropy loss and the IOU loss remain stable during multiple training cycles and no longer decrease significantly, the model training is completed to obtain the fire recognition network.

3. A fire warning method based on video analysis according to claim 1, characterized in that: The flame intensity includes: Taking the current frame image as the target image, the ratio of the sum of the areas of all flame target frames in the target image to the area of ​​the target image is calculated to obtain the proportion of the flame area; the absolute difference between the horizontal coordinate and the vertical coordinate of the center point of the largest flame target frame in the target image and the horizontal coordinate and the vertical coordinate of the center point of the largest flame target frame in the frame image at the previous preset time is calculated and summed, and then divided by the width and height of the target frame image respectively to obtain the horizontal and vertical change degrees of the flame; The intensity of flame movement is obtained by dividing the average value of the sum of the lateral change degree and the longitudinal change degree by the number of frame images at the previous preset time; the product of the proportion of flame area and the intensity of flame movement is taken as the flame intensity of the target image.

4. A fire warning method based on video analysis according to claim 1, characterized in that: The flame intensity also includes: Taking the current frame image as the target image, calculate the ratio of the sum of the areas of all flame target frames in the target image to the area of ​​the target image to obtain the proportion of the flame area; Calculate the absolute difference between the sum of the areas of all flame target frames in the target image and the sum of the areas of all flame target frames in the frame image at the previous preset moment, and divide the sum by the number of frame images at the previous preset moment to obtain the average value of the change in flame area between the target image and the frame image at the previous preset moment; The product of the proportion of the flame area and the average value of the flame area change is taken as the flame intensity of the target image.

5. The fire warning method based on video analysis according to claim 1, characterized in that: The degree of smoke diffusion includes: Taking the current frame image as the target image, calculate the ratio of the sum of the areas of all smoke target frames in the target image to the area of ​​the target image to obtain the smoke proportion; The difference between the common circumscribed rectangular area of ​​all smoke target frames in the target image and the sum of the areas of all smoke target frames in the target image is calculated, and then divided by the common circumscribed rectangular area of ​​all smoke target frames in the target image to obtain the diffusion degree. The wind speed data of the target image is used as the exponential power of the diffusion degree and multiplied by the sum of the smoke proportion plus 1. The flame intensity of the target image is corrected to obtain the smoke diffusion degree of the scene corresponding to the target image.

6. A fire warning method based on video analysis according to claim 1, characterized in that: The smoke diffusion degree also includes: Taking the current frame image as the target image, calculate the difference between the common circumscribed rectangular area of ​​all smoke target frames in the target image and the sum of the areas of all smoke target frames in the target image, and then divide it by the common circumscribed rectangular area of ​​all smoke target frames in the target image to obtain the diffusion degree; The wind speed data of the target image is used as the exponential power of the diffusion degree and multiplied by the sum of the smoke proportion plus 1 to correct the flame intensity of the target image and obtain the smoke diffusion degree of the scene corresponding to the target image.

7. A fire warning method based on video analysis according to claim 1, characterized in that: The determining whether to issue a fire alarm comprises: In response to the possibility that a fire exists in the scene corresponding to the real-time frame image is greater than a safety threshold, a fire alarm is issued; otherwise, it is normal.

8. A fire warning system based on video analysis, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the fire warning method based on video analysis according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • City fire hazard early warning method and system based on video analysis

    CN115271659A

  • Forest fire disaster detection method based on videos

    CN107085714A

  • Fire detection device, disaster prevention facility and fire detection method

    JP2022065388A