Tunnel fire video data generation method based on space-time perception CGAN model

Through the tunnel fire video data generation method based on the space-time perception CGAN model, the problem of numerical simulation of tunnel fire and the lack of space-time continuity of the GAN model is solved, and high-fidelity tunnel fire video data is efficiently generated under multiple operating conditions, providing reliable data support for intelligent fire protection systems.

CN120388103AActive Publication Date: 2025-07-29CHINA UNIV OF MINING & TECH

Patent Information

Application Number
CN202510884433.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-07-29
Estimated Expiration
2045-06-30

AI Technical Summary

Technical Problem

Traditional numerical simulation methods of tunnel fires are time-consuming and labor-intensive, and it is difficult to meet the needs of rapid analysis of multiple conditions. Physical experiments are limited by site scale and cost. The existing GAN models lack space-time continuity and training stability when generating fire images, resulting in insufficient diversity and authenticity of generated data.

Method used

The space-time-aware CGAN model is adopted, combined with the time-aware generator and the space-time discriminator, and the space-time-aware consistency of the generated data is constrained by multi-objective loss function, gradient penalty terms and optical flow field matching losses are introduced, and a progressive upsampling structure and time attention mechanism are designed to achieve efficient generation of tunnel fire temperature cloud map videos.

Benefits of technology

The generated tunnel fire video data has high fidelity and space-time continuity in multiple operating conditions, reducing the computational complexity, and providing reliable data support for real-time decision-making and emergency plan formulation of intelligent fire protection systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120388103A_ABST
    Figure CN120388103A_ABST
Patent Text Reader

Abstract

The invention provides a tunnel fire video data generation method based on a space-time perception CGAN model, and aims to solve the problems that a traditional numerical simulation method is time-consuming and labor-consuming, high in physical experiment cost and difficult to cover multiple working conditions. According to the method, tunnel fire data under different fire source powers, positions and fan speeds are simulated through FDS, and a training data set is constructed; designing a time perception generator and a space-time discriminator, and combining a time coding module, a condition normalization layer and an attention mechanism to realize high-fidelity modeling of the space-time dynamic characteristics of the temperature cloud picture; a confrontation training strategy is adopted, time sequence consistency loss and optical flow loss are introduced, and physical rationality and continuity of generated data are ensured. The generated temperature cloud picture video is excellent in performance on indexes such as PSNR and SSIM, traditional CFD simulation can be efficiently replaced, and reliable data support is provided for tunnel fire safety research and an intelligent fire fighting system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the cross - field of civil engineering disaster prevention and mitigation, fire protection engineering and artificial intelligence, and particularly relates to a method for generating tunnel fire video data based on a spatio - temporal perception CGAN model. Background Art

[0002] Tunnel fires, as major safety hazards in underground traffic engineering, are characterized by strong suddenness, fast spread speed, high toxicity of smoke, etc. The high - precision prediction and visualization of their thermodynamic parameters are crucial for disaster prevention and mitigation decision - making and emergency rescue. Currently, the acquisition of tunnel fire data mainly relies on numerical simulation methods and physical experiments. Among them, the fire dynamics simulation (Fire Dynamics Simulator, FDS) based on computational fluid dynamics (CFD) is often widely used. By setting parameters such as fire source power, position, and ventilation conditions, cloud maps of spatio - temporal distributions such as temperature and smoke concentration can be generated. However, this method has limitations: on the one hand, high - fidelity three - dimensional simulations require dense grid division, and a single simulation can take several hours or even days, making it difficult to meet the requirements of rapid analysis of multiple working conditions (such as different combinations of fire source positions, powers, and wind speeds); on the other hand, physical experiments are limited by site scale, cost, and safety constraints, and it is difficult to cover complex scenarios, resulting in limited scale and diversity of the fire database.

[0003] In recent years, data - driven methods have provided new ideas for tunnel fire research. Traditional data augmentation techniques (such as rotation, scaling) can expand the sample size, but cannot generate spatio - temporal dynamic data that conforms to physical laws. Generative Adversarial Networks (GANs) have shown potential in the field of image synthesis due to their powerful data generation ability. However, existing GAN models face two major challenges when applied to the generation of fire image data: firstly, the evolution of fire has strong spatio - temporal correlation, and traditional GANs lack the ability to model temporal continuity and spatial consistency, easily leading to frame - to - frame jumps or logical contradictions in the generated sequence; secondly, problems such as unstable gradients and mode collapse often occur during the model training process, affecting the diversity and authenticity of the generated data. Summary of the Invention

