An intelligent image fire detection method and system

By using adaptive weight maps and dynamic noise diffusion technology in image fire detection methods, combined with denoising regression and dynamic weighting mechanisms, the problems of poor fire feature separation capabilities and weak noise processing capabilities in fire detection methods are solved, and higher fire detection accuracy and efficiency are achieved.

CN119339164BActive Publication Date: 2025-04-15TEZHIJIA (CHANGSHA) IOT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411867637.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-04-15
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

The existing image fire detection methods have poor separation of fire characteristics and weak fire noise processing capabilities, resulting in poor fire detection accuracy; at the same time, poor flame edge details characteristics lead to low fire detection efficiency.

Method used

Adaptive weight maps are used to highlight the edge characteristics of flame and smoke, and the smoke and spot characteristics are simulated through dynamic noise diffusion, combined with the denoising regression process to remove noise and retain the key characteristics of flame and smoke; at the same time, the flame and smoke characteristics are finely extracted based on the dynamic weighting mechanism, and the feature diversity is enhanced through dynamic noise perturbation, and a dynamic fusion weight is introduced to generate a real enhanced image.

Benefits of technology

The accuracy and efficiency of fire detection are improved, and the generated fire images are more realistic, which can detect fire characteristics more accurately and improve detection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119339164B_ABST
    Figure CN119339164B_ABST
Patent Text Reader

Abstract

The present invention discloses an intelligent image fire detection method and system, the method includes image acquisition, image preprocessing, image enhancement and image fire detection. The present invention belongs to the field of fire detection, specifically refers to an intelligent image fire detection method and system, the scheme highlights the edge features of flames and smoke based on an adaptive weight map; effectively removes the light spots and smoke noise in the fire image based on a denoising regression process, while retaining the key features of flames and smoke; the denoising regression process effectively removes the light spots and smoke noise in the fire image, thereby improving the accuracy of the final fire detection; enhances the diversity of fire feature generation through dynamic noise disturbance, especially the sparse characteristics of the smoke area and the detail characteristics of the flame edge; introduces dynamic fusion weights, adaptively adjusts the fusion weights according to the regional distribution of fire features, thereby generating a more realistic enhanced image close to the fire scene, and improving the accuracy and efficiency of the final fire 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 fire detection, and in particular to an intelligent image fire detection method and system. Background Art

[0002] Image fire detection method is an intelligent detection method that uses computer vision technology to automatically detect fire-related features and determine whether there is a fire in the scene by analyzing images or video frames. It extracts, analyzes and classifies the significant features in the fire image. However, the general image fire detection method has the problem of poor fire feature separation ability and weak fire noise processing ability, which leads to poor fire detection accuracy; the general image fire detection method has the problem of poor processing of the detailed characteristics of the flame edge, and cannot generate high-quality fire images close to the real scene, which leads to the problem of poor fire detection efficiency. Summary of the invention

[0003] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides an intelligent image fire detection method and system. In view of the problem that the general image fire detection method has poor fire feature separation ability and weak fire noise processing ability, which leads to poor fire detection accuracy, the present invention highlights the edge features of flames and smoke based on an adaptive weight map, improves the accuracy of the initial segmentation result, simulates smoke and light spot characteristics through dynamic noise diffusion, and improves the model's ability to restore fire characteristics; based on the denoising regression process, the light spot and smoke noise in the fire image are effectively removed, while retaining the key features of flames and smoke; the denoising regression process effectively removes the light spot and smoke noise in the fire image, while retaining the key features of flames and smoke. The key features of flame and smoke are retained while the accuracy of the final fire detection is improved; the general image fire detection method has the problem that the detailed characteristics of the flame edge are not well processed and the high-quality fire image close to the real scene cannot be generated, which leads to the problem of poor final fire detection efficiency. This scheme extracts flame and smoke features based on the dynamic weighting mechanism, and enhances the diversity of fire feature generation through dynamic noise disturbance, especially the sparse characteristics of the smoke area and the detailed characteristics of the flame edge; the dynamic fusion weight is introduced to adaptively adjust the fusion weight according to the regional distribution of the fire characteristics, so as to generate a more realistic enhanced image close to the fire scene, and improve the accuracy and efficiency of the final fire detection.

