Fire hazard identification method and system based on bimodal image fusion

Through dual-modal image fusion technology, visible light and thermal imaging images are combined to extract and weighted fusion of fire characteristics, which solves the accuracy and false alarm rate problems of traditional fire monitoring methods in complex environments, and improves fire detection accuracy and Robustness, generating reasonable early warning information.

CN118658031APending Publication Date: 2024-09-17THREE GORGES JINSHAJIANG CHUANYUN HYDROPOWER DEV CO LTD +1

Patent Information

Application Number
CN202410842957.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

Traditional fire monitoring methods are based on single modal data, which have low accuracy and high false alarm rate, especially in complex environments.

Method used

A fire hazard identification method based on dual-modal image fusion is adopted. Through image acquisition and preprocessing, feature extraction and weighted fusion, and deep learning classification, combined with visible light and thermal imaging images, the accuracy and robustness of fire detection are improved, and fire hazards are highlighted. key areas of risk.

Benefits of technology

It improves the detection accuracy and robustness of fire hazards, realizes the adaptive weighted fusion of two modal feature maps, highlights the key areas of fire hazards, while retaining the detailed information of the original image, and generating reasonable early warning information and suggestions. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118658031A
    Figure CN118658031A
Patent Text Reader

Abstract

The invention discloses a fire hazard identification method and system based on bimodal image fusion, and the method comprises the steps: firstly optimizing an image collection path, collecting a visible light image and a thermal imaging image for preprocessing, carrying out the feature extraction of the images of two modals through a variational auto-encoder, and carrying out the feature extraction of the images of two modals; and carrying out weighted fusion on the feature maps of the two modals by using an attention mechanism, carrying out classification and positioning on fused image features by using a deep learning method, judging fire hidden dangers and marking fire areas, generating corresponding early warning information according to a fire identification result, and carrying out early warning. Image data of different modalities, model training data and generated early warning information are collected, so that the detection precision and robustness of the fire hazard can be improved, adaptive weighted fusion of two modal feature maps is realized, a key region of the fire hazard is highlighted, detail information of an original image is reserved, and the detection accuracy and robustness of the fire hazard are improved. Reasonable early warning information and suggestions can be generated according to types, grades, positions and ranges of fire hidden dangers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer vision technology, and in particular to a fire hazard identification method and system based on dual-modal image fusion. Background Art

[0002] Fire is a common but extremely harmful disaster that not only threatens people's lives and property safety, but also has a serious impact on the social economy. In the environment of important infrastructure such as hydropower stations, fires may lead to catastrophic consequences, so timely monitoring and early warning of fires are particularly important.

[0003] Traditional fire monitoring methods are mainly based on single-modal data, such as visible light images or thermal imaging images, but this method often has problems such as low accuracy and high false positive rate, especially in complex environments. Summary of the invention

[0004] The purpose of this application is to overcome the existing technical defects and provide a fire hazard identification method and system based on dual-modal image fusion, improve the detection accuracy and robustness of fire hazards, realize adaptive weighted fusion of two modal feature maps, highlight the key areas of fire hazards, and retain the detailed information of the original image. It can generate reasonable warning information and suggestions according to the type, level, location and range of fire hazards.

[0005] The purpose of this application is achieved through the following technical solutions:

[0006] In a first aspect, the present application proposes a fire hazard identification method based on dual-modal image fusion, the method comprising:

[0007] Step S1, image acquisition and preprocessing: optimizing the image acquisition path, and acquiring visible light images and thermal imaging images from different positions and angles in the dam area of ​​the hydropower station, and then preprocessing the acquired two types of image data;

[0008] Step S2, extracting and fusing image features: using a variational autoencoder to extract features from the images of the two modalities, and then using an attention mechanism to perform weighted fusion on the feature maps of the two modalities;

[0009] Step S3, identifying fire and issuing warnings: using deep learning methods to classify and locate the fused image features, determine fire hazards and mark the fire area, and generate corresponding warning information based on the results of fire identification;

[0010] Step S4, collect and store various types of data: collect image data of different modalities, model training data and generated warning information, and store the data, back up the data regularly, and encrypt and protect various types of data.

[0011] In a possible implementation, the preprocessing step in step S1 includes:

[0012] Step S1-1, using the original visible light image and the thermal imaging image as the first layer of the Gaussian pyramid, performing Gaussian filtering to smooth the visible light image and the thermal imaging image respectively, downsampling the smoothed images to obtain a second layer image, and then continuously performing Gaussian filtering and downsampling to generate a corresponding Gaussian pyramid;

[0013] Step S1-2, subtract the Gaussian blurred images of two adjacent layers to obtain the difference image between the two adjacent layers of the Gaussian pyramid, check each pixel in each group of difference images, select the pixel points within the 3×3 or 5×5 neighborhood range of the current pixel point for comparison, and determine whether the pixel point is a local extreme point;

[0014] Step S1-3, if the current pixel point is the maximum or minimum value in its neighborhood, it is marked as a local extreme point, and then the gradient direction and gradient amplitude of the areas around each group of local extreme points are calculated, and the gradient values ​​of the areas are compared with those of the surrounding areas to screen out unstable local extreme points, and the screened local extreme points are used as key points;

[0015] Step S1-4, assign a main direction to each key point according to the gradient direction of the pixels around it, take the key point as the center, sample pixels in the neighborhood around it according to the scale to form a local area, calculate the gradient amplitude and direction of each pixel in the local area, convert it into a feature vector, and connect all the feature vectors into a vector to form a descriptor of the key point;

[0016] Step S1-5, pairing the feature points in the two images based on the nearest neighbor method, estimating the geometric transformation relationship between the two images through an affine transformation model based on the paired feature points, and transforming one of the images according to the estimated transformation parameters to align the two images in space.

[0017] In a possible implementation, the feature extraction step in step S2 includes:

[0018] Step S2-1a, after preprocessing the historical visible light images and thermal imaging images, divide them into a training set and a test set, use the training set as input data, and then construct a set of variational autoencoder models through an encoder and a decoder to initialize the model information;

