Tunnel water seepage data set generation method based on de-noising diffusion probability model

Through the tunnel seepage data set generation method based on the denoising diffusion probability model, the pixel-level annotation and denoising diffusion model are used to generate synthetic images, and combined with real images, the problems of manual labeling dependence and insufficient data enhancement in the tunnel seepage segmentation technology are solved, and the problem of insufficient data enhancement is improved. Model performance and tunnel structure safety monitoring were carried out.

CN119169410APending Publication Date: 2024-12-20NORTH CHINA ELECTRIC POWER UNIV +2
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411320073.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

The existing tunnel seepage segmentation technology relies on manual annotation data sets, which are costly, time-consuming and poor labeling consistency. The existing data enhancement methods cannot effectively simulate complexity and randomness in real scenarios, limiting the recognition performance of the model.

Method used

The tunnel seepage data set generation method based on the denoising diffusion probability model is adopted, and the semantic mask information is obtained through pixel-level annotation, and the denoising diffusion model is trained to generate synthetic images, and combined with the real image to form an extended data set to train the tunnel seepage segmentation model. .

Benefits of technology

It significantly reduces the dependence of manual labeling, reduces cost and time consumption, generates high-quality and diversified annotated data, improves the performance of tunnel seepage segmentation models, and improves the safety monitoring and management level of tunnel structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119169410A_ABST
    Figure CN119169410A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of computer vision, and particularly relates to a tunnel water seepage data set generation method based on a de-noising diffusion probability model, which comprises the following steps: collecting a tunnel surface image, segmenting the tunnel surface image into a plurality of sub-images, and obtaining a sub-image set; screening a target image in the sub-image set, performing pixel-level labeling on a water seepage area in the target image to obtain semantic mask information, and adding the target image and the semantic mask information corresponding to the target image into a tunnel water seepage image data set in a paired manner; based on the tunnel water seepage image data set, training a denoising diffusion probability model based on semantic mask information guidance, and generating a synthetic water seepage image data set by using the trained denoising diffusion probability model; and jointly training a tunnel water seepage segmentation model based on the tunnel water seepage image data set and the synthetic water seepage image data set, and verifying the picture quality of the water seepage image data set by using the model. And synthesis of a large amount of high-quality and diversified water seepage data with labels is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of computer vision, and in particular relates to a method for generating a tunnel water seepage data set based on a denoising diffusion probability model. Background Art

[0002] In the field of tunnel engineering, the detection and analysis of water seepage problems are crucial to ensure the safety of tunnel structures. Current tunnel water seepage segmentation technology relies on manually annotated datasets, which is extremely dependent on the experience and judgment of experts. This is not only costly and time-consuming, but also prone to poor annotation consistency and high error rate, which in turn limits the accuracy of the research and the universality of the model. Moreover, most of the existing data enhancement methods adopt relatively primitive and single strategies, mainly focusing on simple geometric transformations of images, such as rotation and flipping. Although this approach helps to initially alleviate the problem of data scarcity, it fails to simulate the complex diversity and randomness of tunnel water seepage in real scenes, such as the variability of water seepage morphology and visual changes caused by environmental factors such as light and humidity, thereby limiting the recognition performance of the model in real scenes. Therefore, there is an urgent need for a tunnel water seepage dataset generation method based on a denoising diffusion probability model to synthesize a large amount of high-quality and diverse annotated water seepage data to significantly reduce the reliance on manual annotation and reduce costs and time consumption. Summary of the invention

[0003] The object of the present invention is to provide a method for generating a tunnel water seepage data set based on a denoising diffusion probability model, which is characterized by comprising the following steps:

[0004] Step S1: collecting a tunnel surface image, dividing the tunnel surface image into a plurality of sub-images, and obtaining a sub-image set;

[0005] Step S2: Filter the target image in the sub-image set, perform pixel-level annotation on the water seepage area in the target image to obtain semantic mask information, and pair the target image and the semantic mask information corresponding to the target image and add them to the tunnel water seepage image dataset; the target image is a sub-image containing the water seepage area; the semantic mask information includes: the position and shape of the water seepage area;

[0006] Step S3: Based on the tunnel water seepage image dataset, a denoising diffusion probability model guided by semantic mask information is trained, and a synthetic water seepage image dataset is generated using the trained denoising diffusion probability model;

[0007] Step S4: jointly train a tunnel water seepage segmentation model based on the tunnel water seepage image dataset and the synthetic water seepage image dataset, and use the trained tunnel water seepage segmentation model to verify the image quality of the water seepage image dataset.

[0008] The step S1 comprises the following steps:

[0009] Step S11: Scan the tunnel using a tunnel laser scanner to obtain and export a tunnel surface image;

[0010] Step S12: The exported tunnel surface image is cropped and segmented according to 512*512 pixels to obtain a sub-image set.

[0011] In step S2, pixel-level annotation of the water seepage area in the target image is performed to obtain semantic mask information, and pairing the target image with the semantic mask information corresponding to the target image and adding it to the tunnel water seepage image dataset comprises the following steps:

[0012] Step S21: using LabelMe annotation software to perform pixel-level annotation on the water seepage area in the target image to obtain semantic mask information; the background area of ​​the semantic mask information is marked with a pixel value of 0; the water seepage area of ​​the semantic mask information is marked with a pixel value of 1;