[0004] The technical solution adopted by the present invention is as follows: The present invention provides an intelligent image fire detection method, which comprises the following steps:

[0005] Step S1: image acquisition;

[0006] Step S2: image preprocessing;

[0007] Step S3: image enhancement;

[0008] Step S4: Image fire detection.

[0009] Furthermore, in step S1, the image acquisition is to acquire historical fire detection image data; and to annotate the fire detection image data; annotate segmentation labels and fire labels; the segmentation labels include fire areas and non-fire areas; and the fire labels include non-fire images and fire images.

[0010] Furthermore, in step S2, the image preprocessing specifically includes the following steps:

[0011] Step S21: Initial segmentation; using pre-segmentation network , generate the initial segmentation result from the input fire image I , distinguish the fire area from the non-fire area, expressed as: ; Where A(I) is an adaptive weight map, which is calculated by the input fire image I through the regional attention module and is used to highlight the edge features of flames and smoke;

[0012] Step S22: adding noise; adding noise to the initial segmentation result and spreading it to the Step 1, generate noise data , expressed as: ; In a fire environment, the diffusion process can enhance the characteristics of smoke noise, ensuring that the denoising regression stage can effectively remove the noise unique to the fire scene; Among them, is the region-aware noise weight; It is random Gaussian noise, used to simulate the characteristics of smoke spots; is the diffusion coefficient;

[0013] Step S23: Denoising regression; Step 1 starts with the input image and the current noise result Stitching into features , expressed as: ;from Step to De-noise step by step, and iteratively update the denoising result, which can be expressed as: ;Through iterative denoising, smoke and light spot noise interference in fire images are gradually eliminated while retaining key fire features; is to extract flame features; is to extract smoke features; It is to extract background features; is the noise image at the current time step t; is the denoising result at the t-1th time step; and are the time step parameters of diffusion and denoising regression, respectively, used to control the strength of denoising; It is a conditional denoising network, combining contextual features The denoised image is generated by the information of the current time step t; z is the compensation noise, which is used to smooth the denoising regression process; It is a splicing operation;

[0014] Step S24: Early termination; monitor the stability of the fire feature distribution, pre-set the convergence threshold, and terminate the denoising when the change rate of the fire feature distribution stability is lower than the convergence threshold. Step 1 to get the intermediate denoising result ; Distribution stability change rate The calculation is expressed as: ; Splice the intermediate denoising result with the original image and pass it through the denoising network Generate the final preprocessing result y, expressed as: ; Early termination of denoising regression reduces the amount of calculation, and the final segmentation result is generated through the denoising network to meet the needs of rapid response in fire scenes; Among them, and are the flame characteristic distributions at time step t and time step t-1 respectively; and They are the smoke feature distributions at time step t and time step t-1 respectively; is the norm, take the L2 norm;

[0015] Step S25: Model training; use cross entropy loss to optimize the initial segmentation when training the pre-segmentation network; use the first Noise results for the step Optimize the final denoising, expressed as: ; When training the denoising regression network, the loss is designed based on minimizing the KL divergence between the forward distribution and the inverse distribution, expressed as: ;in, is the true fire area label of the i-th pixel; Ls is the denoising network loss function; is the predicted probability that the i-th pixel belongs to the fire area; is the denoising regression network loss; and is the loss weight; D KL is the KL divergence; is the forward distribution, which represents the distribution of generated data at step t-1 in the diffusion process; is the inverse distribution, which represents the data distribution of the t-1th step generated by the denoising regression network; It is the set of pixels in the flame area.

[0016] Furthermore, in step S3, the image enhancement is to enhance the features of the fire image, especially the flame and smoke areas, of the preprocessing result y, and specifically includes the following steps:

[0017] Step S31: Feature extraction: Input the preprocessing result to the encoder CE, perform multi-scale decomposition on the image, extract features of different resolutions layer by layer, generate feature maps, introduce the CBAM module to enhance the feature extraction process, focus on the important features of the fire area, and obtain feature representation ; expressed as: ; ;in, is the dynamic weighting coefficient; is the sigmoid function;