[0019] Step S2-2a, divide the training set into small batches, and then input each batch of data into the model for forward propagation, gradually extract the features of the input image and reduce the spatial dimension through multiple convolutional layers and pooling layers in the encoder, flatten the feature map of the last convolutional layer into a one-dimensional vector, and obtain the mean and variance in the latent space through a fully connected layer, and then obtain the samples in the latent space by sampling random noise from a standard normal distribution and transforming it using the mean and variance;

[0020] Step S2-3a, the decoder fully connected layer maps the samples in the latent space into feature vectors, and then reshapes the feature vectors output by the fully connected layer into a three-dimensional tensor, and gradually converts the feature vectors into images of the same size as the original input image through the deconvolution layer;

[0021] Step S2-4a, calculate the total loss of the model through reconstruction loss and KL divergence loss, update the model parameters through back propagation based on the total loss, and then use the test set to verify the model performance, and repeatedly train the model until the preset number of training times is reached, or stop training when the performance meets the user's expectations;

[0022] Step S2-5a, input the preprocessed visible light image and thermal imaging image into the encoder part respectively to obtain the corresponding latent vector, use the latent vector as input, decode it through the decoder part to generate a reconstructed image, and record the generated latent vector as feature data.

[0023] In a possible implementation, the weighted fusion step in step S2 includes:

[0024] Step S2-1b, collecting feature data of visible light images and thermal imaging images, processing the feature data of the two modalities into data with the same size and number of channels, and inputting the feature data of images of different modalities into the attention mechanism network;

[0025] Step S2-1b: Use the attention mechanism network to calculate the weights of the feature data of the two modalities. For each pixel position, perform weighted fusion on the feature maps of the two modalities according to the obtained weights to obtain a fused feature map.

[0026] In a possible implementation manner, the step of determining the fire hazard in step S3 includes:

[0027] Step S3-1, using the generated image features and corresponding label data as data sets for training and testing, building an LSTM network based on the Keras deep learning framework, and initializing the settings of the network input layer, hidden layer, and output layer;

[0028] Step S3-2, divide the prepared data set into a training set, a validation set, and a test set. In each training cycle, divide the training set into small batches of data and input them into the network for forward propagation. The LSTM network calculates the predicted value based on the current parameters and calculates the loss value of the loss function. Based on the chain rule, the LSTM network reversely propagates the loss value from the output layer and updates the parameters of the model according to the gradient of the loss function.

[0029] Step S3-3, after each training cycle, the LSTM network is verified using the validation set. If the performance of the LSTM network no longer improves or begins to decline, the training is terminated in advance. Otherwise, the LSTM network is continued to be trained until the preset number of training times is reached. After the training process is completed, the trained LSTM network is tested using the test set to evaluate its performance on unseen data, and the hyperparameters of the LSTM network are adjusted according to the evaluation results.

[0030] Step S3-4: The fused latest image features are used as input data and input into the loaded LSTM network for forward propagation. A judgment is made based on the probability value output by the LSTM network. If the output probability value exceeds the threshold preset by the staff, it is judged that a fire exists; otherwise, it is judged that no fire exists. If a fire exists, it is located based on the location information output by the model.

[0031] In the second aspect, the present application proposes a fire hazard identification system based on dual-modal image fusion, the system comprising an image acquisition module, an image fusion module, a fire identification module, an early warning output module, a data storage module, a data analysis module, a user management module, a remote control module, a map display module and a user interaction platform;

[0032] An image acquisition module, used to acquire visible light images and thermal imaging images from different positions and angles in the dam area of ​​a hydropower station;

[0033] An image fusion module is used to preprocess the acquired two modality images and perform image fusion;

[0034] The fire identification module is used to classify and locate the fused image features and determine the location and extent of fire hazards;

[0035] The warning output module is used to generate warning information based on the results of fire identification and output it to the monitoring center and the terminal devices of the staff in a visual way;

[0036] A data storage module, used to store the collected image data and fire identification results in a database;

[0037] Data analysis module, used to perform statistical analysis and trend analysis on the data stored in the database;

[0038] User management module, used to manage system user information and permission settings;

[0039] Remote control module, used to authorize users to monitor and control the system remotely;

[0040] A map display module is used to display the fire identification results on a map in a graphical manner;

[0041] The user interaction platform is used to provide a user operation interface, allowing users to use the various functions of the system.

[0042] In a possible implementation manner, the image fusion module is further used for:

[0043] The original visible light image and thermal imaging image are used as the first layer of the Gaussian pyramid. The visible light image and thermal imaging image are smoothed by Gaussian filtering respectively. The smoothed images are downsampled to obtain the second layer image. Then, Gaussian filtering and downsampling are continuously performed to generate the corresponding Gaussian pyramid.

[0044] Subtract the Gaussian blurred images of two adjacent layers to obtain the difference image between the two adjacent layers of the Gaussian pyramid. Check each pixel in each set of difference images, select the pixels in the 3×3 or 5×5 neighborhood of the current pixel for comparison, and determine whether the pixel is a local extreme point.

[0045] If the current pixel is the maximum or minimum value in its neighborhood, it will be marked as a local extreme point. Then the gradient direction and gradient amplitude of the areas around each group of local extreme points will be calculated, and the gradient values ​​of these areas will be compared with those of the surrounding areas to screen out unstable local extreme points. The screened local extreme points will be used as key points.

[0046] According to the gradient direction of the pixels around each key point, a main direction is assigned to it. With the key point as the center, pixels are sampled according to the scale in the neighborhood around it to form a local area. The gradient amplitude and direction of each pixel in the local area are calculated and converted into a feature vector. All feature vectors are connected into a vector to form the descriptor of the key point.

[0047] The feature points in the two images are paired based on the nearest neighbor method. According to the paired feature points, the geometric transformation relationship between the two images is estimated through the affine transformation model. According to the estimated transformation parameters, one of the images is transformed to align the two images in space.