[0004] The purpose of the present invention is to provide a method for generating tunnel fire video data based on a spatio - temporal perception CGAN model, which can efficiently generate high - fidelity tunnel fire temperature cloud map videos under multiple working conditions without repeatedly performing time - consuming CFD calculations. At the same time, the generated dynamic data has both physical rationality and spatio - temporal continuity, providing reliable data support for the real - time decision - making and emergency plan formulation of intelligent fire protection systems.

[0005] To achieve the above-mentioned invention purpose, the present invention provides a method for generating tunnel fire video data based on a spatio-temporal perception CGAN model, including the following steps: Step S1: Establish a numerical model of tunnel fire with multi-dimensional parameter combinations through fire dynamics simulation software, collect temperature cloud map video sequences under different spatio-temporal conditions and perform preprocessing to construct a tunnel fire temperature cloud map video dataset; Step S2: Construct a spatio-temporal conditional generative adversarial network model, including a time perception generator and a spatio-temporal discriminator; the time perception generator generates a temperature cloud map video sequence through a time encoding module and a progressive upsampling structure, and the spatio-temporal discriminator extracts spatio-temporal features through a downsampling module with a stride convolution structure and a time attention mechanism, and introduces gradient penalty constraints; Step S3: Adopt an adversarial training strategy to jointly optimize the adversarial network model, and constrain the spatio-temporal consistency of the generated data through a multi-objective loss function, and the multi-objective loss function includes adversarial loss, temporal consistency loss and optical flow motion field matching loss; Step S4: Use the trained adversarial network model to synthesize a tunnel fire temperature cloud map video sequence, and verify the spatio-temporal fidelity of the generated temperature cloud map video sequence through multi-dimensional evaluation indexes, and the multi-dimensional evaluation indexes include peak signal-to-noise ratio, structural similarity, perceptual similarity and optical flow loss.

[0006] Preferably, the specific method of step S1 is: S1.1. Establish a three-dimensional tunnel model in the fire dynamics simulation software, set multi-dimensional parameter combinations of the fire source position, fire source power and fan wind speed, adopt the t² dynamic growth model to simulate the dynamic change of the fire source power, set the fuel type as heptane and configure the combustion product parameters; S1.2. Arrange temperature monitoring plane slices along the longitudinal center of the tunnel, adopt a multi-level grid division strategy to locally encrypt the fire source area and the fan area, and export temperature cloud map video data at different times; S1.3. Perform frame decomposition, time label encoding and normalization processing on the exported temperature cloud map video data. The normalization processing includes scaling the image to the set pixels by bilinear interpolation, mapping the pixel values to the range of [0,1], and then performing normalization with the set mean and set standard deviation; S1.4. Establish a data loading mechanism that supports time perception, realize batch generation of time-series samples, and form a dynamic training dataset.

[0007] Preferably, the time perception generator includes a time encoding module, a progressive upsampling structure and an output layer; The time encoding module consists of a 5-layer fully connected network, which are, in sequence, an input layer that takes a 1D time variable as input and converts it into a 512-dimensional feature vector through a linear layer, a SiLU activation function layer that processes the 512-dimensional feature vector, an intermediate linear transformation layer that maintains the 512-dimensional feature vector channels, a second SiLU activation function layer, and an output compression layer, finally generating a 128-dimensional time-embedded feature; The progressive upsampling structure contains 3 levels of upsampling modules. Each level of upsampling module sequentially includes an upsampling layer, a convolutional layer that gradually reduces the number of channels from 512 to 64, a temporal conditional normalization layer that performs temporal conditional batch normalization on the channel features, and a ReLU activation layer; among them, in the upsampling layer, the first two levels of upsampling modules use an upsampling rate of 2, and the third level of upsampling module uses target size adjustment; The output layer includes a fully connected layer and a Tanh activation function layer, which are used to adjust the number of channels while outputting the generated image.

[0008] Preferably, the implementation method of the temporal conditional normalization layer is: Using instance normalization as the basic normalization layer for the feature map output by the intermediate linear transformation layer, generating a scaling coefficient scale and a translation coefficient shift through two independent fully connected layers respectively, converting the time-embedded vector into adjustment parameters matching the number of feature channels, and performing feature modulation according to the formula output = norm(x)×(1 + scale)+shift.