[0013] Step S22: Pairing the target image and the semantic mask information corresponding to the target image to form a target image mask information pair; adding the target image mask information pair to the tunnel water seepage image dataset;

[0014] Step S23: Divide the target image mask information pairs in the tunnel water seepage image dataset into a training set and a test set according to a ratio of 8:2.

[0015] The training of the denoising diffusion probability model guided by semantic mask information in S3 includes the following steps:

[0016] Step S31: Use the real water seepage image to simulate the forward diffusion process, add noise to the target image, and obtain the probability distribution x of the completely noisy sample t for:

[0017]

[0018] In the formula, x t represents the probability distribution of completely noisy samples, x 0 represents the original tunnel water seepage image;

[0019] α t is a noise attenuation coefficient defined in the range [0,1], which is used to control the degree of noise attenuation in each step; is random noise sampled from a standard normal distribution;

[0020] Step S32: De-noising the probability distribution x of the completely noised sample t Step by step, restore to the original data sample x 0, complete the reverse denoising process; the denoising process uses the U-Net architecture to predict the noise ∈ θ , using semantic mask information to provide the encoder of the U-Net architecture with the location and shape of the water seepage area, and using semantic mask information to provide semantic guidance for the generated image;

[0021] The U-Net architecture is used to predict the noise ∈ θ for:

[0022] ∈ θ (x t ,t,c 0 )=D θ (E θ (x t ),c 0 )

[0023] In the formula, ∈ θ is the noise to be estimated, θ is the parameter of the prediction noise model U-Net, E θ is the encoder, D θ is the decoder; c 0 is the semantic mask information;

[0024] Step S33: The optimization goal of the denoising diffusion model is to improve the accuracy of the predicted noise by minimizing the loss function; the optimization goal of the denoising diffusion model is:

[0025]

[0026] Where L condition represents the loss function value, ||·‖ 2 represents the L2 norm, E is the expectation operator, ∈ θ represents the noise estimated by the neural network, θ is the neural network parameter, c 0 is the semantic mask information.

[0027] The S4 includes jointly training the tunnel water seepage segmentation model based on the tunnel water seepage image dataset and the synthetic water seepage image dataset:

[0028] Step S41: The real tunnel water seepage images in the tunnel water seepage image dataset and the synthetic water seepage images in the synthetic water seepage image dataset are combined in a ratio of 1:2 to form a tunnel water seepage training set D combined ;

[0029] D combined =D real ∪D synthetic

[0030] D real is the original real image dataset, D synthetic It is a synthetic image dataset using diffusion model;

[0031] Step S42: Using the tunnel seepage training set D combined Training tunnel water seepage segmentation model;

[0032]

[0033] Among them, L is the value of the total segmentation loss of the model, N is the number of samples in the training set, and L seg is the segmentation loss function, P i is the model’s prediction for the i-th sample, G i is the corresponding true segmentation mask.

[0034] The S4 uses the trained tunnel water seepage segmentation model to verify the image quality of the water seepage image dataset, including:

[0035] Based on semantic mask information c 0 and random noise ε t , using the trained denoising diffusion probability model to generate a synthetic water seepage image under the guidance of semantic mask information;

[0036] Using the trained tunnel water seepage segmentation model to obtain a water seepage area prediction result;

[0037] The quality of the synthetic image is quantified by calculating the intersection-and-union ratio between the water seepage area prediction result and the true semantic mask. When the intersection-and-union ratio is greater than a preset threshold, the synthetic water seepage image is determined to be a high-quality synthetic water seepage image.

[0038] The beneficial effects of the present invention are:

[0039] A tunnel water seepage data set generation method based on a denoising diffusion probability model disclosed in the present invention is applied to synthesize a large amount of high-quality and diverse annotated water seepage data, so as to significantly reduce the dependence on manual annotation, and reduce costs and time consumption.

[0040] The method for generating a tunnel water seepage dataset disclosed in the present invention is implemented to allow the generation of annotated tunnel water seepage images. In order to guide the diffusion model to generate high-quality annotated water seepage images, mask information showing the given geometry and position is introduced during the diffusion model training process. The purpose is to enhance the generative ability of the model by providing clear structural information, so that it can more accurately simulate actual water seepage scenarios and annotation relationships. By using a synthetic dataset to optimize a real tunnel water seepage segmenter, comparative experiments verify that this method significantly improves performance on multiple indicators in the absence of data.

[0041] The method for generating a tunnel water seepage data set disclosed in the present invention can generate various complex and diverse water seepage forms and simulate various situations that may occur in real scenes. By generating a large amount of tunnel water seepage data, the problem that the supervised deep neural network for tunnel water seepage detection in the prior art requires a large-scale fully annotated data set, which is difficult to obtain in a real environment, is effectively solved, and the performance of the water seepage segmentation model is significantly improved, thereby effectively improving the safety monitoring and management level of the tunnel structure. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 A schematic diagram of a method for generating a tunnel water seepage data set based on a denoising diffusion probability model according to the present invention;