[0048] In a possible implementation, the system further includes a feature extraction module, which is used to:

[0049] After preprocessing the historical visible light images and thermal imaging images, they are divided into training sets and test sets. The training set is used as input data, and then a set of variational autoencoder models are constructed through encoders and decoders to initialize the model information.

[0050] The training set is divided into small batches, and each batch of data is then input into the model for forward propagation. Multiple convolutional layers and pooling layers in the encoder are used to gradually extract the features of the input image and reduce the spatial dimension. The feature map of the last convolutional layer is flattened into a one-dimensional vector, and the mean and variance in the latent space are obtained through a fully connected layer. Random noise is then sampled from a standard normal distribution and transformed using the mean and variance to obtain samples in the latent space.

[0051] The decoder fully connected layer maps the samples in the latent space to feature vectors, and then reshapes the feature vectors output by the fully connected layer into a three-dimensional tensor. The deconvolution layer gradually converts the feature vectors into images of the same size as the original input image.

[0052] The total loss of the model is calculated through reconstruction loss and KL divergence loss. Based on the total loss, the model parameters are updated through back propagation. The model performance is then verified using the test set. The model is repeatedly trained until the preset number of training times is reached or the performance meets the user's expectations.

[0053] The preprocessed visible light image and thermal imaging image are respectively input into the encoder part to obtain the corresponding latent vector, which is used as input and decoded by the decoder part to generate a reconstructed image, and the generated latent vector is recorded as feature data.

[0054] In a possible implementation manner, the image fusion module is further used for:

[0055] Collect feature data of visible light images and thermal imaging images, process the feature data of the two modalities into data with the same size and number of channels, and input the feature data of images of different modalities into the attention mechanism network;

[0056] The attention mechanism network is used to calculate the weights of the feature data of the two modalities. For each pixel position, the feature maps of the two modalities are weighted fused according to the obtained weights to obtain a fused feature map.

[0057] In a possible implementation manner, the fire identification module is further used to:

[0058] The image features and corresponding label data generated by the image fusion module are used as the data set for training and testing. The LSTM network is built based on the Keras deep learning framework, and the settings of the network input layer, hidden layer, and output layer are initialized.

[0059] The prepared data set is divided into training set, validation set and test set. In each training cycle, the training set is divided into small batches of data and input into the network for forward propagation. The LSTM network calculates the predicted value based on the current parameters and the loss value of the loss function. Based on the chain rule, the LSTM network transfers the loss value backward from the output layer and updates the model parameters according to the gradient of the loss function.

[0060] After each training cycle, the LSTM network is verified using the validation set. If the performance of the LSTM network no longer improves or begins to decline, the training is terminated in advance. Otherwise, the LSTM network is trained until the preset number of training times is reached. After the training process is completed, the trained LSTM network is tested using the test set to evaluate its performance on unseen data, and the hyperparameters of the LSTM network are adjusted based on the evaluation results.

[0061] The latest fused image features are used as input data and input into the loaded LSTM network for forward propagation. Judgment is made based on the probability value output by the LSTM network. If the output probability value exceeds the threshold preset by the staff, it is judged that a fire exists, otherwise it is judged that no fire exists. If a fire exists, it is located based on the location information output by the model.

[0062] The above-mentioned main scheme of the present application and its further options can be freely combined to form multiple schemes, all of which are schemes that can be adopted and claimed for protection in the present application; and in the present application, (non-conflicting options) options and other options can also be freely combined. After understanding the scheme of the present application, those skilled in the art can understand that there are multiple combinations based on the prior art and common knowledge, all of which are technical schemes to be protected by the present application, and they are not exhaustively listed here.

[0063] The present application discloses a fire hazard identification method and system based on dual-modal image fusion, which first optimizes the image acquisition path, collects visible light images and thermal imaging images for preprocessing, uses a variational autoencoder to extract features from the images of the two modalities, uses an attention mechanism to weightedly fuse the feature maps of the two modalities, uses a deep learning method to classify and locate the fused image features, determines the fire hazard and marks the fire area, generates corresponding warning information based on the result of fire identification, collects image data of different modalities, model training data and generated warning information, can improve the detection accuracy and robustness of fire hazards, realizes adaptive weighted fusion of the feature maps of the two modalities, highlights the key areas of fire hazards, and retains the detailed information of the original image, and can generate reasonable warning information and suggestions based on the type, level, location and range of the fire hazard. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0065] Figure 1 A flow chart of a fire hazard identification method based on dual-modal image fusion proposed in an embodiment of the present application is shown.

[0066] Figure 2 A schematic diagram of the structure of a fire hazard identification system proposed in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0067] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0068] Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making any creative work shall fall within the scope of protection of this application.

[0069] In the existing technology, traditional fire monitoring methods are mainly based on single modal data, such as visible light images or thermal imaging images, but this method often has problems such as low accuracy and high false positive rate, especially poor performance in complex environments.

[0070] Therefore, in order to solve the above problems, the embodiment of the present application proposes a fire hazard identification method and system based on dual-modal image fusion, which can improve the detection accuracy and robustness of fire hazards, realize adaptive weighted fusion of two modal feature maps, highlight the key areas of fire hazards, and retain the detailed information of the original image. It can generate reasonable warning information and suggestions according to the type, level, location and range of the fire hazard, which is described in detail below.

[0071] Please refer to Figure 1 , Figure 1 A flowchart of a fire hazard identification method based on dual-modal image fusion proposed in an embodiment of the present application is shown, which solves the installation and use problems of existing cameras in special edge scenes. The method includes the following steps:

[0072] Step S1, image acquisition and preprocessing: optimize the image acquisition path, and acquire visible light images and thermal imaging images from different positions and angles in the dam area of ​​the hydropower station, and then preprocess the acquired two types of image data.

[0073] The pre-processing steps in step S1 include:

[0074] Step S1-1, using the original visible light image and the thermal imaging image as the first layer of the Gaussian pyramid, performing Gaussian filtering to smooth the visible light image and the thermal imaging image respectively, downsampling the smoothed images to obtain a second layer image, and then continuously performing Gaussian filtering and downsampling to generate a corresponding Gaussian pyramid;

[0075] Step S1-2, subtract the Gaussian blurred images of two adjacent layers to obtain the difference image between the two adjacent layers of the Gaussian pyramid, check each pixel in each group of difference images, select the pixel points within the 3×3 or 5×5 neighborhood range of the current pixel point for comparison, and determine whether the pixel point is a local extreme point;

[0076] Step S1-3, if the current pixel point is the maximum or minimum value in its neighborhood, it is marked as a local extreme point, and then the gradient direction and gradient amplitude of the areas around each group of local extreme points are calculated, and the gradient values ​​of the areas are compared with those of the surrounding areas to screen out unstable local extreme points, and the screened local extreme points are used as key points;

[0077] Step S1-4, assign a main direction to each key point according to the gradient direction of the pixels around it, take the key point as the center, sample pixels in the neighborhood around it according to the scale to form a local area, calculate the gradient amplitude and direction of each pixel in the local area, convert it into a feature vector, and connect all the feature vectors into a vector to form a descriptor of the key point;

[0078] Step S1-5, pairing the feature points in the two images based on the nearest neighbor method, estimating the geometric transformation relationship between the two images through an affine transformation model based on the paired feature points, and transforming one of the images according to the estimated transformation parameters to align the two images in space.

[0079] Specifically, the original visible light image and thermal imaging image are used as the first layer of the Gaussian pyramid, and the visible light image and thermal imaging image are respectively smoothed by Gaussian filtering, and the smoothed images are downsampled to obtain the second layer image. Then, Gaussian filtering and downsampling are continuously performed to generate the corresponding Gaussian pyramid, and the Gaussian blurred images of two adjacent layers are subtracted to obtain the difference image between the two adjacent layers of the Gaussian pyramid.

[0080] Each pixel in each group of differential images is checked, and the pixels in the 3×3 or 5×5 neighborhood of the current pixel are selected for comparison to determine whether the pixel is a local extreme point. If the current pixel is the maximum or minimum value in its neighborhood, it is marked as a local extreme point. The gradient direction and gradient amplitude of the areas around each group of local extreme points are calculated, and the gradient values ​​are compared with those of the surrounding areas to screen out unstable local extreme points. The screened local extreme points are used as key points, and a main direction is assigned to them according to the gradient direction of the pixels around each key point. With the key point as the center, pixel points are sampled according to the scale in the neighborhood around it to form a local area.

[0081] The gradient amplitude and direction of each pixel in the local area are calculated and converted into feature vectors. All feature vectors are connected into a vector to form the descriptor of the key point. The feature points in the two images are paired based on the nearest neighbor method. According to the paired feature points, the geometric transformation relationship between the two images is estimated through the affine transformation model. According to the estimated transformation parameters, one of the images is transformed to align the two images in space.

[0082] Step S2, extracting and fusing image features: using a variational autoencoder to extract features from images of the two modalities, and then using an attention mechanism to perform weighted fusion on the feature maps of the two modalities.

[0083] The feature extraction steps in step S2 include:

[0084] Step S2-1a, after preprocessing the historical visible light images and thermal imaging images, divide them into a training set and a test set, use the training set as input data, and then construct a set of variational autoencoder models through an encoder and a decoder to initialize the model information;

[0085] Step S2-2a, divide the training set into small batches, and then input each batch of data into the model for forward propagation, gradually extract the features of the input image and reduce the spatial dimension through multiple convolutional layers and pooling layers in the encoder, flatten the feature map of the last convolutional layer into a one-dimensional vector, and obtain the mean and variance in the latent space through a fully connected layer, and then obtain the samples in the latent space by sampling random noise from a standard normal distribution and transforming it using the mean and variance;

[0086] Step S2-3a, the decoder fully connected layer maps the samples in the latent space into feature vectors, and then reshapes the feature vectors output by the fully connected layer into a three-dimensional tensor, and gradually converts the feature vectors into images of the same size as the original input image through the deconvolution layer;

[0087] Step S2-4a, calculate the total loss of the model through reconstruction loss and KL divergence loss, update the model parameters through back propagation based on the total loss, and then use the test set to verify the model performance, and repeatedly train the model until the preset number of training times is reached, or stop training when the performance meets the user's expectations;

[0088] Step S2-5a, input the preprocessed visible light image and thermal imaging image into the encoder part respectively to obtain the corresponding latent vector, use the latent vector as input, decode it through the decoder part to generate a reconstructed image, and record the generated latent vector as feature data.

[0089] Specifically, the historical visible light images and thermal imaging images are preprocessed and divided into training sets and test sets. The training set is used as input data. Then, a set of variational autoencoder models are constructed through the encoder and decoder. The model information is initialized, the training set is divided into small batches, and then each batch of data is input into the model for forward propagation. Through multiple convolutional layers and pooling layers in the encoder, the features of the input image are gradually extracted and the spatial dimension is reduced.

[0090] The feature map of the last convolutional layer is flattened into a one-dimensional vector, and the mean and variance in the latent space are obtained through a fully connected layer. Then, random noise is sampled from a standard normal distribution and transformed using the mean and variance to obtain samples in the latent space. The decoder fully connected layer maps the samples in the latent space to feature vectors, and then reshapes the feature vectors output by the fully connected layer into a three-dimensional tensor. The feature vectors are gradually converted into images of the same size as the original input image through deconvolution layers. The total loss of the model is calculated using reconstruction loss and KL divergence loss.

[0091] Based on the total loss, the model parameters are updated through back propagation, and the model performance is verified using the test set. The model is trained repeatedly until the preset number of training times is reached, or the training is stopped when the performance meets the user's expectations. The preprocessed visible light image and thermal imaging image are respectively input into the encoder part to obtain the corresponding latent vector. The latent vector is used as input and decoded by the decoder part to generate a reconstructed image. The generated latent vector is recorded as feature data.