[0009] Preferably, the spatio-temporal discriminator network includes a time encoding module, a multi-level downsampling module, a time attention mechanism layer, and a fully connected output layer; The multi-level downsampling module contains 4 levels of downsampling structures. Each level of downsampling structure includes a convolutional layer with a stride of 2 and a convolutional kernel size of 4×4, a temporal conditional normalization layer that normalizes the channel features, and a LeakyReLU activation layer with a negative slope of 0.2; among them, the convolutional layer performs a change in the number of channels from 3 to 512 gradually; The time attention mechanism layer maps the time-embedded vector to 512 dimensions through a fully connected layer, generates feature channel attention weights using the Sigmoid function, and performs global average pooling on the spatial dimension of the feature map output by the intermediate linear transformation layer and then multiplies element-wise with the attention weights; The fully connected output layer adjusts the number of channels from 512 to 1 and outputs a discriminant score.

[0010] Preferably, the adversarial training strategy in step S3 includes: S31. Network Initialization and Training Configuration: Use the Adam optimizer to initialize the time-aware generator and spatio-temporal discriminator respectively. Set the initial learning rate and momentum parameters of the time-aware generator, and set the initial learning rate and momentum parameters of the spatio-temporal discriminator. The training frequency ratio of the spatio-temporal discriminator to the time-aware generator is 5:1; S32. Adversarial Training of Spatio-Temporal Discriminator: Calculate the gradient two-norm at the linear interpolation points of the real temperature cloud map video data and the generated temperature cloud map video data, that is, add a gradient penalty term to constrain the Lipschitz continuity of the spatio-temporal discriminator, and set the penalty coefficient; S33. Adversarial Training of Time-Aware Generator: The adversarial loss drives it to approximate the real distribution by maximizing the discrimination score of the spatio-temporal discriminator for the generated temperature cloud map video data. The temporal consistency loss is defined as the ratio of the pixel difference between the generated images at adjacent time points to the time interval. The optical flow motion field matching loss extracts the adjacent frame motion fields of the generated sequence and the real sequence through the optical flow model; calculate the mean square error between the generated optical flow and the real optical flow; the generated sequence refers to the tunnel temperature cloud map video sequence generated by the time-aware generator, and the real sequence refers to the real tunnel temperature cloud map video sequence generated by the fire dynamics simulation software; S34. Training Process Control: Terminate the training when the peak signal-to-noise ratio of the generated image continuously exceeds the preset value and the structural similarity exceeds the set value.

[0011] Preferably, the specific steps of step S4 include: S4.1: Load the pre-trained weights of the time-aware generator model, generate a Gaussian distribution random noise vector and a continuous time stamp vector, input them into the time-aware generator, and then output a temporal temperature cloud map video sequence; perform an inverse normalization operation on the generated temperature cloud map video sequence, map the pixel values to the preset range, and save them as an image sequence; S4.2: Call the peak signal-to-noise ratio module and the structural similarity module to calculate the pixel-level reconstruction accuracy and structural similarity; S4.3: Load the pre-trained feature extraction model to calculate the perceptual difference, and extract the adjacent frame motion fields of the generated sequence and the real sequence based on the optical flow model, and calculate the optical flow mean square error; S4.4: Plot the curves of the peak signal-to-noise ratio, structural similarity, perceptual similarity, and optical flow loss with the number of training epochs, and generate a high-dimensional feature dimensionality reduction distribution map and a temporal comparison grid map.

[0012] Compared with the prior art, the beneficial effects of the present invention are: 1. The present invention dynamically injects time encoding into the feature spaces of the time-aware generator and the spatio-temporal discriminator, and combines the spatio-temporal conditional normalization layer, effectively enhancing the continuity and physical consistency between frames of the temperature cloud map video sequence.

[0013] 2. Replace the traditional GAN loss with the Wasserstein distance loss, and combine the gradient penalty term to constrain the Lipschitz continuity of the spatio-temporal discriminator, significantly improving the training stability. At the same time, introduce the temporal consistency loss and the optical flow motion field matching loss to ensure that the spatio-temporal dynamic characteristics of the generated data highly coincide with the real fire evolution law.

[0014] 3. Design a joint training framework for the time-aware generator and the spatio-temporal discriminator. Through the coupling of multi-dimensional conditional inputs (fire source location, power, wind speed) and timestamps, realize the controllable generation of fire data under different working conditions, breaking through the dependence of traditional methods on fixed boundary conditions.

