Fire early warning method based on video analysis
By using a fire identification network in the fire detection system, combining the characteristic changes of flame and smoke and wind speed data, the problem of high false alarm rate in the existing technology is solved, and more accurate fire situation judgment and fire alarm are achieved.
Patent Information
- Application Number
- CN202510457983.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-04-14
AI Technical Summary
Existing fire detection technology is prone to false alarms in actual scenarios, especially in artificially controlled fire use scenarios, which affects the effect of the fire early warning system.
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 determine the possibility of fire conditions and determine whether to conduct fire alarms.
By comprehensively considering the intensity of the flame, the degree of smoke spread and its changing trends, and combining wind speed data, the fire situation can be more accurately judged, false alarms can be reduced, and the reliability and practicality of the system can be improved.
Smart Images

Figure CN119992466A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and more specifically, to a fire early warning method based on video analysis. Background Art
[0002] In densely packed buildings, there are often a large number of people living there, and the distance between buildings is very small, making it difficult for people to evacuate. Once a fire occurs, the fire will spread quickly, and it is difficult for fire trucks to pass through in this environment, which brings certain difficulties to the rescue of people and the extinguishing of the fire. Therefore, early warning before the fire occurs is an effective way 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 publication number CN115271659A discloses a method and system for early warning of urban fire hazards based on video analysis, which involves the field of smart city technology. The video information of the target building object is analyzed through a fire hazard feature recognition model to obtain video hazard features, and additional recognition feature analysis is performed according to the building attribute information of the target building object to generate auxiliary recognition features, and the auxiliary recognition features are added to the video hazard features for feature combination, and the hazard risk level analysis is performed to obtain the hazard risk coefficient and output the hazard warning information according to the hazard risk coefficient. The technical problem that the existing technology focuses on rescue but not warning for urban fire hazards, resulting in the continued infringement of people's lives and property safety and waste of fire police resources is solved.
[0004] The application document achieves the technical effect of issuing warnings of hidden danger risks before the danger occurs by analyzing the risk coefficient of hidden dangers, facilitating timely elimination of dangers, and protecting people's property and life safety from infringement. However, there are some artificially controllable fire scenes in actual scenes, such as cooking, barbecue, etc., which also produce fire characteristics such as fireworks, but they are artificially controllable fire scenes. The existing fire detection technology only uses target detection to identify fireworks, which will identify such scenes as fires and produce false alarms, affecting the effectiveness of the fire warning system. Summary of the invention
[0005] In order to solve the problem that in actual scenarios, there are some human-controllable fire scenarios, which may identify such scenarios as fire situations and generate false alarms, thus 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 and wind speed data containing open flames and smoke in various scenes, and constructing a data set, training a preset neural network according to the data set to obtain a fire recognition network, and marking the open flames and smoke in the current frame image; determining the flame intensity of the current frame image according to the current frame image and the frame image at a preset time before, using the size of the flame target frame extracted by the fire recognition network and the grayscale value of the pixel points in the target frame; determining the smoke diffusion degree of the scene corresponding to the current frame image according to the smoke target frame, flame intensity and wind speed data extracted from the current frame image; determining the possibility of a fire in the scene corresponding to the current frame image according to the changing trend of the flame intensity and smoke diffusion degree of 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 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 .
[0007] The effect is: by comprehensively considering the intensity of the flame, the degree of smoke diffusion and its changing trend, combined with wind speed data, the fire situation can be judged more accurately. By analyzing the size and position changes of the flame target frame and the grayscale value of the pixels in the target frame, the intensity of the flame can be accurately assessed.
[0008] Preferably, the training process of the fire identification network includes: Different labels are set 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.
[0009] Preferably, 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.
[0010] 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.
[0011] Preferably, 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.
[0012] 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.
[0013] Preferably, the smoke diffusion degree 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.
[0014] The effect is that 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, the size of the smoke area in the image is reflected. The larger the ratio, the wider the smoke range and the higher the possibility of fire. By using wind speed data as an exponential power of the degree of diffusion, the actual situation of smoke diffusion can be more accurately evaluated. The greater the wind speed, the wider the smoke diffusion range may be, but it is not necessarily caused by fire. This method can reduce the interference of wind speed on fire judgment and improve the accuracy of the system.
[0015] Preferably, 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.
[0016] The effect is that the diffusion degree reflects the diffusion range of smoke in the image. The wider the diffusion range, the more obvious the smoke diffusion and the higher the possibility of fire. By calculating the difference between the area of the circumscribed rectangle and the sum of the areas of the smoke target frame, the diffusion of smoke can be evaluated more accurately.
[0017] Preferably, the determining whether to issue a fire alarm includes: 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.
[0018] In a second aspect, a fire warning system based on video analysis includes: a processor and a memory, wherein 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.
[0019] The present invention has the following effects: 1. The present invention can effectively distinguish normal fire scenes from actual fire conditions by analyzing the characteristics of flames and smoke and their changing trends; the fire conditions can be comprehensively judged by combining the size and position changes of the flame target frame and the area and diffusion degree of the smoke target frame with wind speed data, thereby reducing false alarms caused by normal fire scenes and improving the reliability and practicality of the system.
[0020] 2. By considering the influence of wind speed on smoke diffusion, the present invention can judge the fire situation more accurately. It is not only suitable for indoor scenes, but also can effectively handle fire detection in outdoor scenes. It can maintain high detection accuracy even in outdoor environments with high wind speeds. By calculating the changing trends of flame intensity and smoke diffusion, the system can quickly assess the fire risk of the current scene. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein: Figure 1 It is a method flow chart of steps S1 to S3 in a fire warning method based on video analysis in an embodiment of the present invention.
[0022] Figure 2 It is a schematic diagram of the circumscribed rectangle of all smoke target frames in a fire warning method based on video analysis according to an embodiment of the present invention.
[0023] Figure 3 The present invention is a structural block diagram of a fire warning system based on video analysis. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0025] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0026] Reference Figure 1 A fire warning method based on video analysis includes steps S1 to S3, which are as follows: S1: Obtain images and wind speed data containing open flames and smoke in various scenes, 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.
[0027] The training process of the fire recognition network includes: Different labels are set 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.
[0028] In this embodiment, the YOLOv5 target detection neural network is a well-known technology in the field and will not be described in detail. A pre-trained model based on the COCO data set is used, and the implementer can select the pre-trained model of the corresponding data set according to the actual situation. The wind speed data is collected using a wind speed sensor.
[0029] Further analysis: Usually, the occurrence of fire is accompanied by a large amount of flames that continue to expand, with a strong movement pattern, while normal production and life fires are usually relatively stable with a relatively smooth movement pattern. Therefore, the intensity of the flame in the flame target frame is obtained. The specific steps are as follows: S2: According to the current frame image and the frame image at the previous preset moment, the size of the flame target frame extracted by the fire recognition network and the grayscale value of the pixels 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.
[0030] Flame severity, including: 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.
[0031] Specifically, the flame intensity satisfies the following relationship: ; In the formula, Indicates The intensity of the flame in the frame image, Indicates The sum of the areas of all flame target frames in the frame image, Indicates the area size of the frame image. Indicates the number of frame images at a preset time before the frame image. Indicates the width of the frame image. Indicates the height of the frame image. Indicates The horizontal coordinate of the center point of the largest flame target frame in the frame image in the image, Indicates Frame image before The horizontal coordinate of the center point of the largest flame target frame in the image collected in seconds, Indicates Frame image before The vertical coordinate of the center point of the largest flame target frame in the image collected in seconds, Indicates Frame image before The vertical coordinate of the center point of the largest flame target frame in the image collected in seconds.
[0032] In this embodiment, the preset number of frame images is , the implementer can determine the size of the preset time period and the number of images according to the actual situation. Due to the irregularity of the flame shape, multiple flames will be generated when a fire occurs, thereby identifying multiple flame target frames. When the fire continues to expand, the scattered flames will merge into one flame. Therefore, in the present invention, only the target frame of the flame with the largest target frame is used to measure the movement pattern of the flame.
[0033] That is to say, Indicates the size of the flame range in the image. The larger the value, the greater the possibility that there is a fire in the corresponding scene of the image. The smaller the value, the smaller the possibility that there is a fire in the corresponding scene of the image.
[0034] and They represent the degree of change in the horizontal position and the vertical position of the flame target frame respectively. The larger the two values, the faster the flame spreads, the more uncontrollable the flame in the current scene may be, and the higher the possibility of a fire. The smaller the two values, the more stable the flame state, the more controllable the flame in the current scene may be, and the lower the possibility of a fire.
[0035] It indicates the intensity of the flame movement in the current scene. The larger the value, the more intense the flame movement. The more likely the flame in the current scene is to expand over a large area and cause a fire, and the higher the possibility of a fire in the current scene. The smaller the value, the steadier the flame movement. The less likely the flame in the current scene is to expand over a large area. At this time, the flame is more likely to be a controllable flame used in normal production and life, and the lower the possibility of a fire in the current scene.
[0036] In addition, another embodiment 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.
[0037] Specifically, the flame intensity satisfies the following relationship: ; In the formula, Indicates The intensity of the flame in the frame image, Indicates The sum of the areas of all flame target frames in the frame image, Indicates the area size of the frame image. Indicates the number of frame images preset before the frame image. Indicates The sum of the areas of all flame target boxes in the frame image.
[0038] That is to say, due to Only considering the flame range of 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 frame in a period of time before the current frame image. Make corrections, Represents the degree of change in the size of the flame target box. The larger the value, the faster the flame in the current scene spreads, and the higher the possibility of a fire in the current scene. The smaller the value, the more stable and controllable the flame in the current scene, and the lower the possibility of a fire in the current scene.
[0039] Further analysis: Only considering the flame intensity of the image obtained by the flame target frame may not be able to determine the size of the fire. For example, in a scene where the image is collected outdoors but the fire is indoors, the flame image can only be collected when the fire develops to a certain extent, but it is too late to alarm at this time. In this case, there is usually a lot of smoke, and the smoke will be collected before the flame when the image is collected. Therefore, it is necessary to determine the smoke diffusion degree of the scene corresponding to the current frame image through the smoke target frame extracted from the image. The specific steps are as follows: 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.
[0040] Specifically, the smoke diffusion degree satisfies the following relationship: ; In the formula, Indicates The frame image corresponds to the degree of smoke diffusion in the scene. Indicates The intensity of the flame in the frame image, Indicates the area size of the frame image. Indicates The sum of the sizes of all smoke target frames in the frame image. Indicates The area of the bounding rectangle common to all smoke target frames in the frame image (all smoke target frames have one bounding rectangle), Indicates collection of Wind speed at the time of the frame image.
[0041] That is to say, since the intensity of the flame in the image is obtained by the flame target frame in the image, it has certain limitations. Correction is performed to obtain the smoke diffusion degree of the corresponding scene in the image. Represents the proportion of smoke in the image. The larger the value, the more smoke there is in the scene corresponding to the image, and the more likely the smoke in the scene corresponding to the image is caused by an out-of-control fire. The smaller the value, the less smoke there is in the scene corresponding to the image, and the possibility of a fire in the scene corresponding to the image is relatively small.
[0042] Indicates the degree of smoke diffusion in the image. The larger the value, the wider the smoke diffusion range in the scene corresponding to the image, and the more likely the smoke in the scene corresponding to the image is caused by an out-of-control fire. The smaller the value, the smaller the smoke diffusion range in the scene corresponding to the image, and the possibility of a fire in the scene corresponding to the image is relatively small.
[0043] At the same time, considering the influence of wind speed outdoors, the smoke from a small area will be blown to a larger area by the wind, causing a certain deviation in the judgment of the fire situation by the smoke. right Make corrections when The larger the smoke range, the more likely it is that it is caused by wind. The larger the Adjustment makes Relatively small, reducing the impact of wind speed on fire judgment. The smaller and larger the smoke area, the more likely it is caused by fire. The more hours The bigger.
[0044] Since the flame has a lag in detecting the fire, when the flame intensity obtained through the flame target frame is relatively small, a large amount of smoke may have been generated to form a large fire. right Make an upward correction. The smaller, The smaller the right The smaller the upward revision of The bigger, The larger the right The greater the upward revision.
[0045] In addition, another embodiment 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.
[0046] Specifically, the smoke diffusion degree satisfies the following relationship: ; In the formula, Indicates The frame image corresponds to the degree of smoke diffusion in the scene. Indicates The intensity of the flame in the frame image, Indicates The sum of the sizes of all smoke target frames in the frame image. Indicates The area of the bounding rectangle common to all smoke target frames in the frame image (all smoke target frames have one bounding rectangle), Indicates collection of Wind speed at the time of the frame image.
[0047] It should be noted that, refer to Figure 2 , the dotted line in the figure is the common circumscribed rectangle of the three solid rectangles.
[0048] S3: Determine the possibility of fire in the scene corresponding to the current frame image according to the change trend of the flame intensity and smoke diffusion degree of the collected image, and determine whether to issue a fire alarm.
[0049] Specifically, the possibility of fire in the current frame image satisfies the following relationship: ; In the formula, Indicates The possibility of fire in the scene corresponding to the frame image, Indicates The intensity of the flame in the frame image, Indicates The average value of the flame intensity of the frame image and the frame image at the previous preset time, Indicates The number of times the value of the flame intensity of the frame image and the frame image at the previous preset time increases in sequence, Indicates The frame image corresponds to the degree of smoke diffusion in the scene. Indicates The average value of the smoke diffusion degree of the frame image and the frame image at the previous preset time, Indicates The number of times the value of the smoke diffusion degree of the frame image and the frame image at the previous preset time is increased. Expressed as a natural constant The exponential function of base .
[0050] That is to say, and To a certain extent, it can reflect the changing trend of the intensity of the flame in the image and the degree of smoke diffusion in the corresponding scene. Due to the instability of flame and smoke, when using open flames normally, the flame will weaken and then suddenly increase, causing the intensity of the flame in the image to decrease first and then increase. The flame generated by the fire will gradually expand, or even expand significantly, causing the intensity of the flame in the image to gradually increase or even suddenly increase. Therefore, through right Make corrections, The bigger The smaller the value, the more likely it is that the intensity of the flame in the image will increase gradually or even suddenly. The larger the value, the greater the possibility of fire in the scene. The smaller it is, the more likely that the intensity of the flame in the image will decrease first and then increase, or even decrease gradually. The smaller it is, the less likely it is that a fire exists in the scene. The principle of the influence of smoke and smoke diffusion on the possibility of a fire in the scene is similar and will not be elaborated here.
[0051] For example, if the intensity of the flame in the current frame image is different from that in the previous frame image, The flame intensity of five images within one second is a sequence of changes in the flame intensity of the current frame image. For example, the sequence is: The current frame image and the previous seconds The flame intensity of the current frame image is 0.6, and 0.5, 0.4, 0.3, 0.2 and 0.1 are the flame intensity of the image 1 second, 2 seconds, 3 seconds, 4 seconds and 5 seconds before the current frame image. The flame intensity of each second image is 0.1 different from that of the previous second image. , then it means The number of times the value of the flame intensity of the frame image and the frame image at the previous preset time is increased is 0, for example ,but ,like ,but .
[0052] 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.
[0053] In this embodiment, the safety threshold is 0.6.
[0054] The present invention also provides a fire warning system based on video analysis. Figure 3As shown, the system includes a processor and a memory, wherein 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.
[0055] The system also includes other components familiar to those skilled in the art, such as a communication bus and a communication interface. The configuration and functions of these components are known in the art and will not be described in detail here.
[0056] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus or device. For example, a computer-readable storage medium may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of a device or accessible or connectable to a device. Any application or module described in the present invention may be implemented by computer-readable / executable instructions stored or otherwise maintained by such a computer-readable medium.
[0057] In the description of this specification, "plurality" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.
[0058] Although this specification has shown and described a number of 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. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.
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, Indicated by 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: Different labels are set 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. A 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
Cited By
Fire extinguishing monitoring system based on image processing
CN120510567A
A fire extinguishing monitoring system based on image processing
CN120510567B