[0092] The weighted fusion steps in step S2 include:

[0093] Step S2-1b, collecting feature data of visible light images and thermal imaging images, processing the feature data of the two modalities into data with the same size and number of channels, and inputting the feature data of images of different modalities into the attention mechanism network;

[0094] Step S2-1b: Use the attention mechanism network to calculate the weights of the feature data of the two modalities. For each pixel position, perform weighted fusion on the feature maps of the two modalities according to the obtained weights to obtain a fused feature map.

[0095] Specifically, feature data of visible light images and thermal imaging images are collected, and the feature data of the two modalities are processed into data with the same size and number of channels. The feature data of images of different modalities are input into the attention mechanism network, and the attention mechanism network is used to calculate the weights of the feature data of the two modalities. For each pixel position, the feature maps of the two modalities are weightedly fused according to the obtained weights to obtain a fused feature map.

[0096] Step S3, identify the fire and issue an early warning: Use deep learning methods to classify and locate the fused image features, determine the fire hazards and mark the fire area, and generate corresponding early warning information based on the results of fire identification.

[0097] Step S4, collect and store various types of data: collect image data of different modalities, model training data and generated warning information, and store the data, back up the data regularly, and encrypt and protect various types of data.

[0098] The step of judging the fire hazard in step S3 includes:

[0099] Step S3-1, using the generated image features and corresponding label data as data sets for training and testing, building an LSTM network based on the Keras deep learning framework, and initializing the settings of the network input layer, hidden layer, and output layer;

[0100] Step S3-2, divide the prepared data set into a training set, a validation set, and a test set. In each training cycle, divide the training set into small batches of data and input them into the network for forward propagation. The LSTM network calculates the predicted value based on the current parameters and calculates the loss value of the loss function. Based on the chain rule, the LSTM network reversely propagates the loss value from the output layer and updates the parameters of the model according to the gradient of the loss function.

[0101] Step S3-3, after each training cycle, the LSTM network is verified using the validation set. If the performance of the LSTM network no longer improves or begins to decline, the training is terminated in advance. Otherwise, the LSTM network is continued to be trained until the preset number of training times is reached. After the training process is completed, the trained LSTM network is tested using the test set to evaluate its performance on unseen data, and the hyperparameters of the LSTM network are adjusted according to the evaluation results.

[0102] Step S3-4: The fused latest image features are used as input data and input into the loaded LSTM network for forward propagation. A judgment is made based on the probability value output by the LSTM network. If the output probability value exceeds the threshold preset by the staff, it is judged that a fire exists; otherwise, it is judged that no fire exists. If a fire exists, it is located based on the location information output by the model.

[0103] Specifically, the image features and corresponding label data generated by the image fusion module are used as data sets for training and testing. The LSTM network is built based on the Keras deep learning framework. The settings of the network input layer, hidden layer, and output layer are initialized. The prepared data set is divided into training set, validation set, and test set. In each training cycle, the training set is divided into small batches of data and input into the network for forward propagation. The LSTM network calculates the predicted value based on the current parameters and calculates the loss value of the loss function. Based on the chain rule, the LSTM network reversely transfers the loss value from the output layer and updates the parameters of the model according to the gradient of the loss function. After each training cycle, the validation set is used to test the LSTM network. Verification is performed. If the performance of the LSTM network no longer improves or begins to decline, the training is terminated in advance. Otherwise, the LSTM network is continued to be trained until the preset number of training times is reached. After the training process is completed, the trained LSTM network is tested with a test set to evaluate its performance on unseen data. The hyperparameters of the LSTM network are adjusted according to the evaluation results. The latest fused image features are used as input data and input into the loaded LSTM network for forward propagation. The probability value output by the LSTM network is used for judgment. If the output probability value exceeds the preset threshold of the staff, it is judged that a fire exists, otherwise it is judged that no fire exists. If a fire exists, it is located according to the location information output by the model.

[0104] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0105] By collecting visible light images from different positions and angles, and preprocessing the collected two modal images, the feature information of each group of images is collected through a variational autoencoder, and then the feature data of images of different modalities are input into the attention mechanism network. The weights of the feature data of the two modalities are calculated using the attention mechanism network. For each pixel position, the feature maps of the two modalities are weighted fused according to the obtained weights to obtain the fused feature map. An LSTM network is constructed based on the Keras deep learning framework, and the LSTM network is trained, verified and tested. After that, the fused latest image features are used as input data and input into the attention mechanism network. Forward propagation is carried out in the loaded LSTM network, and judgment is made according to the probability value output by the LSTM network. If the output probability value exceeds the preset threshold value of the staff, it is judged that there is a fire, otherwise it is judged that there is no fire. If there is a fire, it is located according to the location information output by the model. At the same time, the early warning output module generates corresponding early warning information according to the results of fire identification, improves the detection accuracy and robustness of fire hazards, realizes the adaptive weighted fusion of the two modal feature maps, highlights the key areas of fire hazards, and retains the detailed information of the original image. It can generate reasonable early warning information and suggestions according to the type, level, location and range of fire hazards.

[0106] The following is a possible implementation of a fire hazard identification system based on dual-modal image fusion, which is used to execute the various execution steps and corresponding technical effects of the fire hazard identification method shown in the above embodiment and possible implementation. Figure 2 , Figure 2 The schematic diagram of the structure of the fire hazard identification system proposed in the embodiment of the present application is shown. The system includes an image acquisition module, an image fusion module, a fire identification module, an early warning output module, a data storage module, a data analysis module, a user management module, a remote control module, a map display module and a user interaction platform;

[0107] An image acquisition module, used to acquire visible light images and thermal imaging images from different positions and angles in the dam area of ​​a hydropower station;

[0108] An image fusion module is used to preprocess the acquired two modality images and perform image fusion;