[0015] 4. Through the progressive upsampling structure and the time attention mechanism, while reducing the computational complexity, ensure the accurate restoration of the spatial resolution and dynamic details of the generated temperature cloud map. Description of the Drawings

[0016] The drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention, and do not constitute a limitation to the present invention.

[0017] Figure 1 It is a flowchart of a method for generating tunnel fire video data based on a spatio-temporal aware CGAN model provided by the present invention; Figure 2 It is an architecture diagram of the time-aware generator provided by the present invention; Figure 3 It is an architecture diagram of the time encoding module provided by the present invention; Figure 4 It is an architecture diagram of the 3-level upsampling module provided by the present invention; Figure 5 It is an architecture diagram of the time-conditioned normalization layer provided by the present invention; Figure 6 It is an architecture diagram of the spatio-temporal discriminator provided by the present invention; Figure 7 It is an architecture diagram of the 4-level downsampling module and the time attention mechanism provided by the present invention. Detailed Embodiments

[0018] In order to make the objectives, technical solutions and advantages of the present invention clearer, the following further describes the present invention in detail with reference to the drawings and embodiments. Of course, the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0019] As Figures 1 - 7 shown, the embodiment of the present invention provides a method for generating tunnel fire video data based on a spatio-temporal aware CGAN model, including the following steps: Step S1: Using the fire dynamics simulation software FDS, a tunnel fire numerical model with a multi-dimensional parameter combination is established. Temperature cloud image video sequences under different temporal and spatial conditions are collected and preprocessed to construct a tunnel fire temperature cloud image video dataset. This specifically includes: Step 1.1: Establish a tunnel fire model with different fire source locations, fire source power, and fan speed in the fire dynamics simulation software FDS; Step 1.1.1: The tunnel dimensions are 300m x 6m x 9m in length, width, and height. Three fire source locations (50m, 150m, and 250m), eight fire source power levels (5MW-40MW, in 5MW increments), and 12 fan speeds (1m / s-12m / s, in 1m / s increments) are selected. Step 1.1.2: Use a 2m×5m rectangular fire source, positioned 0.5m above the ground. Apply the t² fire growth model to simulate power dynamics. The total simulation time is 300 seconds. The fuel type is heptane (C7H 16 ), the carbon monoxide generation rate in the combustion products is 0.006, and the smoke particle generation rate is 0.015; the tunnel wall is made of concrete, and its thermal parameters use the default values of FDS software; Step 1.1.3: Use a high-precision grid with a grid size of 0.5m in the area within a 50m radius from the fire source and within a 5m radius around the fan. Use a standard grid with a grid size of 1m in the remaining areas. Set both ends of the tunnel as open boundaries. Step 1.1.4: Two sets of jet fans are symmetrically arranged at 75m and 225m from the tunnel entrance, with two fans in each set. Each fan has a length × width × height of 3m × 1.5m × 1.5m. They are installed 1m from the arch and equipped with 1m diameter air supply ducts. The air supply volume is dynamically adjusted by the HVAC system to achieve the target wind speed. Step 1.1.5: Deploy a temperature monitoring plane slice along the longitudinal center of the tunnel to monitor temperature changes at different times throughout the simulation process, and ultimately export the temperature cloud map video data. Step 1.2: Decompose the original temperature cloud image video data into continuous frame images at a fixed sampling rate and store them as a set of ordered image files. Use the file name sequence as the time sequence identifier and store them in the format of frame_0001.png to frame_XXXX.png. Step 1.3: Assign a normalized time label to each frame of image to form a time-image pair; Step 1.4: Use multi-level image transformation to normalize the original frame to the model input size. Use bilinear interpolation to scale the image to the preset size (50×1800 pixels). Use ToTensor transformation to map the pixel values to the range [0,1], then perform normalization with a mean of 0.5 and a standard deviation of 0.5. Then, force the image to be converted to RGB three-channel format. Step 1.5: Establish a data loading mechanism that supports time perception, implement batch generation of time series samples, and form a dynamic training dataset; Step S2: Construct a spatio-temporal conditional generative adversarial network model, including a time perception generator and a spatio-temporal discriminator; the time perception generator generates a temperature cloud map video sequence through a time encoding module and a progressive upsampling structure, and the spatio-temporal discriminator extracts spatio-temporal features through a downsampling module with a stride convolution structure and a time attention mechanism, and introduces gradient penalty constraints; The time perception generator includes 1 time encoding module, 3 levels of upsampling modules, 4 time conditional normalization layers, and 1 fully connected non-linear activation output layer; The time encoding module adopts a 5-layer fully connected network, which are in turn: ① Input layer, converting a 1D time variable into a 512D feature vector through a linear layer; ② SiLU activation function layer, using the SiLU activation function to process the 512D features; ③ Intermediate linear transformation layer, maintaining the 512D feature channels; ④ Second SiLU activation function layer, using the SiLU activation function; ⑤ Output compression layer, compressing the 512D features to a preset time embedding dimension (128D); The 3-level upsampling module adopts a progressive amplification structure, and each level includes: ① Upsampling layer, the first level uses an upsampling rate of 2 times, the second level uses an upsampling rate of 2 times, and the third level uses target size adjustment; ② Convolution layer, successively using channel number changes of 512→256, 256→128, and 128→64; ③ Time conditional normalization layer, respectively performing time conditional batch normalization on 256, 128, and 64 channel features; ④ ReLU activation layer, using the ReLU non-linear activation function; The time conditional normalization layer injects time information in the following way: ① Use instance normalization (InstanceNorm2d) as the basic normalization layer; ② Generate a scaling coefficient (scale) and a translation coefficient (shift) through two independent fully connected layers respectively; ③ Convert the time embedding vector into adjustment parameters matching the number of feature channels; ④ According to the formula output = norm( x )×(1 + scale)+shift for feature modulation.