[0018] Step S32: Multi-scale generation; using generator G n Characteristics of encoder output Generate scale by scale, and finally output the enhanced fire image; introduce dynamic noise disturbance, and generate each scale as: ; ;in, and They are the fire images generated by the nth layer and the n-1th layer respectively; is an upsampling operation; is the dynamic noise disturbance; is the region-aware weight; is the amplitude factor; is the expected value of the smoke characteristic intensity;

[0019] Step S33: Fire area feature enhancement: Combined with the channel and spatial attention mechanism of the CBAM module, the salient features of flames and smoke in the fire image are further amplified, which is expressed as: ; is the feature map after enhancement; F is the feature map before enhancement; and They are channel attention and spatial attention respectively;

[0020] Step S34: Image fusion; the generated feature map Fuse with the input y to generate the final enhanced image F ed , expressed as: ;in, is the fusion weight;

[0021] Step S35: Adversarial optimization: Use the discriminator D to discriminate the generated results, optimize the generator and discriminator based on the adversarial loss, and It is expressed as: ; ;in, is the adaptive region weight; G is the generator; is the regularization weight; E[·] is the expectation; is the gradient of the discriminator.

[0022] Furthermore, in step S4, the image fire detection is specifically to randomly divide the historical fire detection image data after image enhancement into a test set and a training set, train the image fire detection model based on CNN and the training set, the image fire detection model uses a cross entropy loss function, and when the image fire detection model converges with the test set loss or reaches the maximum number of training times, the image fire detection model training is completed, and a prediction threshold is set in advance. When the classification success rate of the trained image fire detection model for the test set is higher than the prediction threshold, the image fire detection model is established, and the image to be detected is collected in real time and input into the established image fire detection model. If the model output is a fire image, early warning processing is performed.

[0023] The present invention provides an intelligent image fire detection system, comprising an image acquisition module, an image preprocessing module, an image enhancement module and an image fire detection module;

[0024] The image acquisition module acquires historical fire detection image data and sends the data to the image preprocessing module;

[0025] The image preprocessing module removes noise, enhances the fire area features, and generates a preprocessed segmentation result through initial segmentation, noise diffusion, and denoising regression processes; and sends the data to the image enhancement module;

[0026] The image enhancement module performs feature extraction, multi-scale generation, feature enhancement and adversarial optimization on the preprocessing results, further enhances the significance of the flame and smoke areas, generates high-quality enhanced fire images, and sends the data to the image fire detection module;

[0027] The image fire detection module uses the enhanced fire images to train a CNN-based classification model to achieve real-time detection and early warning of fire images.

[0028] The beneficial effects achieved by the present invention using the above scheme are as follows:

[0029] (1) In view of the problem that general image fire detection methods have poor ability to separate fire features and weak ability to process fire noise, which leads to poor fire detection accuracy, this scheme highlights the edge features of flames and smoke based on an adaptive weight map, improves the accuracy of the initial segmentation results, simulates smoke and light spot characteristics through dynamic noise diffusion, and improves the model's ability to restore fire features; based on the denoising regression process, the light spot and smoke noise in the fire image are effectively removed while retaining the key features of flames and smoke; the denoising regression process effectively removes the light spot and smoke noise in the fire image while retaining the key features of flames and smoke, thereby improving the accuracy of the final fire detection.

[0030] (2) In view of the problem that general image fire detection methods have poor processing of the detailed characteristics of the flame edge and cannot generate high-quality fire images close to the real scene, which leads to poor fire detection efficiency in the end, this scheme uses a dynamic weighting mechanism to finely extract flame and smoke features, and enhances the diversity of fire feature generation through dynamic noise perturbation, especially the sparse characteristics of the smoke area and the detailed characteristics of the flame edge; dynamic fusion weights are introduced to adaptively adjust the fusion weights according to the regional distribution of fire features, thereby generating more realistic enhanced images that are close to the fire scene, improving the accuracy and efficiency of the final fire detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 A schematic diagram of a flow chart of an intelligent image fire detection method provided by the present invention;