[0109] The fire identification module is used to classify and locate the fused image features and determine the location and extent of fire hazards;

[0110] The warning output module is used to generate warning information based on the results of fire identification and output it to the monitoring center and the terminal devices of the staff in a visual way;

[0111] A data storage module, used to store the collected image data and fire identification results in a database;

[0112] Data analysis module, used to perform statistical analysis and trend analysis on the data stored in the database;

[0113] User management module, used to manage system user information and permission settings;

[0114] Remote control module, used to authorize users to monitor and control the system remotely;

[0115] A map display module is used to display the fire identification results on a map in a graphical manner;

[0116] The user interaction platform is used to provide a user operation interface, allowing users to use the various functions of the system.

[0117] The image acquisition module is used to collect visible light images and thermal imaging images from different positions and angles in the dam area of ​​the hydropower station; the image fusion module is used to preprocess the collected two modal images and perform image fusion; the fire identification module is used to classify and locate the fused image features and determine the location and degree of fire hazards.

[0118] In a possible implementation manner, the image fusion module is further used for:

[0119] The original visible light image and thermal imaging image are used as the first layer of the Gaussian pyramid. The visible light image and thermal imaging image are smoothed by Gaussian filtering respectively. The smoothed images are downsampled to obtain the second layer image. Then, Gaussian filtering and downsampling are continuously performed to generate the corresponding Gaussian pyramid.

[0120] Subtract the Gaussian blurred images of two adjacent layers to obtain the difference image between the two adjacent layers of the Gaussian pyramid. Check each pixel in each set of difference images, select the pixels in the 3×3 or 5×5 neighborhood of the current pixel for comparison, and determine whether the pixel is a local extreme point.

[0121] If the current pixel is the maximum or minimum value in its neighborhood, it will be marked as a local extreme point. Then the gradient direction and gradient amplitude of the areas around each group of local extreme points will be calculated, and the gradient values ​​of these areas will be compared with those of the surrounding areas to screen out unstable local extreme points. The screened local extreme points will be used as key points.

[0122] According to the gradient direction of the pixels around each key point, a main direction is assigned to it. With the key point as the center, pixels are sampled according to the scale in the neighborhood around it to form a local area. The gradient amplitude and direction of each pixel in the local area are calculated and converted into a feature vector. All feature vectors are connected into a vector to form the descriptor of the key point.

[0123] The feature points in the two images are paired based on the nearest neighbor method. According to the paired feature points, the geometric transformation relationship between the two images is estimated through the affine transformation model. According to the estimated transformation parameters, one of the images is transformed to align the two images in space.

[0124] In a possible implementation, the system further includes a feature extraction module, which is used to:

[0125] After preprocessing the historical visible light images and thermal imaging images, they are divided into training sets and test sets. The training set is used as input data, and then a set of variational autoencoder models are constructed through encoders and decoders to initialize the model information.

[0126] The training set is divided into small batches, and each batch of data is then input into the model for forward propagation. Multiple convolutional layers and pooling layers in the encoder are used to gradually extract the features of the input image and reduce the spatial dimension. The feature map of the last convolutional layer is flattened into a one-dimensional vector, and the mean and variance in the latent space are obtained through a fully connected layer. Random noise is then sampled from a standard normal distribution and transformed using the mean and variance to obtain samples in the latent space.

[0127] The decoder fully connected layer maps the samples in the latent space to feature vectors, and then reshapes the feature vectors output by the fully connected layer into a three-dimensional tensor. The deconvolution layer gradually converts the feature vectors into images of the same size as the original input image.

[0128] The total loss of the model is calculated through reconstruction loss and KL divergence loss. Based on the total loss, the model parameters are updated through back propagation. The model performance is then verified using the test set. The model is repeatedly trained until the preset number of training times is reached or the performance meets the user's expectations.

[0129] The preprocessed visible light image and thermal imaging image are respectively input into the encoder part to obtain the corresponding latent vector, which is used as input and decoded by the decoder part to generate a reconstructed image, and the generated latent vector is recorded as feature data.

[0130] In a possible implementation manner, the image fusion module is further used for:

[0131] Collect feature data of visible light images and thermal imaging images, process the feature data of the two modalities into data with the same size and number of channels, and input the feature data of images of different modalities into the attention mechanism network;

[0132] The attention mechanism network is used to calculate the weights of the feature data of the two modalities. For each pixel position, the feature maps of the two modalities are weighted fused according to the obtained weights to obtain a fused feature map.

[0133] In a possible implementation manner, the fire identification module is further used to:

[0134] The image features and corresponding label data generated by the image fusion module are used as the data set for training and testing. The LSTM network is built based on the Keras deep learning framework, and the settings of the network input layer, hidden layer, and output layer are initialized.

[0135] The prepared data set is divided into training set, validation set and test set. In each training cycle, the training set is divided into small batches of data and input into the network for forward propagation. The LSTM network calculates the predicted value based on the current parameters and the loss value of the loss function. Based on the chain rule, the LSTM network transfers the loss value backward from the output layer and updates the model parameters according to the gradient of the loss function.

[0136] After each training cycle, the LSTM network is verified using the validation set. If the performance of the LSTM network no longer improves or begins to decline, the training is terminated in advance. Otherwise, the LSTM network is trained until the preset number of training times is reached. After the training process is completed, the trained LSTM network is tested using the test set to evaluate its performance on unseen data, and the hyperparameters of the LSTM network are adjusted based on the evaluation results.

[0137] The latest fused image features are used as input data and input into the loaded LSTM network for forward propagation. Judgment is made based on the probability value output by the LSTM network. If the output probability value exceeds the threshold preset by the staff, it is judged that a fire exists, otherwise it is judged that no fire exists. If a fire exists, it is located based on the location information output by the model.