[0020] One fully-connected non-linear activation output layer, including one fully-connected layer and one Tanh activation function layer, is used to output the generated image while adjusting the number of channels.

[0021] The spatio-temporal discriminator includes one time encoding module, one 4-level downsampling module, three time-conditioned normalization layers, one time attention mechanism layer, and one fully-connected output layer; The time encoding module is the same as the time encoding module of the time-aware generator; The 4-level downsampling module adopts a strided convolution structure, and each level includes: ① Convolution layer, successively adopting channel number changes of 3→64, 64→128, 128→256, 256→512, with a convolution kernel size of 4×4 and a stride of 2; ② Time-conditioned normalization layer, which normalizes the features of 128, 256, and 512 channels; ③ LeakyReLU activation layer, using the LeakyReLU non-linear activation function with a negative slope of 0.2; The time attention mechanism is implemented as follows: ① Map the time embedding vector to 512 dimensions through a fully-connected layer; ② Use the Sigmoid function to generate attention weights; ③ Perform global average pooling on the spatial dimension of the final feature map; ④ Multiply the pooled features element-wise with the attention weights; In addition, one fully-connected output layer adjusts the number of channels from 512 to 1 and outputs the discriminant score.

[0022] Step S3: Adopt an adversarial training strategy to jointly optimize the adversarial network model, and constrain the spatio-temporal consistency of the generated data through a multi-objective loss function. The multi-objective loss function includes adversarial loss, temporal consistency loss, and optical flow motion field matching loss; the specific steps are as follows: Step 3.1: Network initialization and training configuration Step 3.1.1: Use the PyTorch framework to construct the time-aware generator and the spatio-temporal discriminator; Step 3.1.2: Use the Adam optimizer to initialize the parameter optimizers of the time-aware generator and the spatio-temporal discriminator respectively, set the initial learning rate to 0.0001, and the momentum parameters to 0.5 and 0.9; Step 3.1.3: Configure the training parameters: the batch size is 8, the total number of training epochs is 1000, and the spatio-temporal discriminator is trained 5 times, and the time-aware generator is trained 1 time; Step 3.2: Adversarial training of the spatio-temporal discriminator Step 3.2.1: Randomly sample real-time temperature cloud map video data from the temperature cloud map video dataset, and generate a batch of Gaussian distribution random noise vectors; input the random noise and the corresponding timestamps into the time-aware generator to generate simulated temperature cloud map video data; Step 3.2.2: Calculate the difference in the discrimination scores between the real temperature cloud map video data (i.e., real data) simulated by the fire dynamics simulation software FDS and the temperature cloud map video data (i.e., generated data) generated by the time-aware generator as the basic loss; add a gradient penalty term: calculate the gradient two-norm at the linear interpolation points between the real data and the generated data to constrain the Lipschitz continuity of the spatio-temporal discriminator, and set the penalty coefficient to 10; Step 3.2.3: Update the weights of the spatio-temporal discriminator network through the backpropagation algorithm to preferentially improve the discrimination ability between the real data and the generated data; Step 3.3: Adversarial training of the time-aware generator Step 3.3.1: Design of multi-objective loss, including adversarial loss, maximizing the score of the spatio-temporal discriminator for the generated data to drive the generated data to approximate the real distribution; including temporal consistency loss, calculating the ratio of the pixel difference between the generated images at adjacent time points (referring to the temperature cloud map output by the time-aware generator at a single timestamp) to the time interval, and forcing the temporal continuity of the generated sequence (referring to a set of temperature cloud maps output by the time-aware generator at consecutive timestamps), and setting the loss weight to 0.3; Step 3.3.2: Adopt an alternating training strategy, and update the parameters of the time-aware generator once every 5 times of spatio-temporal discriminator training to maintain the adversarial balance; Step 3.4: Monitoring of the training process and saving of the model Step 3.4.1: Use TensorBoard to record the change curves of the loss of the time-aware generator, the loss of the spatio-temporal discriminator, the temporal consistency loss, and the gradient penalty value with the number of training rounds; periodically calculate the peak signal-to-noise ratio (PSNR), structural similarity (SSIM), perceptual difference (LPIPS), and optical flow error (FlowMSE), and save them to a structured CSV file; Step 3.4.2: Save the weight files of the time-aware generator and the spatio-temporal discriminator once every 200 rounds of training, and store them using the torch.save.state_dict function; support interruption protection during training, and automatically save the intermediate state weights when the training is abnormally terminated; Step 3.4.3: When the PSNR of the generated images continuously exceeds 28dB and the SSIM exceeds 0.85, it is determined that the adversarial network model converges and the training is terminated; Step 3.4.4: Generate a complete sequence of real-time temperature cloud maps every 200 rounds, map the pixel values to the range [0,1] through the inverse normalization operation, and save them as PNG images; Step 3.4.5: Use Matplotlib to plot a comparison grid of the generated sequence and the real sequence to verify spatio-temporal consistency. The generated sequence refers to the video sequence currently output by the time-aware generator during the training process, and the real sequence refers to the FDS simulation video sequence with the same working conditions and timestamps as the generated sequence in the training dataset.