[0043] Figure 2 A schematic diagram of a segmentation model for jointly training real images and synthetic images according to an embodiment of the present invention;

[0044] Figure 3 The tunnel water seepage image and annotation schematic diagram of the embodiment of the present invention, wherein (A) is the original tunnel water seepage image; (B) is the standard image;

[0045] Figure 4 is a schematic diagram of a diffusion model according to an embodiment of the present invention;

[0046] Figure 5 is a schematic diagram of a diffusion model based on mask conditions according to an embodiment of the present invention;

[0047] Figure 6 The figure is a schematic diagram of the process of screening high-quality water seepage images according to an embodiment of the present invention. DETAILED DESCRIPTION

[0048] In order to solve the problem of lack of large-scale fully annotated data sets for supervised deep neural networks for tunnel water seepage detection in real environments, the present invention provides a method for generating a tunnel water seepage data set based on a denoising diffusion probability model. The present invention is further described in detail below in conjunction with the accompanying drawings.

[0049] like Figure 1 The embodiment of the present invention shown discloses a method for generating a tunnel water seepage data set based on a denoising diffusion probability model, comprising the following steps:

[0050] Step S1: collecting a tunnel surface image, dividing the tunnel surface image into a plurality of sub-images, and obtaining a sub-image set;

[0051] Step S2: Filter the target image in the sub-image set, perform pixel-level annotation on the water seepage area in the target image to obtain semantic mask information, and pair the target image and the semantic mask information corresponding to the target image and add them to the tunnel water seepage image dataset; the target image is a sub-image containing the water seepage area; the semantic mask information includes: the position and shape of the water seepage area;

[0052] Step S3: Based on the tunnel water seepage image dataset, a denoising diffusion probability model guided by semantic mask information is trained, and a synthetic water seepage image dataset is generated using the trained denoising diffusion probability model;

[0053] Step S4: jointly train a tunnel water seepage segmentation model based on the tunnel water seepage image dataset and the synthetic water seepage image dataset, and use the trained tunnel water seepage segmentation model to verify the image quality of the water seepage image dataset.

[0054] The method for generating a tunnel water seepage data set based on a denoising diffusion probability model disclosed in the present invention has the following characteristics:

[0055] 1. Pixel-level annotation semantic mask extraction: The present invention first performs pixel-level annotation from the collected real tunnel scanning image dataset to extract key semantic masks. These masks mark the location and shape of the water seepage area in the scanned image in detail, providing the necessary structural information and semantic guidance for the subsequent synthetic image.

[0056] 2. Image synthesis based on denoising diffusion probability model: The core advantage of the diffusion model is that it can fit the target data distribution and generate high-quality images. The present invention uses a pixel-level mask to guide the denoising diffusion probability model to synthesize tunnel water seepage images. Its advantage is that it can retain key semantic structural information consistent with real samples. This method can not only generate a variety of complex and diverse water seepage forms, but also simulate a variety of situations that may occur in real scenes, including visual changes caused by environmental factors such as light and humidity. The difference from the prior art is that the semantic mask is used to guide the denoising diffusion probability model, making the synthesized image more realistic and diverse.

[0057] 3. Combination of real images and synthetic images to expand the training data set: After synthesizing tunnel water seepage images using the diffusion model, we combine these synthetic images with real tunnel water seepage images to form an extended training data set. This combination increases the diversity and coverage of tunnel water seepage data, provides the model with richer learning samples, and thus significantly improves the performance of the water seepage segmentation model. Compared with the prior art, the present invention makes the training data set more extensive and diverse by combining synthetic images with real images, and improves the generalization ability and performance of the downstream segmentation model.

[0058] In summary, the present invention achieves the synthesis of a large amount of high-quality and diverse annotated water infiltration data by extracting semantic masks through pixel-level annotation, synthesizing images using a denoising diffusion probability model, and combining the synthesized images with real images. Compared with the prior art, the innovation of the present invention is that the synthesis model is guided by semantic masks, which improves the accuracy and diversity of the synthesized images, and by combining real and synthetic images, the coverage and diversity of the training data set are expanded, thereby significantly improving the performance of the water infiltration segmentation model.

[0059] Each step is described below in conjunction with specific embodiments:

[0060] Step S1: collecting a tunnel surface image, dividing the tunnel surface image into a plurality of sub-images, and obtaining a sub-image set;

[0061] The step S1 comprises the following steps:

[0062] Step S11: Scan the tunnel using a tunnel laser scanning device to obtain and export a tunnel surface image;

[0063] Step S12: The exported tunnel surface image is cropped and segmented according to 512*512 pixels to obtain a sub-image set.

[0064] In this embodiment, the step S1 completes the acquisition and preprocessing of the tunnel laser scanning image, and the specific process is as follows:

[0065] Image acquisition is the key first step to ensure the accuracy and efficiency of automatic detection of tunnel surfaces. Most existing technologies use total stations and fixed 3D laser scanners to obtain tunnel surface images, which can no longer meet the accuracy and speed requirements of modern detailed operation and maintenance. In this embodiment, the TSLD mobile laser scanning system of Shanghai Bofa Space Information Technology Co., Ltd. is used to capture high-quality 3D point cloud data through a 2D cross-section scanner installed on a track inspection trolley. The TSLD system integrates a laser profiler and a color line array camera to obtain point clouds and high-definition images. The specific configuration is as follows. Laser profiler: equipped with a Z+F PROFILER 9012 scanner, the measuring point speed can reach up to 1,016,000 points / second, the maximum speed is 200 rpm, and the scanning field angle is 360°. The system has a diameter deformation measurement accuracy of ±2mm and a limit measurement accuracy of ±5mm. Camera module: 9 groups of 8K color line array cameras are used, and multiple groups of 8K line array cameras are spliced ​​to capture images, with a maximum resolution of 0.2mm@5.5m inner diameter. The module has a maximum operating speed of 10km / h, which effectively solves the problems of insufficient imaging resolution and difficulty in splicing of vault cracks. Through the above configuration, the TSLD system significantly improves the accuracy and efficiency of tunnel detection and meets the stringent requirements of modern tunnel operation and maintenance. By splicing the acquired images with TSLD software, the image resolution of the tunnel inner wall can be increased to 0.22 mm / pixel. This technology effectively solves the problem of insufficient imaging resolution of laser scanning at high speeds, allowing the system to accurately identify tiny cracks of 0.2 to 0.5 mm on the inner wall of the tunnel.

[0066] To construct a high-quality tunnel water seepage dataset, a TSLD mobile laser scanning system was used in this example to perform a high-precision scan of a 5-kilometer tunnel section. This advanced system is capable of capturing laser scan images with a resolution of up to 50,000 × 40,000 pixels. These high-resolution images were then segmented into 512 × 512 pixel sub-images, and the sub-images containing water seepage areas were carefully screened.

[0067] Step S2: Filter the target image in the sub-image set, perform pixel-level annotation on the water seepage area in the target image to obtain semantic mask information, and pair the target image and the semantic mask information corresponding to the target image and add them to the tunnel water seepage image dataset; the target image is a sub-image containing the water seepage area; the semantic mask information includes: the position and shape of the water seepage area;

[0068] In step S2, pixel-level annotation of the water seepage area in the target image is performed to obtain semantic mask information, and pairing the target image with the semantic mask information corresponding to the target image and adding it to the tunnel water seepage image dataset comprises the following steps:

[0069] Step S21: using LabelMe annotation software to perform pixel-level annotation on the water seepage area in the target image to obtain semantic mask information; the background area of ​​the semantic mask information is marked with a pixel value of 0; the water seepage area of ​​the semantic mask information is marked with a pixel value of 1;

[0070] Step S22: Pairing the target image and the semantic mask information corresponding to the target image to form a target image mask information pair; adding the target image mask information pair to the tunnel water seepage image dataset;

[0071] Step S23: Divide the target image mask information pairs in the tunnel water seepage image dataset into a training set and a test set according to a ratio of 8:2.

[0072] In this embodiment, step S2 implements pixel-level annotation and semantic mask generation, and the specific process is as follows:

[0073] like Figure 3 As shown in the figure, (A) is the original image of tunnel water seepage; (B) is the standard image; using the open source annotation tool LabelMe, each sub-image containing water seepage area is annotated at the pixel level, where the background and water seepage area are marked with pixel values ​​0 and 1 respectively. Through this sophisticated method, a high-quality tunnel water seepage image dataset was successfully constructed, laying a solid foundation for the subsequent tunnel water seepage image synthesis and the training of water seepage area segmentation models.

[0074] In this embodiment, a target image and semantic mask information corresponding to the target image are paired to form a target image mask information pair; the target image mask information pair is added to a tunnel water seepage image dataset; and the target image mask information pairs in the tunnel water seepage image dataset are divided into a training set and a test set according to a ratio of 8:2.

[0075] Step S3: Based on the tunnel water seepage image dataset, a denoising diffusion probability model guided by semantic mask information is trained, and a synthetic water seepage image dataset is generated using the trained denoising diffusion probability model;

[0076] In this embodiment, compared with general large-scale computer vision datasets such as ImageNet and COCO, the tunnel water seepage dataset collected in this embodiment has significant differences in several aspects. First, due to the fluid characteristics of groundwater, the leakage area on the tunnel lining surface is usually larger and darker than the dry surface, which makes the leakage area in the image more obvious than the background content (such as cables and signs). Secondly, the dataset in this embodiment focuses on a single category-water seepage, which is not common in existing datasets, making it difficult for existing datasets to be directly applied to the water seepage area segmentation task in tunnel scenarios. In order to enhance the practicality and diversity of the dataset, a generative model strategy is introduced in this embodiment. First, the model is allowed to learn the existing water seepage data features, and then a large number of water seepage images are generated using a diffusion probability model to expand the target dataset. This method not only significantly improves the diversity and richness of the data, provides sufficient data support for the training of the water seepage segmentation model, but also enhances the performance and generalization ability of the model in the tunnel water seepage detection task. By generating a large amount of high-quality and diverse water seepage data, it can effectively reduce the dependence on manually labeled samples, reduce costs and time consumption, and thus achieve more accurate and efficient tunnel water seepage detection and analysis.

[0077] The training of the denoising diffusion probability model guided by semantic mask information in S3 includes the following steps:

[0078] Step S31: Use the real water seepage image to simulate the forward diffusion process, add noise to the target image, and obtain the probability distribution x of the completely noisy sample t for:

[0079]

[0080] In the formula, x t represents the probability distribution of completely noisy samples, x 0 represents the original tunnel water seepage image;

[0081] α t is a noise attenuation coefficient defined in the range [0,1], which is used to control the degree of noise attenuation in each step; is random noise sampled from a standard normal distribution;

[0082] Step S32: De-noising the probability distribution x of the completely noised sample t Step by step, restore to the original data sample x 0 , complete the reverse denoising process; the denoising process uses the U-Net architecture to predict the noise ∈ θ, using semantic mask information to provide the encoder of the U-Net architecture with the location and shape of the water seepage area, and using semantic mask information to provide semantic guidance for the generated image;

[0083] The U-Net architecture is used to predict the noise ∈ θ for:

[0084] ∈ θ (x t ,t,c 0 )=D θ (E θ (x t ),c 0 )

[0085] In the formula, ∈ θ is the noise to be estimated, θ is the parameter of the prediction noise model U-Net, E θ is the encoder, D θ is the decoder; c 0 is the semantic mask information;

[0086] Step S33: The optimization goal of the denoising diffusion model is to improve the accuracy of the predicted noise by minimizing the loss function; the optimization goal of the denoising diffusion model is:

[0087]

[0088] Where L condition represents the loss function value, ||·‖ 2 represents the L2 norm, E is the expectation operator, ∈ θ represents the noise estimated by the neural network, θ is the neural network parameter, c 0 is the semantic mask information.

[0089] In this embodiment, step S3 implements water seepage image synthesis based on a denoising diffusion probability model, and the specific process is as follows:

[0090] The denoising diffusion probabilistic model (DDPM) is selected as the core mechanism for generating water seepage images. It simulates the diffusion process of data and generates high-quality water seepage image samples. Compared with conventional generative models, DDPM has significant advantages in fitting data distribution and generating high-quality data, which makes the diffusion model an ideal choice for solving the data scarcity problem in tunnel water seepage image segmentation.

[0091] like Figure 4As shown in FIG. 1 , the basic process of the denoising diffusion probability model includes two stages: forward diffusion process and reverse denoising process.

[0092] (1) Forward Diffusion Process

[0093] In the forward diffusion process, the original data samples Step by step, noise is added to generate a series of noise samples x 1 ,x 2 ,x 3 ···x T , and finally obtain the completely noisy probability distribution x T , where x T Approximate standard normal distribution, that is This process can be expressed as:

[0094]

[0095] Where, {t∈(1,T),T∈N}, x t ,x t-1 Respectively represent the probability distribution of the sample at the next moment and the data sample at the previous moment, α t It is a noise attenuation coefficient defined in the range of [0,1], which is used to control the degree of noise attenuation in each step. It gradually decreases with the increase of time step t, reflecting that the diffusion speed is gradually accelerating. is random noise sampled from a standard normal distribution, ε t At every moment t is different.

[0096] (2) Forward Diffusion Process

[0097] The goal of the inverse denoising process is to transform the fully noisy sample x T At the beginning, through a series of denoising steps, the original data sample x is gradually restored 0 , the reverse process is also modeled as a Markov chain, and the sample at the previous moment can be represented by the sample at the next moment, such as Figure 4 shown.

[0098] In the field of tunnel water seepage image generation, although the denoising diffusion probability model (DDPM) has shown excellent performance in image generation, due to the lack of any external conditions to guide, the generated images usually cannot effectively reflect specific semantic information (such as tunnel water seepage areas). This unguided generation process ignores the consistent relationship between the water seepage area and the semantic mask. In order to solve this problem, this embodiment proposes to use the semantic mask as a condition to guide the generation process of the diffusion model, such as Figure 5 as shown in .

[0099] The purpose of the generation process is to generate tunnel water seepage images that are consistent with a given mask, so as to expand the data set and improve the segmentation ability of the segmentation model for water seepage areas. The mask information is directly integrated into the learning process of the diffusion model. The mask details the position and shape of the water seepage area, providing the necessary structural information and semantic guidance for the generation of synthetic images. Through this conditional guidance method, not only can realistic tunnel images be generated, but the position and shape of the water seepage area in the generated tunnel images are highly consistent with the actual situation, thereby effectively expanding and enriching the data set. This improvement not only makes up for the shortcomings of the diffusion model in generating semantically consistent images, but also provides more accurate and high-quality training data for subsequent image segmentation tasks, significantly improving the performance and robustness of the model.

[0100] In this embodiment, in the reverse process, a conditional U-Net architecture is used, in which the mask is integrated into the model as a conditional input to guide the generation of the image. By continuously adding noise to form x t Then x t is input into the encoder E of U-Net, and its corresponding mask annotation Then it is injected into the decoder D. The output of the U-Net model is expressed as:

[0101] ∈ θ (x t ,t,c 0 )=D θ (E θ (x t ),c 0 )

[0102] where ∈ θ is the noise that needs to be estimated, and θ is the parameter of the model, so the goal of the model optimization is:

[0103]