[0138] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A fire hazard identification method based on dual-modal image fusion, characterized in that: The method comprises: Step S1, image acquisition and preprocessing: optimizing the image acquisition path, and acquiring visible light images and thermal imaging images from different positions and angles in the dam area of ​​the hydropower station, and then preprocessing the acquired two types of image data; Step S2, extracting and fusing image features: using a variational autoencoder to extract features from the images of the two modalities, and then using an attention mechanism to perform weighted fusion on the feature maps of the two modalities; Step S3, identifying fire and issuing warnings: using deep learning methods to classify and locate the fused image features, determine fire hazards and mark the fire area, and generate corresponding warning information based on the results of fire identification; Step S4, collect and store various types of data: collect image data of different modalities, model training data and generated warning information, and store the data, back up the data regularly, and encrypt and protect various types of data.

2. The fire hazard identification method according to claim 1, characterized in that: The pre-processing steps in step S1 include: Step S1-1, using the original visible light image and the thermal imaging image as the first layer of the Gaussian pyramid, performing Gaussian filtering to smooth the visible light image and the thermal imaging image respectively, downsampling the smoothed images to obtain a second layer image, and then continuously performing Gaussian filtering and downsampling to generate a corresponding Gaussian pyramid; Step S1-2, subtract the Gaussian blurred images of two adjacent layers to obtain the difference image between the two adjacent layers of the Gaussian pyramid, check each pixel in each group of difference images, select the pixel points within the 3×3 or 5×5 neighborhood range of the current pixel point for comparison, and determine whether the pixel point is a local extreme point; Step S1-3, if the current pixel point is the maximum or minimum value in its neighborhood, it is marked as a local extreme point, and then the gradient direction and gradient amplitude of the areas around each group of local extreme points are calculated, and the gradient values ​​of the areas are compared with those of the surrounding areas to screen out unstable local extreme points, and the screened local extreme points are used as key points; Step S1-4, assign a main direction to each key point according to the gradient direction of the pixels around it, take the key point as the center, sample pixels in the neighborhood around it according to the scale to form a local area, calculate the gradient amplitude and direction of each pixel in the local area, convert it into a feature vector, and connect all the feature vectors into a vector to form a descriptor of the key point; Step S1-5, pairing the feature points in the two images based on the nearest neighbor method, estimating the geometric transformation relationship between the two images through an affine transformation model based on the paired feature points, and transforming one of the images according to the estimated transformation parameters to align the two images in space.

3. The fire hazard identification method according to claim 1, characterized in that: The feature extraction steps in step S2 include: Step S2-1a, after preprocessing the historical visible light images and thermal imaging images, divide them into a training set and a test set, use the training set as input data, and then construct a set of variational autoencoder models through an encoder and a decoder to initialize the model information; Step S2-2a, divide the training set into small batches, and then input each batch of data into the model for forward propagation, gradually extract the features of the input image and reduce the spatial dimension through multiple convolutional layers and pooling layers in the encoder, flatten the feature map of the last convolutional layer into a one-dimensional vector, and obtain the mean and variance in the latent space through a fully connected layer, and then obtain the samples in the latent space by sampling random noise from a standard normal distribution and transforming it using the mean and variance; Step S2-3a, the decoder fully connected layer maps the samples in the latent space into feature vectors, and then reshapes the feature vectors output by the fully connected layer into a three-dimensional tensor, and gradually converts the feature vectors into images of the same size as the original input image through the deconvolution layer; Step S2-4a, calculate the total loss of the model through reconstruction loss and KL divergence loss, update the model parameters through back propagation based on the total loss, and then use the test set to verify the model performance, and repeatedly train the model until the preset number of training times is reached, or stop training when the performance meets the user's expectations; Step S2-5a, input the preprocessed visible light image and thermal imaging image into the encoder part respectively to obtain the corresponding latent vector, use the latent vector as input, decode it through the decoder part to generate a reconstructed image, and record the generated latent vector as feature data.

4. The fire hazard identification method according to claim 1, characterized in that: The weighted fusion steps in step S2 include: Step S2-1b, collecting feature data of visible light images and thermal imaging images, processing the feature data of the two modalities into data with the same size and number of channels, and inputting the feature data of images of different modalities into the attention mechanism network; Step S2-1b: Use the attention mechanism network to calculate the weights of the feature data of the two modalities. For each pixel position, perform weighted fusion on the feature maps of the two modalities according to the obtained weights to obtain a fused feature map.

5. The fire hazard identification method according to claim 1, characterized in that: The step of judging the fire hazard in step S3 includes: Step S3-1, using the generated image features and corresponding label data as data sets for training and testing, building an LSTM network based on the Keras deep learning framework, and initializing the settings of the network input layer, hidden layer, and output layer; Step S3-2, divide the prepared data set into a training set, a validation set, and a test set. In each training cycle, divide the training set into small batches of data and input them into the network for forward propagation. The LSTM network calculates the predicted value based on the current parameters and calculates the loss value of the loss function. Based on the chain rule, the LSTM network reversely propagates the loss value from the output layer and updates the parameters of the model according to the gradient of the loss function. Step S3-3, after each training cycle, the LSTM network is verified using the validation set. If the performance of the LSTM network no longer improves or begins to decline, the training is terminated in advance. Otherwise, the LSTM network is continued to be trained until the preset number of training times is reached. After the training process is completed, the trained LSTM network is tested using the test set to evaluate its performance on unseen data, and the hyperparameters of the LSTM network are adjusted according to the evaluation results. Step S3-4: The fused latest image features are used as input data and input into the loaded LSTM network for forward propagation. A judgment is made based on the probability value output by the LSTM network. If the output probability value exceeds the threshold preset by the staff, it is judged that a fire exists; otherwise, it is judged that no fire exists. If a fire exists, it is located based on the location information output by the model.