[0032] Figure 2 A schematic diagram of an intelligent image fire detection system provided by the present invention;

[0033] Figure 3 It is a schematic diagram of the process of step S3.

[0034] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION

[0035] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0036] In the description of the present invention, it is necessary to understand that terms such as “upper”, “lower”, “front”, “back”, “left”, “right”, “top”, “bottom”, “inside” and “outside” indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the referred system or element must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as a limitation on the present invention.

[0037] Example 1, see Figure 1 The present invention provides an intelligent image fire detection method, which comprises the following steps:

[0038] Step S1: Image acquisition: collecting historical fire detection image data;

[0039] Step S2: image preprocessing: removing noise, enhancing fire area features, and generating preprocessed segmentation results through initial segmentation, noise diffusion, and denoising regression processes;

[0040] Step S3: Image enhancement: feature extraction, multi-scale generation, feature enhancement and adversarial optimization are performed on the preprocessing results to further enhance the saliency of the flame and smoke areas and generate high-quality enhanced fire images;

[0041] Step S4: Image fire detection: Use the enhanced fire image to train a CNN-based classification model to achieve real-time detection and early warning of fire images.

[0042] Example 2, see Figure 1 This embodiment is based on the above embodiment. In step S1, the fire detection image data is annotated; segmentation labels and fire labels are annotated; the segmentation labels include fire areas and non-fire areas; the fire labels include non-fire images and fire images.

[0043] Example 3, see Figure 1 This embodiment is based on the above embodiment. In step S2, the image preprocessing specifically includes the following steps:

[0044] Step S21: Initial segmentation; using pre-segmentation network , generate the initial segmentation result from the input fire image I , distinguish the fire area from the non-fire area, expressed as: ; Where A(I) is an adaptive weight map, which is calculated by the input fire image I through the regional attention module and is used to highlight the edge features of flames and smoke;

[0045] Step S22: adding noise; adding noise to the initial segmentation result and spreading it to the Step 1, generate noise data , expressed as: ; In a fire environment, the diffusion process can enhance the characteristics of smoke noise, ensuring that the denoising regression stage can effectively remove the noise unique to the fire scene; Among them, is the region-aware noise weight; It is random Gaussian noise, used to simulate the characteristics of smoke spots; is the diffusion coefficient;

[0046] Step S23: Denoising regression; Step 1 starts with the input image and the current noise result Stitching into features , expressed as: ;from Step to De-noise step by step, and iteratively update the denoising result, which can be expressed as: ;Through iterative denoising, smoke and light spot noise interference in fire images are gradually eliminated while retaining key fire features; is to extract flame features; is to extract smoke features; It is to extract background features; is the noise image at the current time step t; is the denoising result at the t-1th time step; and are the time step parameters of diffusion and denoising regression, respectively, used to control the strength of denoising; It is a conditional denoising network, combining contextual features The denoised image is generated by the information of the current time step t; z is the compensation noise, which is used to smooth the denoising regression process; It is a splicing operation;

[0047] Step S24: Early termination; monitor the stability of the fire feature distribution, pre-set the convergence threshold, and terminate the denoising when the change rate of the fire feature distribution stability is lower than the convergence threshold. Step 1 to get the intermediate denoising result ; Distribution stability change rate The calculation is expressed as: ; Splice the intermediate denoising result with the original image and pass it through the denoising network Generate the final preprocessing result y, expressed as: ; Early termination of denoising regression reduces the amount of calculation, and the final segmentation result is generated through the denoising network to meet the needs of rapid response in fire scenes; Among them, and are the flame characteristic distributions at time step t and time step t-1 respectively; and They are the smoke feature distributions at time step t and time step t-1 respectively; is the norm, take the L2 norm;