[0023] Step S4: Use the trained adversarial network model to synthesize a tunnel fire temperature cloud map video sequence, and verify the spatio-temporal fidelity of the generated temperature cloud map video sequence through multi-dimensional evaluation metrics, where the multi-dimensional evaluation metrics include Peak Signal-to-Noise Ratio (PSNR), Structural Similarity Index Measure (SSIM), Learned Perceptual Image Patch Similarity (LPIPS), and Optical Flow Loss (FlowMSE).

[0024] Specifically, it includes the following steps: Step 4.1: Call the torch.load.load_state_dict function of the PyTorch library to load the pre-trained weight file of the time-aware generator model; use the torch.randn function to generate a Gaussian distribution random noise vector with a dimension consistent with the latent space dimension of the time-aware generator; generate a continuous timestamp vector through the torch.linspace function and input it into the time-aware generator to output a time-series temperature cloud map sequence; perform an inverse normalization operation on the generated data to map the pixel values to the range [0, 1], and save them as a.png format image sequence through the PIL.Image.save function; Step 4.2: Use the torchmetrics.PeakSignalNoiseRatio module in PyTorch to calculate the PSNR value of the generated cloud map and the real cloud map to measure the pixel-level reconstruction accuracy; call the torchmetrics.StructuralSimilarityIndexMeasure module to evaluate the similarity of the generated cloud map and the real cloud map in terms of brightness, contrast, and structure; save the above results in floating-point form to a.csv file; Step 4.3: Load the pre-trained AlexNet model as a feature extractor, and calculate the difference between the generated cloud map and the real cloud map in the deep feature space through the lpips.LPIPS module; use the optical flow model torchvision.models.optical_flow.raft_large to extract the adjacent frame motion fields of the generated sequence and the real sequence respectively; calculate the mean square error of the generated optical flow and the real optical flow to measure the temporal dynamic consistency, and save the results to a.csv file; Step 4.4: Call the plt.plot function of the Matplotlib library to plot the curves of the peak signal-to-noise ratio (PSNR), structural similarity (SSIM), perceptual similarity (LPIPS), and optical flow loss (FlowMSE) versus the number of training epochs, and save them as line charts; use the TSNE function of the Scikit-learn library to reduce the high-dimensional features of the generated cloud images and the real cloud images to a two-dimensional space, and draw a distribution scatter plot through plt.scatter to verify the overlap degree of the data distribution; arrange the generated cloud images and the real cloud images in a time series, generate a comparison grid chart through plt.subplot, and save it as a high-definition.jpg file.