6. A fire hazard identification system based on dual-modal image fusion, characterized in that: The system includes an image acquisition module, an image fusion module, a fire identification module, an early warning output module, a data storage module, a data analysis module, a user management module, a remote control module, a map display module and a user interaction platform; An image acquisition module, used to acquire visible light images and thermal imaging images from different positions and angles in the dam area of ​​a hydropower station; An image fusion module is used to preprocess the acquired two modality images and perform image fusion; The fire identification module is used to classify and locate the fused image features and determine the location and extent of fire hazards; The warning output module is used to generate warning information based on the results of fire identification and output it to the monitoring center and the terminal devices of the staff in a visual way; A data storage module, used to store the collected image data and fire identification results in a database; Data analysis module, used to perform statistical analysis and trend analysis on the data stored in the database; User management module, used to manage system user information and permission settings; Remote control module, used to authorize users to monitor and control the system remotely; A map display module is used to display the fire identification results on a map in a graphical manner; The user interaction platform is used to provide a user operation interface, allowing users to use the various functions of the system.

7. The fire hazard identification system according to claim 6, characterized in that: Image fusion module is also used for: The original visible light image and thermal imaging image are used as the first layer of the Gaussian pyramid. The visible light image and thermal imaging image are smoothed by Gaussian filtering respectively. The smoothed images are downsampled to obtain the second layer image. Then, Gaussian filtering and downsampling are continuously performed to generate the corresponding Gaussian pyramid. Subtract the Gaussian blurred images of two adjacent layers to obtain the difference image between the two adjacent layers of the Gaussian pyramid. Check each pixel in each set of difference images, select the pixels in the 3×3 or 5×5 neighborhood of the current pixel for comparison, and determine whether the pixel is a local extreme point. If the current pixel is the maximum or minimum value in its neighborhood, it will be marked as a local extreme point. Then the gradient direction and gradient amplitude of the areas around each group of local extreme points will be calculated, and the gradient values ​​of these areas will be compared with those of the surrounding areas to screen out unstable local extreme points. The screened local extreme points will be used as key points. According to the gradient direction of the pixels around each key point, a main direction is assigned to it. With the key point as the center, pixels are sampled according to the scale in the neighborhood around it to form a local area. The gradient amplitude and direction of each pixel in the local area are calculated and converted into a feature vector. All feature vectors are connected into a vector to form the descriptor of the key point. The feature points in the two images are paired based on the nearest neighbor method. According to the paired feature points, the geometric transformation relationship between the two images is estimated through the affine transformation model. According to the estimated transformation parameters, one of the images is transformed to align the two images in space.

8. The fire hazard identification system according to claim 6, characterized in that: The system also includes a feature extraction module, which is used to: After preprocessing the historical visible light images and thermal imaging images, they are divided into training sets and test sets. The training set is used as input data, and then a set of variational autoencoder models are constructed through encoders and decoders to initialize the model information. The training set is divided into small batches, and each batch of data is then input into the model for forward propagation. Multiple convolutional layers and pooling layers in the encoder are used to gradually extract the features of the input image and reduce the spatial dimension. The feature map of the last convolutional layer is flattened into a one-dimensional vector, and the mean and variance in the latent space are obtained through a fully connected layer. Random noise is then sampled from a standard normal distribution and transformed using the mean and variance to obtain samples in the latent space. The decoder fully connected layer maps the samples in the latent space to feature vectors, and then reshapes the feature vectors output by the fully connected layer into a three-dimensional tensor. The deconvolution layer gradually converts the feature vectors into images of the same size as the original input image. The total loss of the model is calculated through reconstruction loss and KL divergence loss. Based on the total loss, the model parameters are updated through back propagation. The model performance is then verified using the test set. The model is repeatedly trained until the preset number of training times is reached or the performance meets the user's expectations. The preprocessed visible light image and thermal imaging image are respectively input into the encoder part to obtain the corresponding latent vector, which is used as input and decoded by the decoder part to generate a reconstructed image, and the generated latent vector is recorded as feature data.

9. The fire hazard identification system according to claim 6, characterized in that: Image fusion module is also used for: Collect feature data of visible light images and thermal imaging images, process the feature data of the two modalities into data with the same size and number of channels, and input the feature data of images of different modalities into the attention mechanism network; The attention mechanism network is used to calculate the weights of the feature data of the two modalities. For each pixel position, the feature maps of the two modalities are weighted fused according to the obtained weights to obtain a fused feature map.

10. The fire hazard identification system according to claim 6, characterized in that: The fire identification module is also used for: The image features and corresponding label data generated by the image fusion module are used as the data set for training and testing. The LSTM network is built based on the Keras deep learning framework, and the settings of the network input layer, hidden layer, and output layer are initialized. The prepared data set is divided into training set, validation set and test set. In each training cycle, the training set is divided into small batches of data and input into the network for forward propagation. The LSTM network calculates the predicted value based on the current parameters and the loss value of the loss function. Based on the chain rule, the LSTM network transfers the loss value backward from the output layer and updates the model parameters according to the gradient of the loss function. After each training cycle, the LSTM network is verified using the validation set. If the performance of the LSTM network no longer improves or begins to decline, the training is terminated in advance. Otherwise, the LSTM network is trained until the preset number of training times is reached. After the training process is completed, the trained LSTM network is tested using the test set to evaluate its performance on unseen data, and the hyperparameters of the LSTM network are adjusted based on the evaluation results. The latest fused image features are used as input data and input into the loaded LSTM network for forward propagation. Judgment is made based on the probability value output by the LSTM network. If the output probability value exceeds the threshold preset by the staff, it is judged that a fire exists, otherwise it is judged that no fire exists. If a fire exists, it is located based on the location information output by the model.

Citation Information

Patent Citations

  • Remote sensing image content description method based on variational self-attention reinforcement learning

    CN111126282A

  • Fire alarm early warning system based on temperature monitoring

    CN115862259A

  • Factory pipeline smoke and flame detection method based on multi-modal data

    CN117078632A

  • Land ecological environment remote sensing data analysis method based on multi-dimensional data

    CN117992757A

  • Unmanned sanitation vehicle target detection method based on decoupling variational auto-encoder network

    CN118196752A

Cited By

  • Distribution line hidden danger diagnosis system and method fusing visible light and infrared images

    CN120598943A