[0048] Step S25: Model training; use cross entropy loss to optimize the initial segmentation when training the pre-segmentation network; use the first Noise results for the step Optimize the final denoising, expressed as: ; When training the denoising regression network, the loss is designed based on minimizing the KL divergence between the forward distribution and the inverse distribution, expressed as: ;in, is the true fire area label of the i-th pixel; Ls is the denoising network loss function; is the predicted probability that the i-th pixel belongs to the fire area; is the denoising regression network loss; and is the loss weight; D KL is the KL divergence; is the forward distribution, which represents the distribution of generated data at step t-1 in the diffusion process; is the inverse distribution, which represents the data distribution of the t-1th step generated by the denoising regression network; It is the set of pixels in the flame area.

[0049] By performing the above operations, in view of the problem that general image fire detection methods have poor fire feature separation ability and weak fire noise processing ability, which leads to poor fire detection accuracy, this scheme highlights the edge features of flames and smoke based on an adaptive weight map, improves the accuracy of the initial segmentation results, simulates smoke and light spot characteristics through dynamic noise diffusion, and improves the model's ability to restore fire characteristics; based on the denoising regression process, the light spot and smoke noise in the fire image is effectively removed while retaining the key features of flame and smoke; the denoising regression process effectively removes the light spot and smoke noise in the fire image while retaining the key features of flame and smoke, thereby improving the accuracy of the final fire detection.

[0050] Example 4, see Figure 1 and Figure 3 This embodiment is based on the above embodiment. In step S3, image enhancement is to enhance the features of the fire image, especially the flame and smoke areas, of the preprocessing result y. Specifically, the following steps are included:

[0051] Step S31: Feature extraction: Input the preprocessing result to the encoder CE, perform multi-scale decomposition on the image, extract features of different resolutions layer by layer, generate feature maps, introduce the CBAM module to enhance the feature extraction process, focus on the important features of the fire area, and obtain feature representation ; expressed as: ; ;in, is the dynamic weighting coefficient; is the sigmoid function;

[0052] Step S32: Multi-scale generation; using generator G n Characteristics of encoder output Generate scale by scale, and finally output the enhanced fire image; introduce dynamic noise disturbance, and generate each scale as: ; ;in, and They are the fire images generated by the nth layer and the n-1th layer respectively; is an upsampling operation; is the dynamic noise disturbance; is the region-aware weight; is the amplitude factor; is the expected value of the smoke characteristic intensity;

[0053] Step S33: Fire area feature enhancement: Combined with the channel and spatial attention mechanism of the CBAM module, the salient features of flames and smoke in the fire image are further amplified, which is expressed as: ; is the feature map after enhancement; F is the feature map before enhancement; and They are channel attention and spatial attention respectively;

[0054] Step S34: Image fusion; the generated feature map Fuse with the input y to generate the final enhanced image F ed , expressed as: ;in, is the fusion weight;

[0055] Step S35: Adversarial optimization: Use the discriminator D to discriminate the generated results, optimize the generator and discriminator based on the adversarial loss, and It is expressed as: ; ;in, is the adaptive region weight; G is the generator; is the regularization weight; E[·] is the expectation; is the gradient of the discriminator.

[0056] By performing the above operations, the general image fire detection method has the problem of poor processing of the detailed characteristics of the flame edge and failure to generate high-quality fire images close to the real scene, which leads to poor final fire detection efficiency. This scheme is based on a dynamic weighting mechanism to finely extract flame and smoke features, and enhances the diversity of fire feature generation through dynamic noise disturbance, especially the sparse characteristics of the smoke area and the detailed characteristics of the flame edge; dynamic fusion weights are introduced to adaptively adjust the fusion weights according to the regional distribution of fire features, thereby generating more realistic enhanced images close to the fire scene, and improving the accuracy and efficiency of the final fire detection.

[0057] Example 5, see Figure 1 This embodiment is based on the above embodiment. In step S4, the image fire detection is specifically to randomly divide the historical fire detection image data after image enhancement into a test set and a training set, train the image fire detection model based on CNN and the training set, and use the cross entropy loss function for the image fire detection model. When the loss of the image fire detection model on the test set converges or reaches the maximum number of training times, the image fire detection model training is completed. A prediction threshold is set in advance. When the classification rate of the trained image fire detection model on the test set is higher than the prediction threshold, the image fire detection model is established. The image to be detected is collected in real time and input into the established image fire detection model. If the model output is a fire image, early warning processing is performed.