[0104] In the formula ||·|| 2 represents the L2 norm, E is the expectation operator, ∈ θRepresents the noise estimated by the neural network, and θ is the neural network parameter. By minimizing this loss function, the U-Net neural network can accurately predict the noise.

[0105] The synthetic images generated by the above method are not only highly similar to the real images visually, but also retain key semantic information. These synthetic images can be used to expand the training dataset, thereby improving the performance of the semantic segmentation model in the tunnel water seepage image segmentation task.

[0106] Step S4: jointly train a tunnel water seepage segmentation model based on the tunnel water seepage image dataset and the synthetic water seepage image dataset, and use the trained tunnel water seepage segmentation model to verify the image quality of the water seepage image dataset.

[0107] In this embodiment, the step S4 combines real and synthetic water seepage images to expand the training data set and implements the screening of the tunnel water seepage synthetic data set.

[0108] In this embodiment, in order to solve the problem of low quality of synthetic images in the prior art, the synthetic images may contain areas that do not completely match the actual water seepage scene, and these areas may appear visually as noise or inaccurate details. If these synthetic samples are directly used for model training without screening, it is likely to cause a serious decline in model performance. Especially when the number of synthetic images is large, these inaccurate areas may weaken the potential contribution of the synthetic images to improving model performance. In order to solve this problem, in this embodiment, an efficient filtering mechanism is disclosed to improve the practicality of the synthetic images and the efficiency of the process.

[0109] The S4 includes jointly training the tunnel water seepage segmentation model based on the tunnel water seepage image dataset and the synthetic water seepage image dataset:

[0110] Step S41: The real tunnel water seepage images in the tunnel water seepage image dataset and the synthetic water seepage images in the synthetic water seepage image dataset are combined in a ratio of 1:2 to form a tunnel water seepage training set D combined ;

[0111] D combined =D real ∪D synthetic

[0112] D real is the original real image dataset, D synthetic It is a synthetic image dataset using diffusion model;

[0113] Step S42: Using the tunnel seepage training set D combined Training tunnel water seepage segmentation model;

[0114]

[0115] Among them, L is the value of the total segmentation loss of the model, N is the number of samples in the training set, and L seg is the segmentation loss function, P i is the model’s prediction for the i-th sample, G i is the corresponding true segmentation mask.

[0116] In this embodiment, the construction of the training data set is completed in step S4. After the synthetic image generation stage is completed, the generated synthetic image data is integrated to enhance the performance of the tunnel water seepage image segmentation model. The introduction of synthetic images is intended to simulate the diversity of the real world while alleviating the scarcity of labeled data.

[0117] The core idea of ​​the joint training strategy is to combine synthetic images with real images to improve the model's generalization ability for unknown data. The following are the specific implementation steps of this strategy:

[0118] (1) Data augmentation: Given that the number of synthetic images usually far exceeds that of real images, we first oversample the real images to match the number of synthetic images. The oversampled real images are mixed with the synthetic images to construct a unified training set D combined . It can be expressed by the following formula:

[0119] D combined =D real ∪D synthetic

[0120] Among them, D real is the original real image dataset, D synthetic It is a synthetic image dataset using a diffusion model. In order to control the balance between the number of real and synthetic images in the dataset, a balance coefficient α is set to ensure that the model can be exposed to diverse samples during training. The formula is as follows:

[0121] D combined =αD real +(1-α)D synthetic

[0122] where α controls the proportion of synthetic images in the mixed dataset.

[0123] (2) Segmentation model training: The segmentation model is trained using this comprehensive dataset. The features learned by the model include not only generalized information from synthetic images, but also details and accuracy from real images. The loss function of the model can be expressed as:

[0124]

[0125] Among them, L is the value of the total segmentation loss of the model, N is the number of samples in the training set, and L seg is the segmentation loss function, P i is the model’s prediction for the i-th sample, G i is the corresponding true segmentation mask.

[0126] In this embodiment, after the diffusion model is trained, the fully trained diffusion model can be used to generate new samples. This process first involves sampling random variables from a standard normal distribution and inputting them into the trained diffusion model. When mask information is introduced, the mask information serves as a guide to enhance the generation capability of the model by providing clear structural information, so that it can more accurately simulate actual water seepage scenarios and annotation relationships. This enables the generated tunnel water seepage images to cover a wider range of application scenarios.

[0127] In this embodiment, a method based on a diffusion model is proposed to synthesize a large number of high-quality and annotated water seepage data sets, and use these high-quality data to improve the performance of the segmentation model. The embodiment of the present invention uses the synthetic image data generated by the diffusion model and the real data to jointly train the segmentation model. Figure 2 shown.

[0128] The S4 uses the trained tunnel water seepage segmentation model to verify the image quality of the water seepage image dataset, including:

[0129] Based on semantic mask information c 0 and random noise ε t , using the trained denoising diffusion probability model to generate a synthetic water seepage image under the guidance of semantic mask information;

[0130] Using the trained tunnel water seepage segmentation model to obtain a water seepage area prediction result;

[0131] The quality of the synthesized image is quantified by calculating the intersection-over-union ratio between the water seepage area prediction result and the true semantic mask. When the intersection-over-union ratio is greater than a preset threshold, the synthesized water seepage image is determined to be a high-quality synthesized water seepage image.