[0025] The present invention can efficiently generate tunnel fire temperature cloud image videos under multiple working conditions with high fidelity, without repeatedly performing time-consuming CFD calculations. At the same time, the generated dynamic data has both physical rationality and spatio-temporal continuity, providing reliable data support for the real-time decision-making and emergency plan formulation of intelligent fire protection systems.

[0026] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for generating tunnel fire video data based on a spatio-temporal perception CGAN model, characterized in that, It includes the following steps: Step S1: Establish a numerical model of tunnel fire conditions with multi-dimensional parameter combinations using fire dynamics simulation software. Collect video sequences of temperature cloud maps under different spatio-temporal conditions and perform preprocessing to construct a tunnel fire temperature cloud map video dataset; Step S2: Construct a spatio-temporal conditional generative adversarial network model, including a time-aware generator and a spatio-temporal discriminator; the time-aware generator generates a video sequence of temperature cloud maps through a time encoding module and a progressive upsampling structure, and the spatio-temporal discriminator extracts spatio-temporal features through a downsampling module with a stride convolution structure and a time attention mechanism, and introduces gradient penalty constraints; Step S3: Adopt an adversarial training strategy to jointly optimize the adversarial network model, and constrain the spatio-temporal consistency of the generated data through a multi-objective loss function, where the multi-objective loss function includes adversarial loss, temporal consistency loss, and optical flow motion field matching loss; Step S4: Use the trained adversarial network model to synthesize a video sequence of tunnel fire temperature cloud maps, and verify the spatio-temporal fidelity of the generated temperature cloud map video sequence through multi-dimensional evaluation metrics, where the multi-dimensional evaluation metrics include peak signal-to-noise ratio, structural similarity, perceptual similarity, and optical flow loss.

2. The method for generating tunnel fire video data based on the spatio-temporal perception CGAN model according to claim 1, wherein The specific method of Step S1 is as follows: S1.

1. Establish a three-dimensional tunnel model in the fire dynamics simulation software, set multi-dimensional parameter combinations of the fire source position, fire source power, and fan wind speed, use the t² dynamic growth model to simulate the dynamic change of the fire source power, set the fuel type as heptane, and configure the combustion product parameters; S1.

2. Arrange temperature monitoring plane slices along the longitudinal center of the tunnel, adopt a multi-level grid division strategy to locally encrypt the fire source area and the fan area, and export the temperature cloud map video data at different times; S1.

3. Perform frame decomposition, time tag encoding, and normalization processing on the exported temperature cloud map video data. The normalization processing includes scaling the image to the set number of pixels using bilinear interpolation, mapping the pixel values to the range [0, 1], and then performing normalization with the set mean and set standard deviation; S1.

4. Establish a data loading mechanism that supports time awareness, realize batch generation of sequential samples, and form a dynamic training dataset.

3. A method for generating tunnel fire video data based on a spatio-temporal perception CGAN model according to claim 1, characterized in that, The time-aware generator includes a time encoding module, a progressive upsampling structure, and an output layer; The time encoding module consists of a 5-layer fully connected network, which are an input layer that inputs a 1D time variable and converts it into a 512D feature vector through a linear layer, a SiLU activation function layer that processes the 512D feature vector, an intermediate linear transformation layer that maintains the 512D feature vector channels, a second SiLU activation function layer, and an output compression layer, and finally generates a 128D time embedding feature; The progressive upsampling structure contains 3 levels of upsampling modules. Each level of upsampling module sequentially includes an upsampling layer, a convolutional layer that gradually reduces the number of channels from 512 to 64, a time conditional normalization layer that performs time conditional batch normalization on the channel features, and a ReLU activation layer; Among them, in the upsampling layer, the first two levels of upsampling modules use an upsampling rate of 2 times, and the third level of upsampling module uses target size adjustment; The output layer includes a fully connected layer and a Tanh activation function layer, which are used to adjust the number of channels while outputting the generated image.

4. A method for generating tunnel fire video data based on a spatio-temporal perception CGAN model according to claim 3, characterized in that, The time condition normalization layer is implemented as follows: Instance normalization is used as the basic normalization layer for the feature map output by the intermediate linear transformation layer. The scaling factor scale and the translation factor shift are generated respectively through two independent fully connected layers. The time embedding vector is converted into an adjustment parameter that matches the number of feature channels. Feature modulation is performed according to the formula output = norm(x) × (1 + scale) + shift.