[0058] Example 6, see Figure 2 , this embodiment is based on the above embodiment, and the present invention provides an intelligent image fire detection system, including an image acquisition module, an image preprocessing module, an image enhancement module and an image fire detection module;

[0059] The image acquisition module acquires historical fire detection image data and sends the data to the image preprocessing module;

[0060] The image preprocessing module removes noise, enhances the fire area features, and generates a preprocessed segmentation result through initial segmentation, noise diffusion, and denoising regression processes; and sends the data to the image enhancement module;

[0061] The image enhancement module performs feature extraction, multi-scale generation, feature enhancement and adversarial optimization on the preprocessing results, further enhances the significance of the flame and smoke areas, generates high-quality enhanced fire images, and sends the data to the image fire detection module;

[0062] The image fire detection module uses the enhanced fire images to train a CNN-based classification model to achieve real-time detection and early warning of fire images.

[0063] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0064] While the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that many changes, modifications, substitutions and variations can be made to the embodiments without departing from the principles and spirit of the invention.

[0065] The present invention and its embodiments are described above, and such description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if ordinary technicians in the field are inspired by it, without departing from the purpose of the invention, they can design a structure and embodiment similar to the technical solution without creativity, which should belong to the protection scope of the present invention.

Claims

1. An intelligent image fire detection method, characterized in that: The method comprises the following steps: Step S1: Image acquisition: collecting historical fire detection image data; Step S2: image preprocessing; Step S3: image enhancement; Step S4: image fire detection: using the enhanced fire image to train a CNN-based classification model to achieve real-time detection and early warning of fire images; Step S2 includes step S22: Step S22: adding noise; adding noise to the initial segmentation result and diffusing it to the first segmentation result; Step 1, generate noise data , expressed as: ; In a fire environment, the diffusion process can enhance the characteristics of smoke noise, ensuring that the denoising regression stage can effectively remove the noise unique to the fire scene; Among them, is the region-aware noise weight; It is random Gaussian noise, used to simulate the characteristics of smoke spots; is the diffusion coefficient; is the initial segmentation result; In step S3, the image enhancement is to enhance the features of the fire image on the preprocessing result y, which specifically includes the following steps: Step S31: Feature extraction: Input the preprocessing result to the encoder CE, perform multi-scale decomposition on the image, extract features of different resolutions layer by layer, generate feature maps, introduce the CBAM module to enhance the feature extraction process, focus on the important features of the fire area, and obtain feature representation ; expressed as: ; ;in, is the dynamic weighting coefficient; is the sigmoid function; is the set of pixels in the flame area; is a set of smoke feature pixels; is a set of background feature pixels; Step S32: Multi-scale generation; using generator G n Characteristics of encoder output Generate scale by scale, and finally output the enhanced fire image; introduce dynamic noise disturbance, and generate each scale as: ; ;in, and They are the fire images generated by the nth layer and the n-1th layer respectively; is an upsampling operation; is the dynamic noise disturbance; is the region-aware weight; is the amplitude factor; is the expected value of the smoke characteristic intensity; Step S33: Fire area feature enhancement: Combined with the channel and spatial attention mechanism of the CBAM module, the salient features of flames and smoke in the fire image are further amplified, which is expressed as: ; is the feature map after enhancement; F is the feature map before enhancement; and They are channel attention and spatial attention respectively; Step S34: Image fusion; the generated feature map Fusion with input y to generate the final enhanced image F ed , expressed as: ;in, is the fusion weight; Step S35: Adversarial optimization: Use the discriminator D to discriminate the generated results, optimize the generator and discriminator based on the adversarial loss, and It is expressed as: ; ;in, is the adaptive region weight; G is the generator; is the regularization weight; E[·] is the expectation; is the gradient of the discriminator.