[0132] In order to solve the problem of how to determine whether the synthetic water seepage image is of high quality, in this embodiment, real sample data is first used to train a high-precision semantic segmentation model, which can accurately identify and segment different areas in the image, providing us with a powerful tool to evaluate the quality of the synthetic image. Then, the trained segmentation model is applied to the synthetic image to predict and generate the segmentation result. The quality of the synthetic image is quantified by calculating the intersection over union (IOU) between the predicted result and the true semantic mask. A threshold is set. When the IOU of the synthetic image is lower than this threshold, it indicates that the image does not match the true mask well enough and is removed from the training set. Figure 6 As shown. The synthetic images screened by this method significantly improve the test performance of the trained model on real images, ensuring the quality and efficiency of model training. Those skilled in the art should know that the threshold is set according to the specific production environment requirements, and the threshold is not specifically limited in this embodiment.

[0133] In order to verify the effectiveness of the tunnel water seepage data set generation method based on the denoising diffusion probability model disclosed in the present invention, the following experiment is carried out for verification.

[0134] (1) Comparison of evaluation of tunnel water seepage image synthesis quality and diversity

[0135] The method of the present invention is comprehensively evaluated on a tunnel water seepage dataset collected and produced by a TSDL device and a public tunnel water seepage dataset. In this embodiment, the generated images are strictly evaluated in terms of quality and diversity, using the indicators Fréchet Inception Distance (FID) for measuring image generation quality, Inception Score (IS) and LPIPS for measuring image generation diversity. We selected representative methods in the field of image generation, such as the Pixel2Pixel and SPADE image generation methods based on generative adversarial networks (GANs), for comparison. The experimental results are shown in Table 1 below:

[0136] Table 1 Comparison results of different methods on image generation quality and image diversity

[0137]

[0138] According to the evaluation of the FID indicator, a score of 0.5486 was obtained in this embodiment, which is significantly lower than the scores of 1.310 and 1.0655 of the Pixel2Pixel and SPADE methods. A smaller FID value means that the generated image data is closer to the real sample data in the feature space, so the quality and fidelity of the generated image are higher. In terms of the IS indicator, the method of the present invention obtained a high score of 2.3724, indicating that the generated images have better diversity. In comparison, the IS value of Pixel2Pixel is 1.7546 and the IS value of SPADE is 2.0246. Although they also perform well, they are not as good as the method of the present invention. In addition, in terms of the LPIPS indicator, in this embodiment, a high score of 0.6587 was obtained, which is 0.0382 and 0.084 higher than the Pixel2Pixel and SPADE methods, respectively. This further shows that the images we generate are superior to other mainstream methods in the prior art in terms of quality and diversity.

[0139] In summary, the proposed method was comprehensively evaluated on the tunnel water seepage dataset collected and produced by TSDL equipment, and compared with mainstream methods through multiple indicators. The evaluation results show that the proposed method performs well in image generation quality and diversity, and is superior to the Pixel2Pixel and SPADE methods.

[0140] (2) Improvement of tunnel water seepage synthetic images on segmentation tasks

[0141] The present invention further uses the generated labeled water seepage data and real sample data to jointly train multiple image segmentation models, including UNet, DeepLab and Mask2Former. In the evaluation of the segmentation performance of these models, the intersection over union (IoU) indicator is used. The experimental results show that compared with the method that only uses real tunnel water seepage images, the segmentation models trained with the tunnel water seepage images generated by the present invention have improved in the IoU indicator. This shows that the synthetic water seepage images not only improve the segmentation performance of the model, but also enhance the generalization ability of the model in processing different scenarios and conditions. The experimental results are shown in Table 2:

[0142] Table 2 Comparison results with other models

[0143]

[0144] According to the experimental results, the MIoU score of the UNet model when using only real samples is 90.21%, and the score is improved to 91.16% when using both real and synthetic samples. The MIoU score of the Deeplabv3 model when using only real samples is 91.99%, and the score is improved to 92.43% when using both real and synthetic samples. The MIoU score of the Mask2former model when using only real samples is 92.44%, and the score is improved to 93.21% when using both real and synthetic samples.

[0145] In summary, the present invention significantly reduces the reliance on manual annotation and reduces costs and time consumption by synthesizing high-quality and diverse tunnel seepage data. At the same time, by improving the performance of the segmentation model, the safety monitoring and management level of the tunnel structure is effectively improved, providing strong technical support for the detection and analysis of seepage problems in the field of tunnel engineering.

Claims

1. A method for generating a tunnel water seepage data set based on a denoising diffusion probability model, characterized in that: The steps include: Step S1: collecting a tunnel surface image, dividing the tunnel surface image into a plurality of sub-images, and obtaining a sub-image set; Step S2: Filter the target image in the sub-image set, perform pixel-level annotation on the water seepage area in the target image to obtain semantic mask information, and pair the target image and the semantic mask information corresponding to the target image and add them to the tunnel water seepage image dataset; The target image is a sub-image containing a water seepage area; The semantic mask information includes: the location and shape of the water seepage area; Step S3: Based on the tunnel water seepage image dataset, a denoising diffusion probability model guided by semantic mask information is trained, and a synthetic water seepage image dataset is generated using the trained denoising diffusion probability model; Step S4: jointly train a tunnel water seepage segmentation model based on the tunnel water seepage image dataset and the synthetic water seepage image dataset, and use the trained tunnel water seepage segmentation model to verify the image quality of the water seepage image dataset.