5. The method for generating tunnel fire video data based on the spatiotemporal perception CGAN model according to claim 4 is characterized in that: The spatiotemporal discriminator network includes a temporal encoding module, a multi-level downsampling module, a temporal attention mechanism layer, and a fully connected output layer; The multi-level downsampling module includes a 4-level downsampling structure, each of which includes a convolutional layer with a stride of 2 and a convolution kernel size of 4×4, a temporal conditional normalization layer for normalizing channel features, and a LeakyReLU activation layer with a negative slope of 0.2; wherein the convolutional layer performs a channel number change from 3 to 512 in a step-by-step manner; The temporal attention mechanism layer maps the temporal embedding vector to 512 dimensions through a fully connected layer, uses a sigmoid function to generate feature channel attention weights, performs global average pooling on the spatial dimensions of the feature map output by the intermediate linear transformation layer, and then multiplies the attention weights element by element; The fully connected output layer adjusts the number of channels from 512 to 1 and outputs the discriminant score.

6. The method for generating tunnel fire video data based on the spatiotemporal perception CGAN model according to claim 5 is characterized in that: The adversarial training strategy in step S3 includes: S31. Network initialization and training configuration: Use the Adam optimizer to initialize the time-aware generator and the spatiotemporal discriminator respectively, set the initial learning rate and momentum parameters of the time-aware generator to be, set the initial learning rate and momentum parameters of the spatiotemporal discriminator to be, and the training frequency ratio of the spatiotemporal discriminator to the time-aware generator to be 5:1; S32, spatiotemporal discriminator adversarial training: Calculate the gradient norm at the linear interpolation point between the real temperature cloud image video data and the generated temperature cloud image video data, that is, add a gradient penalty term, constrain the Lipschitz continuity of the spatiotemporal discriminator, and set the penalty coefficient; S33. Adversarial training of the time-aware generator: The adversarial loss maximizes the discrimination score of the spatiotemporal discriminator on the generated temperature cloud image video data, driving it to approach the true distribution. The temporal consistency loss is defined as the ratio of the pixel difference of the generated images at adjacent time points to the time interval. The optical flow motion field matching loss uses the optical flow model to extract the motion field of adjacent frames of the generated sequence and the true sequence. The mean square error between the generated optical flow and the true optical flow is calculated. The generated sequence refers to the tunnel temperature cloud image video sequence generated by the time-aware generator, and the true sequence refers to the real tunnel temperature cloud image video sequence generated by the fire dynamics simulation software. S34, training process control: when the peak signal-to-noise ratio of the generated image continuously exceeds a preset value and the structural similarity exceeds a set value, the training is terminated.

7. A method for generating tunnel fire video data based on a spatio-temporal perception CGAN model according to claim 6, characterized in that, The specific steps of step S4 include: S4.1: Load the weights of the pre-trained time-aware generator model, generate a Gaussian distribution random noise vector and a continuous timestamp vector, input them into the time-aware generator, and then output a temporal temperature cloud map video sequence; perform an inverse normalization operation on the generated temperature cloud map video sequence, map the pixel values to a preset range, and save them as an image sequence; S4.2: Call the peak signal-to-noise ratio module and the structural similarity module to calculate the pixel-level reconstruction accuracy and structural similarity; S4.3: Load the pre-trained feature extraction model to calculate the perceptual difference, and extract the adjacent frame motion fields of the generated sequence and the real sequence based on the optical flow model, and calculate the optical flow mean square error; S4.4: Plot the curves of the peak signal-to-noise ratio, structural similarity, perceptual similarity, and optical flow loss versus the number of training epochs, and generate a high-dimensional feature dimensionality reduction distribution map and a temporal comparison grid map.

Citation Information

Patent Citations

  • Fire detection early warning method based on attention mechanism and multi-scale characteristics

    CN116343077A

  • Tunnel fire critical wind speed prediction method

    CN116611344A

  • Critical wind speed prediction method for tunnel fire

    CN116629138A

  • Tunnel fire situation prediction method based on deep learning

    CN118279816A

  • Video data driven tunnel fire detection and simulation method and system

    CN119600510A

Cited By

  • Real-time monitoring method and system for tunnel lining chipping

    CN121438227A