2. The intelligent image fire detection method according to claim 1, characterized in that: In step S2, the image preprocessing further includes the following steps: Step S21: Initial segmentation; using pre-segmentation network , generate the initial segmentation result from the input fire image I , distinguish the fire area from the non-fire area, expressed as: ; Where A(I) is an adaptive weight map, which is calculated by the input fire image I through the regional attention module and is used to highlight the edge features of flames and smoke; Step S23: Denoising regression; Step 1 starts with the input image and the current noise result Stitching into features , expressed as: ;from Step to De-noise step by step, and iteratively update the denoising result, which can be expressed as: ;Through iterative denoising, smoke and light spot noise interference in fire images are gradually eliminated while retaining key fire features; is to extract flame features; is to extract smoke features; It is to extract background features; is the noise image at the current time step t; is the denoising result at the t-1th time step; and are the time step parameters of diffusion and denoising regression, respectively, used to control the strength of denoising; It is a conditional denoising network, combining contextual features The denoised image is generated by the information of the current time step t; z is the compensation noise, which is used to smooth the denoising regression process; It is a splicing operation; Step S24: Early termination; monitor the stability of the fire feature distribution, pre-set the convergence threshold, and terminate the denoising when the change rate of the fire feature distribution stability is lower than the convergence threshold. Step 1 to get the intermediate denoising result ; Distribution stability change rate The calculation is expressed as: ; Splice the intermediate denoising result with the original image and pass it through the denoising network Generate the final preprocessing result y, expressed as: ; Early termination of denoising regression reduces the amount of calculation, and the final segmentation result is generated through the denoising network to meet the needs of rapid response in fire scenes; Among them, and are the flame characteristic distributions at time step t and time step t-1 respectively; and They are the smoke feature distributions at time step t and time step t-1 respectively; is the norm, take the L2 norm; Step S25: Model training; use cross entropy loss to optimize the initial segmentation when training the pre-segmentation network; use the first Noise results for the step Optimize the final denoising, expressed as: ; When training the denoising regression network, the loss is designed based on minimizing the KL divergence between the forward distribution and the inverse distribution, expressed as: ;in, is the true fire area label of the i-th pixel; Ls is the denoising network loss function; is the predicted probability that the i-th pixel belongs to the fire area; is the denoising regression network loss; and is the loss weight; D KL is the KL divergence; is the forward distribution, which represents the distribution of generated data at step t-1 in the diffusion process; is the inverse distribution, which represents the data distribution of the t-1th step generated by the denoising regression network.

3. The intelligent image fire detection method according to claim 1, characterized in that: In step S1, the fire detection image data is annotated; segmentation labels and fire labels are annotated; the segmentation labels include fire areas and non-fire areas; the fire labels include non-fire images and fire images.

4. The intelligent image fire detection method according to claim 1, characterized in that: In step S4, the image fire detection is specifically to randomly divide the historical fire detection image data after image enhancement into a test set and a training set, train the image fire detection model based on CNN and the training set, the image fire detection model uses a cross entropy loss function, and when the image fire detection model converges with the test set loss or reaches the maximum number of training times, the image fire detection model training is completed, and a prediction threshold is set in advance. When the classification success rate of the trained image fire detection model for the test set is higher than the prediction threshold, the image fire detection model is established, and the image to be detected is collected in real time and input into the established image fire detection model. If the model output is a fire image, early warning processing is performed.

5. An intelligent image fire detection system, used to implement an intelligent image fire detection method as claimed in any one of claims 1 to 4, characterized in that: It includes an image acquisition module, an image preprocessing module, an image enhancement module and an image fire detection module; The image acquisition module acquires historical fire detection image data and sends the data to the image preprocessing module; The image preprocessing module removes noise, enhances the fire area features, and generates a preprocessed segmentation result through initial segmentation, noise diffusion, and denoising regression processes; and sends the data to the image enhancement module; The image enhancement module performs feature extraction, multi-scale generation, feature enhancement and adversarial optimization on the preprocessing results, further enhances the significance of the flame and smoke areas, generates high-quality enhanced fire images, and sends the data to the image fire detection module; The image fire detection module uses the enhanced fire images to train a CNN-based classification model to achieve real-time detection and early warning of fire images.

Citation Information

Patent Citations

  • Detection model training and fire detection method and system based on global attention

    CN116824346A

  • Image fire detection method and system based on artificial intelligence

    CN118711139A