2. The method for generating a tunnel water seepage data set based on a denoising diffusion probability model according to claim 1, characterized in that: The step S1 comprises the following steps: Step S11: Scan the tunnel using a tunnel laser scanning device to obtain and export a tunnel surface image; Step S12: The exported tunnel surface image is cropped and segmented according to 512*512 pixels to obtain a sub-image set.

3. The method for generating a tunnel water seepage data set based on a denoising diffusion probability model according to claim 1, characterized in that: In step S2, pixel-level annotation of the water seepage area in the target image is performed to obtain semantic mask information, and pairing the target image with the semantic mask information corresponding to the target image and adding it to the tunnel water seepage image dataset comprises the following steps: Step S21: using LabelMe annotation software to perform pixel-level annotation on the water seepage area in the target image to obtain semantic mask information; the background area of ​​the semantic mask information is marked with a pixel value of 0; the water seepage area of ​​the semantic mask information is marked with a pixel value of 1; Step S22: Pairing the target image and the semantic mask information corresponding to the target image to form a target image mask information pair; Add the target image mask information pair to the tunnel water seepage image dataset; Step S23: Divide the target image mask information pairs in the tunnel water seepage image dataset into a training set and a test set according to a ratio of 8:

2.

4. The method for generating a tunnel water seepage data set based on a denoising diffusion probability model according to claim 1, characterized in that: The training of the denoising diffusion probability model guided by semantic mask information in S3 includes the following steps: Step S31: Use the real water seepage image to simulate the forward diffusion process, add noise to the target image, and obtain the probability distribution x of the completely noisy sample t for: In the formula, x t represents the probability distribution of the completely noisy samples, and x0 represents the original tunnel water seepage image; α t is a noise attenuation coefficient defined in the range [0,1], which is used to control the degree of noise attenuation in each step; is random noise sampled from a standard normal distribution; Step S32: De-noising the probability distribution x of the completely noised sample t Step by step, the original data sample x0 is restored to complete the reverse denoising process; the denoising process uses the U-Net architecture to predict the noise ∈ θ , using semantic mask information to provide the encoder of the U-Net architecture with the location and shape of the water seepage area, and using semantic mask information to provide semantic guidance for the generated image; The U-Net architecture is used to predict the noise ∈ θ for: ∈ θ (x t ,t,c0)=D θ (E θ (x t ),c0) In the formula, ∈ θ is the noise to be estimated, θ is the parameter of the prediction noise model U-Net, E θ is the encoder, D θ is the decoder; c0 is the semantic mask information; Step S33: The optimization goal of the denoising diffusion model is to improve the accuracy of the predicted noise by minimizing the loss function; the optimization goal of the denoising diffusion model is: Where L condition represents the loss function value, ||·|| 2 represents the L2 norm, E is the expectation operator, ∈ θ represents the noise estimated by the neural network, θ is the neural network parameter, and c0 is the semantic mask information.

5. The method for generating a tunnel water seepage data set based on a denoising diffusion probability model according to claim 1, characterized in that: The S4 includes jointly training the tunnel water seepage segmentation model based on the tunnel water seepage image dataset and the synthetic water seepage image dataset: Step S41: The real tunnel water seepage images in the tunnel water seepage image dataset and the synthetic water seepage images in the synthetic water seepage image dataset are combined in a ratio of 1:2 to form a tunnel water seepage training set D combined ; D combined =D real ∪D synthetic D real is the original real image dataset, D synthetic It is a synthetic image dataset using diffusion model; Step S42: Using the tunnel seepage training set D combined Training tunnel water seepage segmentation model; Among them, L is the value of the total segmentation loss of the model, N is the number of samples in the training set, and L seg is the segmentation loss function, P i is the model’s prediction for the i-th sample, G i is the corresponding true segmentation mask.

6. The method for generating a tunnel water seepage data set based on a denoising diffusion probability model according to claim 1, characterized in that: The S4 uses the trained tunnel water seepage segmentation model to verify the image quality of the water seepage image dataset, including: Based on semantic mask information c0 and random noise ε t , using the trained denoising diffusion probability model to generate a synthetic water seepage image under the guidance of semantic mask information; Using the trained tunnel water seepage segmentation model to obtain a water seepage area prediction result; The quality of the synthesized image is quantified by calculating the intersection-over-union ratio between the water seepage area prediction result and the true semantic mask. When the intersection-over-union ratio is greater than a preset threshold, the synthesized water seepage image is determined to be a high-quality synthesized water seepage image.

Citation Information

Cited By

  • Simulation generation method, device and system of palm feature data and storage medium

    CN120496127A

  • Multi-feature fusion driven high-quality drainage pipeline defect sample automatic labeling method, system and equipment and medium

    CN120526252A

  • A multi-feature fusion driven high-quality sewer defect sample automatic labeling method, system, device and medium

    CN120526252B