Pavement disease image generation and recognition method based on residual depth generative adversarial network
By constructing a residual deep generative adversarial network ResWPGANet and a Poisson fusion algorithm, pothole and road defect images that blend naturally with the real road surface background are generated, solving the problem of insufficient generation and detection accuracy in existing technologies and achieving efficient road defect detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies struggle to efficiently generate pothole and damage images that blend naturally with the real road surface background, and their detection accuracy is insufficient in complex backgrounds, especially for small-scale damage, where the detection performance drops significantly.
A residual deep generative adversarial network, ResWPGANet, is constructed. The Poisson fusion algorithm is used to seamlessly embed the generated pothole and defect images into the road background image. The generator adopts a multi-level residual upsampling structure, and the discriminator adopts a multi-level residual downsampling structure. The training stability is improved by combining Wasserstein distance and gradient penalty terms.
It significantly improves the detection accuracy of potholes and other defects, with an overall average detection accuracy increase of approximately 1.42%. It maintains high detection confidence in complex backgrounds and lighting conditions, and enhances the detection capability of small-scale targets.
Smart Images

Figure CN122024040A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and specifically to a method for generating and recognizing road surface defects based on residual deep generative adversarial networks. Background Technology
[0002] As the scale of highway mileage continues to expand, the focus of highway construction is gradually shifting from "construction" to "maintenance and operation," making the demand for road safety and intelligent maintenance increasingly prominent. In actual operation, under the combined effects of traffic loads, climate, and water damage, roads are prone to longitudinal cracks, transverse cracks, alligator cracks, and potholes. If these defects are not identified in a timely and accurate manner, they will shorten the road surface life and threaten driving safety.
[0003] Traditional road defect detection relies primarily on manual inspections, which suffers from high labor intensity, low efficiency, strong subjectivity, and safety hazards, making it unsuitable for the inspection needs of large-scale highway networks. While automated detection methods based on traditional image processing can improve automation to some extent, they are susceptible to changes in lighting, shadows, and road surface texture interference, and have limited ability to distinguish defect boundaries in complex backgrounds.
[0004] With the development of deep learning, convolutional neural networks have been widely used in road surface defect detection tasks. Two-stage detection methods, such as the R-CNN series, have high detection accuracy but slow inference speed; single-stage methods, such as YOLO and SSD, have higher detection efficiency and are more suitable for real-time detection scenarios. However, deep learning methods generally rely on large-scale, high-quality, class-balanced labeled datasets. When defect samples are scarce and the classes are severely imbalanced, the models are prone to overfitting, and the detection performance for low-frequency defects, especially potholes, drops significantly.
[0005] In publicly available road damage datasets, longitudinal cracks, transverse cracks, and alligator cracks are abundant, while potholes have a low probability of natural formation and are often quickly repaired once they appear. This results in a limited number of pothole samples, which are significantly affected by shooting angle, lighting conditions, and road grade, exhibiting obvious class imbalance and scene differences. Traditional data augmentation methods such as geometric transformations and lighting perturbations are essentially low-order transformations of the original image, making it difficult to introduce new structural damage information. The generated data has limited diversity in texture and morphology, failing to cover the complex changes in the appearance of damage in real road environments, and thus offering limited improvement.
[0006] Deep generative models, such as Generative Adversarial Networks (GANs), offer a novel approach to alleviating data scarcity. By learning the latent distribution of real road surface defects, they can automatically synthesize textured and morphologically diverse defect images. However, in road surface defect scenarios, traditional GANs and their improved models still suffer from problems such as training instability, mode collapse, texture distortion, edge artifacts, and unnatural integration with the background. The synthesized images differ from real road surface scenes in terms of lighting and texture continuity, thus limiting their widespread application in engineering. Therefore, there is an urgent need for a technical solution that can generate high-quality pothole defect images, integrate them naturally with real road surface backgrounds, and significantly improve the accuracy and robustness of road pothole detection. Summary of the Invention
[0007] To address the problems existing in the prior art, this invention provides a method for generating and recognizing pavement distress images based on residual deep generative adversarial networks, which effectively improves the detection accuracy of different types of pavement distress and small-scale distress.
[0008] Firstly, a method for generating pavement distress images based on residual deep generative adversarial networks is provided, comprising the following steps: A residual deep generative adversarial network ResWPGANet was constructed, and pothole images from the original road surface distress images were used as training data to train ResWPGANet. Based on the trained ResWPGANet, the noise vector is used as input to output the generated image of road surface potholes; Using a road background image as the target background image and a road surface pothole defect image as the source image, the Poisson fusion algorithm is used to seamlessly embed the road surface pothole defect image into the target background image, resulting in a composite image of road surface pothole defects with consistent lighting and realistic texture that matches the road background image. The ResWPGANet includes a generator and a discriminator. The generator comprises, in sequence, a fully connected layer, multiple cascaded residual upsampling modules (ReBlockG), a standard convolutional layer, and a Tanh activation function layer. The fully connected layer maps and reshapes the input noise into an initial feature map. The multiple cascaded residual upsampling modules (ReBlockG) progressively increase the resolution of the initial feature map. Each ReBlockG module enlarges the feature map input to its module to... Multiplied resolution, n cascaded ReBlockGs will enlarge the feature map input to the first ReBlockG to The output is after being multiplied by a resolution of 10 times; the discriminator includes multiple cascaded residual downsampling modules ReBlockD and fully connected layers; each residual downsampling module ReBlockD reduces the feature map input to its module to 10 times the resolution of the discriminator. Multiplied resolution, n cascaded ReBlockGs reduce the feature map input to the first ReBlockD to [the size of the first ReBlockD]. Output at a resolution of times.
[0009] Secondly, a method for identifying road surface defects is provided, including: Obtain the original road surface distress image, and use the generation method described in the first aspect to obtain a composite image of road surface potholes and distress with consistent lighting and realistic texture that matches the road background image; Based on the combination of synthetic images of road surface potholes and original images of road surface defects, a road surface defect detection enhancement dataset containing expanded pothole samples is constructed. A road surface defect identification and detection network was trained based on the aforementioned road surface defect detection enhancement dataset. For the road image to be detected and identified, it is input into the trained road surface defect detection network to obtain the road surface defect identification result. The road surface defect identification result includes the road surface defect type and location. The road surface defect type includes: longitudinal cracks, transverse cracks, alligator cracks and potholes.
[0010] Thirdly, a pavement distress image generation device based on residual deep generative adversarial networks is provided, comprising: Generate model building units to construct residual deep generative adversarial network ResWPGANet, and use pothole images from the original road surface distress images as training data to train ResWPGANet; The generation unit is used to generate images of road surface potholes based on the trained ResWPGANet, taking noise vectors as input and outputting them. The image synthesis unit is used to use a road background image as the target background image and a road surface pothole defect generated image as the source image. The Poisson fusion algorithm is used to seamlessly embed the road surface pothole defect generated image into the target background image to obtain a road surface pothole defect synthesized image with consistent lighting and realistic texture with the road background image. The ResWPGANet includes a generator and a discriminator. The generator comprises, in sequence, a fully connected layer, multiple cascaded residual upsampling modules (ReBlockG), a standard convolutional layer, and a Tanh activation function layer. The fully connected layer maps and reshapes the input noise into an initial feature map. The multiple cascaded residual upsampling modules (ReBlockG) progressively increase the resolution of the initial feature map. Each ReBlockG module enlarges the feature map input to its module to... Multiplied resolution, n cascaded ReBlockGs will enlarge the feature map input to the first ReBlockG to The output is after being multiplied by a resolution of 10 times; the discriminator includes multiple cascaded residual downsampling modules ReBlockD and fully connected layers; each residual downsampling module ReBlockD reduces the feature map input to its module to 10 times the resolution of the discriminator. Multiplied resolution, n cascaded ReBlockGs reduce the feature map input to the first ReBlockD. Output at a resolution of times.
[0011] Fourthly, an electronic device is provided, the electronic device comprising: processor; Memory used to store processor-executable instructions; The processor executes the executable instructions to implement the method as described in the first aspect or the method as described in the second aspect.
[0012] Fifthly, a computer-readable storage medium is provided that stores computer instructions thereon, which, when executed by a processor, implement the method as described in the first aspect or the steps of the method as described in the second aspect.
[0013] The method for generating and recognizing pavement distress images based on residual deep generative adversarial networks of the present invention has the following beneficial effects: (1) By constructing a residual deep generative adversarial network ResWPGANet, the problem of scarce pothole samples and class imbalance is alleviated, which effectively alleviates the low frequency characteristics and class imbalance of pothole categories in the actual road disease dataset; (2) By using the Poisson fusion algorithm, the generated image has high quality and blends naturally with the real scene, making the generated pothole area and the real road surface more natural in terms of boundary transition, gray scale change and texture details, overcoming the problems of uneven exposure and edge breakage caused by traditional splicing and single Poisson fusion. (3) With the introduction of augmented data, the disease detection model trained on the augmented dataset significantly improves the detection performance of potholes and small targets. The overall average detection accuracy is improved by about 1.42%, and it can still maintain a high detection confidence in complex backgrounds and lighting change scenarios, and the detection capability of small-scale potholes is significantly enhanced. Attached Figure Description
[0014] Figure 1 This is a flowchart illustrating the method for generating pavement defects in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of the Residual Deep Generative Adversarial Network (ResWPGANet) in the embodiments of this application; Figure 3 This is a schematic diagram of the residual upsampling module ReBlockG in the generator in the embodiments of this application; Figure 4 This is a schematic diagram of the residual downsampling module ReBlockD in the discriminator in the embodiments of this application; Figure 5 These are various road surface images from the original dataset used in the experimental process of this application's embodiments; Figure 6 This is a schematic diagram illustrating the generation of pavement distress images using different models before adding residual structures. Figure 7 These are schematic diagrams illustrating the generation of pavement distress images after adding residual structures to different models; Figure 8 This is a comparison chart of conventional Poisson fusion and the improved Poisson fusion proposed in this application; Figure 9 These are the detection results from different pavement defect identification and detection models. Detailed Implementation
[0015] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0016] See Figure 1 and Figure 2 This application provides a method for generating pavement distress images based on residual deep generative adversarial networks, including the following steps: Step 1: Construct a residual deep generative adversarial network ResWPGANet, and train ResWPGANet using pothole images from the original road surface distress images as training data; the road surface distress includes longitudinal cracks, transverse cracks, alligator cracks, and potholes. Step 2: Based on the trained ResWPGANet, take the noise vector as input and output the generated image of road surface potholes; Step 3: Using the road background image as the target background image and the road surface pothole damage generated image as the source image, the Poisson fusion algorithm is used to seamlessly embed the road surface pothole damage generated image into the target background image, resulting in a road surface pothole damage composite image with consistent lighting and realistic texture. The residual deep generative adversarial network ResWPGANet constructed in step 1 includes a generator and a discriminator: The generator sequentially includes a fully connected layer, multiple cascaded residual upsampling modules (ReBlockG), a standard convolutional layer, and a Tanh activation function layer. The fully connected layer maps and reshapes the input noise into an initial feature map. The multiple cascaded residual upsampling modules (ReBlockG) progressively increase the resolution of the initial feature map, with each ReBlockG module enlarging the feature map input to its module to... Multiplied resolution, n cascaded ReBlockGs will enlarge the feature map input to the first ReBlockG to Output at a resolution of [times] times; The discriminator comprises multiple cascaded residual downsampling modules ReBlockD and fully connected layers; each ReBlockD module reduces the feature map input to its module to 1 / The resolution is multiplied by n, and the cascaded ReBlockG reduces the feature map input to the first ReBlockD to 1 / Output at a resolution of times.
[0017] In this embodiment, a residual deep generative adversarial network ResWPGANet is constructed under the improved WGAN-GP framework. The generator adopts a multi-level residual upsampling structure to recover the road pothole disease image to a preset resolution step by step from the low-dimensional latent noise vector. The discriminator adopts a multi-level residual downsampling structure to distinguish between the real road pothole disease image and the generated road pothole disease image. By iteratively training ResWPGANet, the generator generates a road pothole disease image that is close to the real disease distribution in terms of pothole edge fragmentation structure, multi-scale texture and grayscale changes.
[0018] Traditional WGAN-GP has certain advantages in training stability compared to standard GANs, but its default network structure is mostly designed for low-resolution natural images, and the spatial resolution and detail representation capabilities of the generated images are insufficient to meet the needs of road surface defect detection scenarios. Specifically, in convolutional neural networks, shallow features mainly respond to low-level features such as texture and edges, mid-level features focus on capturing local structural morphology, and deep features encode more abstract semantic information about defects. If the depth and resolution of the generated network are insufficient, it is difficult to simultaneously capture key defect features such as broken structures at pothole edges, multi-scale crack textures, and irregular grayscale and depth variations, thus limiting the gain effect of synthetic samples in downstream detection tasks.
[0019] A straightforward way to improve model performance is to simply stack convolutional and transposed convolutional layers to expand the receptive field and increase network capacity. However, in deep structures, gradients tend to decay or even vanish during backpropagation, leading to training difficulties and degraded network performance. To address this issue, this application introduces the residual learning concept from ResNet, embedding the identity mapping into the generator and discriminator structures of WGAN-GP. This allows gradients to propagate stably along shortcut paths while increasing network depth, effectively mitigating the gradient vanishing problem. Furthermore, the residual structure helps enhance the model's ability to model multi-scale details and complex textures while maintaining relatively controllable parameter counts, making it particularly suitable for objects with diverse deformations and complex textures, such as road potholes. Moreover, to meet the high-resolution detail representation requirements of road pothole detection tasks, this application reconstructs the original WGAN-GP generation path. Through a step-by-step residual upsampling design, each residual upsampling module (ReBlockG) expands the feature map input to that module. The resolution is doubled to achieve a smooth expansion of the feature map. While preserving the rationality of the global structure, it significantly improves the visibility of fine-grained information such as pit edge texture, crack direction, and local grayscale changes, thereby providing more discriminative training samples for subsequent disease detection models. In this embodiment, the generator input receives a noise vector, maps and reshapes the initial feature map through a fully connected layer, then gradually increases the resolution through multiple cascaded residual upsampling modules (ReBlockG), and finally outputs a three-channel image through a 3×3 convolution and Tanh activation layer.
[0020] Specifically, step 1 above includes: Step 11: Construct a residual deep generative adversarial network ResWPGANet under the improved WGAN-GP framework, wherein the generator adopts a multi-level residual upsampling structure and the discriminator adopts a multi-level residual downsampling structure. Step 12: Obtain the original pavement image dataset containing various types of road surface defects. Clean and filter the dataset to retain images of longitudinal cracks, transverse cracks, alligator cracks, and pothole defects. Construct a subset of pothole samples for training the generative adversarial network based on the pothole defect categories. Crop and segment the pothole sample subset to obtain pothole defect image blocks under different road grades, lighting conditions, and shooting times. Divide the image blocks into a generative adversarial network training set. Step 13: Train the ResWPGANet network using the training set data, constructing the loss functions for the generator and discriminator based on Wasserstein distance and gradient penalty terms. The learning rates for the generator and discriminator are 0.002 and 0.001, respectively. The optimizer is Adam, and the gradient penalty weight is set to 10. Through iterative training of ResWPGANet, the generator is able to generate pitted disease images that closely approximate the real disease distribution in terms of pitted edge fragmentation, multi-scale texture, and grayscale variations.
[0021] In one implementation, see Figure 3 The residual upsampling module ReBlockG in the generator includes a parallel first main branch and a first shortcut branch with the same input. The first main branch includes, in sequence: batch normalization (BN), ReLU, 3×3 transposed convolution, batch normalization (BN), ReLU, and 3×3 standard convolution. The first shortcut branch includes, in sequence: batch normalization (BN), ReLU, and 1×1 transposed convolution. The outputs of the first main branch and the first shortcut branch are concatenated and fused to serve as the output of the residual upsampling module ReBlockG.
[0022] In this embodiment, the generator employs a fully connected mapping and multi-scale residual upsampling structure. In each residual upsampling module, ReBlockG, the main branch uses a pre-activation residual structure design: the input features are first processed by batch normalization (BN) and ReLU activation, then sequentially extracted through 3×3 transposed convolutions and 3×3 standard convolutions. The transposed convolution layer handles the upsampling operation, while the standard convolution layer is used for further local texture reconstruction and feature refinement. Simultaneously, a shortcut branch matches the number of channels and spatial resolution of the feature map using a 1×1 transposed convolution. The two outputs are element-wise summed along the channel dimension to obtain the residual output. This structural design not only ensures a smooth and continuous upsampling process, effectively avoiding checkerboard artifacts that may result from simply stacking transposed convolutions, but also preserves global structural information through skip connections, greatly improving the detail quality and training stability of the generated image.
[0023] To improve the stability of deep network training and the consistency of feature representation, the main branch adopts a pre-activation approach. For several convolutional operation units, the input features are normalized and non-linear activation is applied before the convolution operation, making the feature distribution received by the convolutional layer more stable, thereby reducing feature distribution drift during network training and improving gradient propagation conditions during backpropagation.
[0024] By introducing the aforementioned pre-activation method, deep networks can achieve smoother and more stable gradient updates during adversarial training, reducing the probability of gradient vanishing or gradient oscillation during training, thereby improving the convergence stability of the generated results. Furthermore, the pre-activation method makes it easier for the generator to maintain structural continuity when learning fine-grained texture and structural features, reducing edge breaks and local artifacts, and improving the output image's performance in terms of detail clarity and structural integrity. Consequently, the pitted disease images generated by the generator in this application have more continuous edges and clearer disease region morphology.
[0025] It should be noted that in the Residual Upsampling Module ReBlockG of this application, the shortcut branch adopts batch normalization (BN), ReLU, and 1×1 transposed convolution. The shortcut branch preserves the existing image structure (contour, geometric shape), while the residual branch learns high-frequency details (pit texture, edge changes). This enables the generator to learn incremental residual information while preserving the input features, and to supplement the details layer by layer during the generation process. The generator gradually generates disease images with detailed structures from low-dimensional (noise in the text) or coarse features.
[0026] In one implementation, see Figure 4 The residual downsampling module ReBlockD in the discriminator includes a parallel second main branch and a second shortcut branch with the same input. The second main branch includes, in sequence: 3×3 standard convolution, batch normalization (BN), LeakyReLU, 3×3 standard convolution, and batch normalization (BN). The second shortcut branch includes, in sequence: 1×1 standard convolution, batch normalization (BN), and LeakyReLU. The outputs of the second main branch and the second shortcut branch are concatenated and fused, and then activated by LeakyReLU to obtain the output of the residual downsampling module ReBlockD.
[0027] In this embodiment, the discriminator employs a multi-layer residual downsampling structure, aiming to progressively compress the input 128×128×3 image into a low-dimensional feature space and output a scalar to estimate the Wasserstein distance between the real sample distribution and the generated sample distribution. Similar to the generator, the discriminator is internally composed of multiple stacked ReBlockD residual modules, the difference being that each residual block performs a downsampling operation. In ReBlockD, the main branch consists of two 3×3 convolutional layers, with batch normalization and LeakyReLU activation inserted in between, primarily used to extract local texture and structural differences; the shortcut branch uses 1×1 convolution to downsample the input and performs linear transformation and nonlinear mapping on the features through BN and LeakyReLU to match the output dimension of the main branch. The outputs of the main branch and the shortcut branch are element-wise added and then activated by LeakyReLU to obtain the residual block output. This design effectively expands the receptive field of the discriminator and enhances its sensitivity to pit edges and subtle texture changes, thereby significantly improving the discriminator network's ability to distinguish between real disease images and generated images.
[0028] The ResWPGANet model uses Wasserstein distance as the optimization criterion and replaces the weight pruning in the traditional WGAN with a gradient penalty term to improve training stability and avoid excessive concentration of discriminator parameters.
[0029] The discriminator loss function is: in, The loss function for WGAN, This represents the distribution of actual asphalt pavement defects in images. For the prior distribution of the potential space; It is a gradient penalty term. The distribution is obtained by linear interpolation between real samples and generated samples. This represents the gradient penalty coefficient.
[0030] The generator loss function is: By maximizing the discriminator's score on the generated samples, the generated distribution approximates the real data distribution. A gradient penalty term constrains the discriminator to satisfy the 1-Lipschitz condition near the interpolated samples, thus avoiding training instability caused by weight clipping.
[0031] It should be noted that the Residual Downsampling Module ReBlockD in this embodiment includes the following shortcut branches in sequence: 1×1 standard convolution, batch normalization (BN), and LeakyReLU. Through the skip connections of the residual module, local texture information in the lower layers can be effectively transferred to the discriminative features in the higher layers, avoiding the degradation of discriminative features caused by the deepening of the network. This enhances the discriminator's sensitivity to fine-grained texture differences and improves the stability of the discriminative output.
[0032] In one implementation, each residual upsampling module ReBlockG in the Residual Deep Generative Adversarial Network ResWPGANet upsamples the feature map input to its module. The resolution is doubled; each residual downsampling module, ReBlockD, reduces the feature map input to this module. The resolution is increased by a factor of 1; there are 5 residual upsampling modules (ReBlockG) and 5 residual downsampling modules (ReBlockD); that is, the generator enlarges the feature map input to the first ReBlockG to 1 / 2 the original value. Output after multiplying the resolution; the discriminator reduces the feature map of the first ReBlockG input to 1 / Output at a resolution of times.
[0033] In the generator, the fully connected layer maps and reshapes the input noise into an initial feature map of 4×4×512, and the five residual upsampling modules ReBlockG progressively enlarge the resolution of the initial feature map to 128×128. In the discriminator, five residual downsampling modules, ReBlockD, progressively reduce the resolution of the 128×128 feature map to 4×4.
[0034] In this embodiment, the input receives a 100-dimensional latent noise vector, which is mapped and reshaped into an initial feature map of 4×4×512 through a fully connected layer. Subsequently, the resolution is progressively increased from 4×4 to 128×128 through five cascaded residual upsampling modules (ReBlockG). Finally, a three-channel image is output through a single 3×3 convolutional layer and Tanh activation. While existing technologies commonly generate 32×32 resolution images, this application increases the generator output resolution from the common 32×32 to 128×128.
[0035] In one implementation, the steps of the Poisson fusion algorithm in step 3 above include: Step 31, based on the source image Region selection is performed to obtain a mask region, which includes road surface defect areas; based on the target background image... Select the target background area; Step 32, obtain the gradient of the source image. Gradient of the target background image ; Step 33: According to the preset gradient selection strategy, the fusion region formed by the mask region and the target background region is... The target gradient is constructed in the process, and the gradient selection strategy includes any one or a combination of the following: ① selecting the gradient of the source image in the mask region and the gradient of the target background image in the non-mask region; ② comparing the intensity of the gradient of the source image and the gradient of the target background image and selecting the gradient with the larger gradient magnitude as the target gradient; ③ weighting or nonlinearly transforming the gradient of the source image and the gradient of the target background image and using it as the target gradient. Step 34: Calculate the divergence of the target gradient, construct the Poisson equation, solve the Poisson equation, and obtain the fused image; the Poisson equation is: in, To integrate the region Reconstructed images within, These are the image pixel values of the fused region. To integrate the region, To merge the boundaries of the region, The target gradient.
[0036] To construct highly realistic pothole damage images, this application introduces a hybrid gradient image fusion method based on the Poisson equation, which generates initial pothole damage regions using a residual depth network. This method seamlessly embeds the virtually generated damage regions into a damage-free asphalt pavement image. By simultaneously constraining the structural information of the source image and the target background image in the gradient domain, this method ensures that the fused region maintains consistency in texture details, illumination distribution, and boundary transitions, thereby overcoming the edge abruptness problem caused by direct stitching and improving the realism of the damage image.
[0037] Existing Poisson image fusion methods typically employ fixed gradient constraints or single boundary conditions, which can easily lead to structural loss in areas of texture conflict or the introduction of unnecessary texture details in flat regions. Furthermore, some existing methods rely on complex region classification, transparency matting, or mixed boundary conditions, resulting in complex algorithm implementation, high computational cost, and hindering engineering applications. This application provides a Poisson image fusion method based on gradient selection and gradient redistribution. By selecting, weighting, or nonlinearly transforming the gradient information of the source image and the target background image in the gradient domain, and solving the Poisson equation under unified boundary conditions, seamless image fusion, texture smoothing, and lighting style adjustment are achieved.
[0038] Specifically, let the target background image be... The source image is The integration area is Its boundary is , To guide the gradient field in the fusion region; To fuse images in Unknown scalar function of the region For the target background image at the boundary A known scalar function on the region. The goal of Poisson fusion is to achieve fusion in the region. Internal reconstruction image So that its gradient field is similar to the desired gradient field The optimization model, which aims to be as close as possible to the target background image while maintaining consistency with the target background image at the boundaries, can be expressed as: This optimization problem can be transformed into solving the Poisson equation based on boundary constraints: in, For the Laplace operator, For the divergence operator. If the gradient field The divergence is: .
[0039] By solving the above equations, it is possible to find the region The resulting gradient field seamlessly blends with the target background. Potholes and other damaged areas typically contain high-frequency textures and steep boundaries, while the target road surface background is generally smooth. Using only the source gradient might lead to inconsistent lighting; using only the target gradient would weaken the texture of the damaged areas. The gradient field in this application… The gradient selection and gradient redistribution methods are used to determine this.
[0040] In one implementation, step 33 above, which compares the intensity of the gradient of the source image with the gradient of the target background image and selects the gradient with the larger gradient magnitude as the target gradient, includes: ; Gradient magnitude adopted Norm representation: .
[0041] In this embodiment, a more significant gradient source is preferentially selected locally. Details are preserved when the source image has stronger edges and textures, while background gradients are preserved in areas where the target background image structure is more important to maintain road continuity. Substituting the mixed gradient field into the Poisson equation yields disease areas with complete texture and natural lighting, achieving high-quality pothole disease image synthesis.
[0042] Based on the above-described method for generating road surface defect images, this application provides a method for identifying road surface defects, which includes the following steps: Step A1: Obtain the original road surface distress image, and use the road surface distress image generation method based on residual depth generative adversarial network as described above to obtain a composite image of road surface potholes and distress with consistent lighting and realistic texture that matches the road background image. Step A2: Based on the combined synthetic image of road surface potholes and the original road surface defects image, construct a road surface defects detection enhancement dataset containing expanded pothole samples; Step A3: Train a road surface defect detection network based on the road surface defect detection enhancement dataset. The road surface defect detection network can use the yovo model and utilize the Backebone, Neck, and Head network structure to realize defect area detection and identification. Step A4: Input the road image to be detected into the trained road surface defect detection network to obtain the road surface defect identification results. The road surface defect identification results include the road surface defect type and location. The road surface defect types include: longitudinal cracks, transverse cracks, alligator cracks, and potholes.
[0043] This application provides a pavement distress image generation device based on residual deep generative adversarial networks, including: Generate model building units to construct residual deep generative adversarial network ResWPGANet, and use pothole images from the original road surface distress images as training data to train ResWPGANet; The generation unit is used to generate images of road surface potholes based on the trained ResWPGANet, taking noise vectors as input and outputting them. The image synthesis unit is used to use a road background image as the target background image and a road surface pothole defect generated image as the source image. The Poisson fusion algorithm is used to seamlessly embed the road surface pothole defect generated image into the target background image to obtain a road surface pothole defect synthesized image with consistent lighting and realistic texture with the road background image. The ResWPGANet includes a generator and a discriminator. The generator comprises, in sequence, a fully connected layer, multiple cascaded residual upsampling modules (ReBlockG), a standard convolutional layer, and a Tanh activation function layer. The fully connected layer maps and reshapes the input noise into an initial feature map. The multiple cascaded residual upsampling modules (ReBlockG) progressively increase the resolution of the initial feature map. Each ReBlockG module enlarges the feature map input to its module to... Multiplied resolution, n cascaded ReBlockGs will enlarge the feature map input to the first ReBlockG to The output is after a resolution of 1 / 2; the discriminator includes multiple cascaded residual downsampling modules ReBlockD and fully connected layers; each residual downsampling module ReBlockD reduces the feature map input to its module to 1 / 2. The resolution is multiplied by n, and the cascaded ReBlockG reduces the feature map input to the first ReBlockD to 1 / Output at a resolution of times.
[0044] For specific limitations regarding the pavement distress image generation device, please refer to the limitations of the pavement distress image generation method described above, which will not be repeated here. It should be noted that the pavement distress image generation device provided in this embodiment is only illustrated by the division of the above-mentioned functional units when generating pavement pothole distress images. In practical applications, the above functions can be assigned to different functional units as needed, that is, the internal structure of the device can be divided into different functional units to complete all or part of the functions described above.
[0045] This application provides an electronic device, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor executes the executable instructions to implement the aforementioned method for generating pavement distress images based on residual depth generative adversarial networks or the aforementioned method for identifying pavement distress. In some embodiments, the electronic device may also include: an input interface and an output interface. The processor, memory, and input / output interfaces can be connected via a bus or signal lines. Various peripheral devices can be connected to the input / output interfaces via a bus, signal lines, or circuit boards. The input / output interfaces can be used to connect at least one input / output-related peripheral device to the processor and memory. In some embodiments, the processor, memory, and input / output interfaces are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor, memory, and input / output interfaces can be implemented on separate chips or circuit boards, and this application does not limit this.
[0046] This application provides a computer-readable storage medium storing computer instructions. When executed by a processor, these instructions implement the steps of the aforementioned method for generating pavement distress images based on residual deep generative adversarial networks or the aforementioned method for identifying pavement distress. Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented in hardware, or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk. Those skilled in the art should recognize that the functions described in one or more of the above method embodiments can be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, these functions can be stored in a computer-readable storage medium or transmitted as one or more instructions or codes on the computer-readable storage medium. Computer-readable storage media include computer storage media and communication media, wherein communication media include any medium that facilitates the transmission of computer programs from one place to another. Storage media can be any available medium accessible to general-purpose or special-purpose computers.
[0047] The following describes the experimental process and results of the method for generating pavement distress images and identifying pavement distress based on the generative adversarial network proposed in this application.
[0048] (1) Experimental setup This experiment was conducted on a Windows 10 operating system, using an NVIDIA GeForce RTX 3060Ti graphics card. The deep learning framework used was PyTorch 1.13.1, running with CUDA 11.7 and cuDNN 8.6.0 support. In the generative adversarial network (GAN), the learning rates for the generator and discriminator were set to 0.002 and 0.001, respectively, and the optimizer was Adam with a gradient penalty coefficient of 10. The disease detection algorithm had a training learning rate of 0.01, a momentum parameter of 0.937, and all other hyperparameters remained at their default settings.
[0049] This experiment uses the global road damage detection dataset RDD2022 (Road Damage Detector 2022). It contains four typical types of damage: longitudinal cracks (D00), transverse cracks (D10), alligator cracks (D20), and potholes (D40). The dataset is characterized by complex morphological features, large scale differences, and a high proportion of small objects, and is also affected by factors such as lighting, shadows, and occlusion. Due to the significantly insufficient number of D40 damage samples and the imbalanced distribution of the categories, this experiment constructs a deep augmentation dataset specifically for this category. Images containing D40 were selected from the original training set, and the damage areas were cropped based on road grade, lighting conditions, and shooting time to improve sample diversity and model generalization ability. A block-based cropping strategy was used to generate image samples suitable for training. Finally, 1000 pothole damage images under different lighting conditions were obtained, such as... Figure 5 As shown, this includes normal exposure ( Figure 5 (a) and underexposure ( Figure 5 (b) Samples. The above images provide a richer data foundation for evaluating the robustness of the generative model.
[0050] (2) Evaluation indicators The evaluation of generated image quality is mainly divided into two categories: qualitative and quantitative. Commonly used quantitative indicators include the Fréchet Inception Distance (FID) and the Inception Score (IS), which are used to measure the degree of similarity between the generated distribution and the real distribution, as well as the diversity of the samples.
[0051] Inception Score: This score measures the distribution difference by calculating the KL divergence and then taking the exponential average of the results. A higher IS value indicates better overall quality and diversity of the generated images. Its definition is as follows: in, Used to measure the difference between P and Q, a larger value indicates that the generated image can be classified with high confidence and has greater diversity in category distribution. Indicates the generated image Label distribution reflects image quality. The marginal distribution of the generated samples represents the diversity of the model's generated results.
[0052] Fréchet Inception Distance (FID): This measure of similarity between real and generated images is achieved by calculating the difference in distribution between the real and generated images in the feature space. A lower FID value indicates that the generated image distribution is closer to the real distribution, and thus exhibits higher diversity. The formula is as follows: in, , Let these represent the feature means of the real sample and the generated sample, respectively. Let ) represent the covariance matrices of the two, respectively. Represents the trace of a matrix.
[0053] This experiment verifies the performance improvement effect of the proposed generation method on the model through an image detection task. Detection performance is evaluated using Mean Average Precision (mAP) and metrics such as Recall and Precision. mAP(0.5) represents the average precision at an IoU threshold of 0.5, primarily measuring the model's performance in identifying disease targets; while mAP(0.5:0.95) represents the average precision as the IoU threshold changes from 0.5 to 0.95 in 0.05 step increments, providing a more comprehensive reflection of the model's performance in target localization and bounding box regression.
[0054] (3) Quantitative analysis To more comprehensively evaluate the quality and diversity of generated disease images, this experiment used two quantitative indicators, IS and FID, to evaluate the pitted disease images generated by various generative models (where "+" indicates the addition of residual structures). The results are shown in Table 1. In the table, ΔIS on the right side of the IS column represents the change in IS value after introducing residual structures; a positive value indicates an improvement in the diversity / quality of generated images. ΔFID on the right side of the FID column represents the change in FID value after introducing residual structures; a negative value indicates that the generated images are closer to the distribution of real data.
[0055] As shown in Table 1, without the addition of residual structures, WGAN-GP performs best among the base models, with an IS of 2.236, significantly higher than other original models such as DCGAN, SNGAN, and WGAN. Simultaneously, its FID of 217.739 is the lowest among all unimproved models. This indicates that WGAN-GP, when generating images of pothole damage on asphalt pavements, possesses both good sample diversity and a good approximation of the real data distribution. Building upon this, the ResWPGANet model, after introducing residual structures, further improves the IS to 2.425, an improvement of approximately 8.45% compared to the original model, while reducing the FID to 215.501, a decrease of approximately 1.03% compared to the original model. The results demonstrate that the introduction of residual structures, while already exhibiting superior performance, still brings stable and considerable performance gains, significantly enhancing the feature representation ability of the generative network. This further improves the detail clarity, texture structure, and overall visual quality of the generated pothole damage images, consistent with subjective human evaluation results.
[0056] Further comparison of the original and residual improvement results for each model reveals that the IS (Input Speed) is improved to varying degrees after introducing the residual structure for DCGAN, WGAN-GP, SNGAN, and WGAN. Specifically, DCGAN improves IS by approximately 23.48%, WGAN-GP by approximately 8.45%, SNGAN by approximately 5.30%, and WGAN by approximately 13.26%. Simultaneously, the FID (Fixed Input Distributed ID) of all models shows a downward trend, decreasing by approximately 5.15% (DCGAN), 1.03% (WGAN-GP), 1.11% (SNGAN), and 7.72% (WGAN), respectively. These results indicate that the residual structure has a strong general enhancement effect on different generative adversarial networks, significantly improving the diversity of generated samples and effectively improving the consistency between the generated distribution and the real distribution. Combined with subjective visualization results of the generated images, it is evident that the residual improvement model performs better in terms of pothole edge contours, texture details in damaged areas, and noise suppression, making the generated damage images visually closer to real road surface damage. In summary, the generative adversarial network based on residual structure improvement not only shows consistent improvement in both qualitative and quantitative indicators, but also significantly improves the generation quality of pothole images of asphalt pavement, effectively expands the disease data, and provides reliable data support and strong experimental evidence for improving the recognition accuracy of subsequent disease detection models.
[0057] Table 1. Comparison results of different models on the dataset. (4) Qualitative analysis To objectively evaluate the effect of residual structure on the performance improvement of generative models, this study conducts a systematic comparative experiment on four mainstream generative adversarial networks (WGAN-GP, DCGAN, SNGAN, and WGAN) and their corresponding residual improvement models. Figure 6 , Figure 7 Images of potholes in asphalt pavement were generated by the unmodified and modified models at training epochs of 0, 1000, 5000, 10000, and 20000, respectively, which intuitively revealed the significant differences in training dynamics and final generation quality between different model architectures.
[0058] For baseline models that do not incorporate residual structures, their training process exhibits slow convergence or gets trapped in suboptimal solutions. The WGAN-GP model begins to show blurred textures after 5000 epochs, but even after 20000 epochs, the generated images still lack detail, with rough edges on potholes. The DCGAN model's generated results show obvious checkerboard artifacts throughout the training process, resulting in blurry images with distorted textures, making it difficult to discern clear pothole shapes. SNGAN performs relatively best, with its generated images exhibiting some grayscale texture structure in later stages, but the shape, scale, and location of potholes lack diversity, resulting in insufficient overall realism. The basic WGAN model exhibits severe training non-convergence problems, consistently outputting unstructured, blurry images and failing to achieve effective feature learning. These limitations of baseline models are particularly evident in complex, high-dimensional asphalt pavement image data, where traditional generative models face challenges such as gradient instability or mode collapse.
[0059] Compared to the baseline model, the improved model, which incorporates a residual connection structure, demonstrates significant improvements in both training stability and generated image quality. The residual structure effectively mitigates the vanishing gradient problem in deep networks by providing an identity mapping path, allowing the generator to learn more effective features early in training. At Epoch=1000, the improved model generally outperforms the baseline model at the same stage. Among them, the proposed ResWPGANet model stands out: at Epoch=5000, it can generate pothole damage images with clear contours and rich textures; as the training epochs increase, the generated images exhibit high diversity and realism in terms of pothole shape, size, and spatial distribution, closely resembling the visual perception of real road damage images. The improved SNGAN model also showed significant progress, with the generated images exhibiting better structural integrity and texture details than its baseline version. Although the improved DCGAN and improved WGAN were slightly inferior to ResWPGANet in overall performance, the checkerboard artifacts and large-area blurring were greatly alleviated, verifying the universal enhancement effect of the improved residual structure on different generative adversarial networks and providing a high-quality data augmentation solution for subsequent deep learning-based road surface defect detection tasks.
[0060] like Figure 8As shown, Poisson fusion and hybrid gradient Poisson fusion were performed on the generated pothole target image and the road surface background image, respectively. (a) and (d) show the generated pothole image and the original defect background image, respectively. The results obtained after traditional Poisson fusion are shown in (b) and (e). From the magnified view of (b), it can be observed that there is obvious overexposure in the pothole area, resulting in uneven lighting; at the same time, in (e), the texture transition between the pothole edge and the surrounding road surface is not smooth enough, showing a certain degree of boundary discontinuity, and the fusion naturalness is low. In contrast, the results of hybrid gradient Poisson fusion are shown in (c) and (f). This method can effectively preserve the dominant gradient information of the target and background in the edge area, so that the pothole texture and the road surface background can be connected more naturally. In addition, the lighting and shadow inside the pothole are also reasonably reconstructed, the overall visual effect is more realistic, and the fusion quality is better than the traditional Poisson fusion method.
[0061] (5) Performance evaluation of pavement distress detection To comprehensively evaluate the effectiveness of different data augmentation strategies in asphalt pavement distress detection, this study constructed four types of datasets for comparative experiments, as shown in Table 2. The first type is the Original dataset, the baseline dataset without any data augmentation, used to measure the model's basic detection performance under the original data conditions; the second type is the Geometric dataset, a geometric augmentation dataset, which enhances image morphological diversity through horizontal / vertical mirroring and geometric transformations such as 90°, 180°, and 270° rotations; the third type is the Photometric dataset, an illumination augmentation dataset. Image brightness and contrast were adjusted using Gamma transformation (contrast coefficient set to 0.5) and adaptive histogram equalization. The fourth category is the Generative dataset, a depth enhancement dataset. An improved ResWPGANet was used to generate pothole images, and the generated pothole regions were naturally embedded into the real road surface background through hybrid gradient Poisson fusion. The second to fourth categories of enhancement datasets were used to expand the scarce D40 class pothole samples, and the performance improvements of geometric enhancement, illumination enhancement, and depth generation strategies on pothole detection were verified.
[0062] Table 2. Dataset composition in the comparative experiment To further analyze the impact of different data augmentation strategies on disease detection performance, the YOLOv5s model was trained using multiple datasets, and the test results are listed in Table 3. Table 3 shows that on the Original dataset without any data augmentation, the overall performance of YOLOv5s is limited. The detection accuracy for D40 type pothole disease is only 0.566, significantly lower than other categories, reflecting the model's insufficient ability to identify scarce diseases under imbalanced data conditions. Traditional geometric augmentation has limited effect on improving model performance and even causes varying degrees of degradation. For example, the mAP@0.5 of horizontal / vertical mirroring decreased from 0.632 to 0.626, and the D40 accuracy decreased by 4.06%; the D40 accuracy of the rotation transformation method only improved to 0.560, still lower than the baseline. Illumination augmentation also failed to improve model performance, with both mAP and D40 accuracy decreasing. This indicates that in scenarios with complex road textures and significant illumination changes, simple illumination and contrast transformations are insufficient to improve the model's ability to distinguish diseased areas and may even introduce additional noise. In contrast, the generative augmentation dataset constructed using the ResWPGANet generative adversarial network with a residual structure shows significant advantages in both overall performance and rare disease detection. This dataset improves Recall from 0.611 to 0.669 (a relative improvement of 9.49%) and mAP@0.5 by 1.42%. More importantly, the accuracy of D40 disease detection improves from 0.566 to 0.593, a relative improvement of 4.77%, while all traditional augmentation strategies fail to achieve a positive improvement on D40. The results indicate that the generated data not only effectively expands the sample of rare categories but also enhances the model's robustness to pitted diseases. In summary, compared with traditional geometric or illumination augmentation methods, the generative model augmentation strategy proposed in this application can more effectively improve data distribution, enhance sample diversity, and significantly improve the model's ability to identify difficult-to-detect categories.
[0063] Table 3 Test results of the model trained on different datasets This experiment also compares the pavement distress detection method proposed in this application with current mainstream detection models. According to the detection framework classification, the experiment selects the two-stage detector Faster-R CNN as a representative of high accuracy, and selects one-stage methods such as SSD and RetinaNet as representatives of high efficiency. Simultaneously, it incorporates representative new detectors from recent years such as YOLOv12-N, RT-DETR-L, and Mamba-YOLO. The model performance results are shown in Table 4. Experimental results show that the method proposed in this application achieves the highest accuracy of 0.641 on the mAP@0.5 metric, significantly outperforming YOLOv7-tiny (improvement of approximately 9.4%) and Faster-RCNN (improvement of approximately 14.9%), and performing best among all compared models.
[0064] Table 4 Performance Comparison of Different Algorithms on Road Surface Dysfunction Dataset To verify the effect of the generative adversarial network data augmentation strategy proposed in this application on improving the detection accuracy and overall detection performance of pit-type defects, inference was performed in both complex and simple scenarios (e.g., Figure 9 As shown), the detection results of the model (Ours) in this application are qualitatively analyzed against ground truth (GT), YOLOv5s (baseline), CenterNet and Faster-RCNN.
[0065] In complex scenarios Figure 9 In (a)), the model of this application performs best in the identification of pitted defects (D40), with a detection confidence of 0.89, significantly higher than Faster-RCNN, YOLOv5s, and CenterNet (0.70, 0.68, and 0.49, respectively). Meanwhile, Faster-RCNN shows missed detections in this scenario, reflecting its insufficient robustness in complex backgrounds and with strong texture interference. Thanks to the high-quality augmented samples generated by ResWPGANet, the model of this application maintains stable and high-confidence detection performance even in complex backgrounds and irregular pitted morphologies. In simple scenarios ( Figure 9 (b) Its performance advantage is also significant. For small-sized potholes, both YOLOv5s and Faster-RCNN missed detections. Although CenterNet could detect the targets, its confidence scores were only 0.42 and 0.61, significantly lower than the 0.91 and 0.92 achieved by the model in this application. The results show that traditional models have limitations in small target detection, while the proposed method effectively improves multi-scale disease identification, especially small-scale pothole detection, after introducing augmented data. In summary, the proposed method shows better detection performance in complex scenes and small-scale targets, especially in pothole identification; the data augmentation strategy effectively enhances the model's generalization ability and stability, providing strong support for the practical application of road inspection.
[0066] This invention is not limited to the specific embodiments described above. Any modifications made by those skilled in the art based on the above concept without creative effort are within the scope of protection of this invention.
Claims
1. A method for generating pavement distress images based on residual deep generative adversarial networks, characterized in that, Includes the following steps: A residual deep generative adversarial network ResWPGANet was constructed, and pothole images from the original road surface distress images were used as training data to train ResWPGANet. Based on the trained ResWPGANet, the noise vector is used as input to output the generated image of road surface potholes; Using a road background image as the target background image and a road surface pothole defect image as the source image, the Poisson fusion algorithm is used to seamlessly embed the road surface pothole defect image into the target background image, resulting in a composite image of road surface pothole defects with consistent lighting and realistic texture that matches the road background image. The ResWPGANet includes a generator and a discriminator. The generator comprises, in sequence, a fully connected layer, multiple cascaded residual upsampling modules (ReBlockG), a standard convolutional layer, and a Tanh activation function layer. The fully connected layer maps and reshapes the input noise into an initial feature map. The multiple cascaded residual upsampling modules (ReBlockG) progressively increase the resolution of the initial feature map. Each ReBlockG module enlarges the feature map input to its module to... Multiplied resolution, n cascaded ReBlockGs will enlarge the feature map input to the first ReBlockG to The output is after being multiplied by a resolution of 10 times; the discriminator includes multiple cascaded residual downsampling modules ReBlockD and fully connected layers; each residual downsampling module ReBlockD reduces the feature map input to its module to 10 times the resolution of the discriminator. Multiplied resolution, n cascaded ReBlockGs reduce the feature map input to the first ReBlockD to [the size of the first ReBlockD]. Output at a resolution of times.
2. The method for generating pavement distress images based on residual deep generative adversarial networks according to claim 1, characterized in that, The residual upsampling module ReBlockG includes a parallel first main branch and a first shortcut branch with the same input. The first main branch includes, in sequence: batch normalization (BN), ReLU, 3×3 transposed convolution, batch normalization (BN), ReLU, and 3×3 standard convolution. The first shortcut branch includes, in sequence: batch normalization (BN), ReLU, and 1×1 transposed convolution. The outputs of the first main branch and the first shortcut branch are concatenated and fused to serve as the output of the residual upsampling module ReBlockG.
3. The method for generating pavement distress images based on residual deep generative adversarial networks according to claim 1, characterized in that, The residual downsampling module ReBlockD includes a parallel second main branch and a second shortcut branch with the same input. The second main branch includes, in sequence: 3×3 standard convolution, batch normalization (BN), LeakyReLU, 3×3 standard convolution, and batch normalization (BN). The second shortcut branch includes, in sequence: 1×1 standard convolution, batch normalization (BN), and LeakyReLU. The outputs of the second main branch and the second shortcut branch are concatenated and fused, and then activated by LeakyReLU to obtain the output of the residual downsampling module ReBlockD.
4. The method for generating pavement distress images based on residual deep generative adversarial networks according to claim 1, characterized in that, Each residual upsampling module, ReBlockG, enlarges the feature map input to that module. The resolution is doubled; each residual downsampling module, ReBlockD, reduces the feature map input to this module. The resolution is doubled; there are 5 residual upsampling modules (ReBlockG) and 5 residual downsampling modules (ReBlockD). In the generator, a fully connected layer is used to map and reshape the input noise into an initial feature map of 4×4×512, and five residual upsampling modules ReBlockG progressively enlarge the resolution of the initial feature map to 128×128. In the discriminator, five residual downsampling modules, ReBlockD, progressively reduce the resolution of the 128×128 feature map to 4×4.
5. The method for generating pavement distress images based on residual deep generative adversarial networks according to claim 1, characterized in that, The steps of the Poisson fusion algorithm include: Based on source image Region selection is performed to obtain a mask region, which includes road surface defect areas; based on the target background image... Select the target background area; Obtain the gradient of the source image Gradient of the target background image ; Based on a preset gradient selection strategy, a fusion region is formed between the mask region and the target background region. The target gradient is constructed in the process, and the gradient selection strategy includes any one or a combination of the following: ① selecting the gradient of the source image in the mask region and the gradient of the target background image in the non-mask region; ② comparing the intensity of the gradient of the source image and the gradient of the target background image and selecting the gradient with the larger gradient magnitude as the target gradient; ③ weighting or nonlinearly transforming the gradient of the source image and the gradient of the target background image and using it as the target gradient. The divergence of the target gradient is calculated, a Poisson equation is constructed, and the Poisson equation is solved to obtain the fused image. The Poisson equation is: in, To integrate the region Reconstructed images within, These are the image pixel values of the fused region. To integrate the region, To merge the boundaries of the region, The target gradient.
6. The method for generating pavement distress images based on residual deep generative adversarial networks according to claim 5, characterized in that, The step of comparing the gradient of the source image with the gradient of the target background image and selecting the gradient with the larger gradient magnitude as the target gradient includes: ; Gradient magnitude adopted Norm representation: .
7. A method for identifying road surface defects, characterized in that, include: Obtain the original road surface defect image, and use the method described in any one of claims 1-6 to obtain a composite image of road surface potholes and defects with consistent lighting and realistic texture that matches the road background image; Based on the combination of synthetic images of road surface potholes and original images of road surface defects, a road surface defect detection enhancement dataset containing expanded pothole samples is constructed. A road surface defect identification and detection network was trained based on the aforementioned road surface defect detection enhancement dataset. For the road image to be detected and identified, it is input into the trained road surface defect detection network to obtain the road surface defect identification result. The road surface defect identification result includes the road surface defect type and location. The road surface defect type includes: longitudinal cracks, transverse cracks, alligator cracks and potholes.
8. A pavement distress image generation device based on residual deep generative adversarial networks, characterized in that, include: Generate model building units to construct residual deep generative adversarial network ResWPGANet, and use pothole images from the original road surface distress images as training data to train ResWPGANet; The generation unit is used to generate images of road surface potholes based on the trained ResWPGANet, taking noise vectors as input and outputting them. The image synthesis unit is used to use a road background image as the target background image and a road surface pothole defect generated image as the source image. The Poisson fusion algorithm is used to seamlessly embed the road surface pothole defect generated image into the target background image to obtain a road surface pothole defect synthesized image with consistent lighting and realistic texture with the road background image. The ResWPGANet includes a generator and a discriminator. The generator comprises, in sequence, a fully connected layer, multiple cascaded residual upsampling modules (ReBlockG), a standard convolutional layer, and a Tanh activation function layer. The fully connected layer maps and reshapes the input noise into an initial feature map. The multiple cascaded residual upsampling modules (ReBlockG) progressively increase the resolution of the initial feature map. Each ReBlockG module enlarges the feature map input to its module to... Multiplied resolution, n cascaded ReBlockGs will enlarge the feature map input to the first ReBlockG to The output is after being multiplied by a resolution of 10 times; the discriminator includes multiple cascaded residual downsampling modules ReBlockD and fully connected layers; each residual downsampling module ReBlockD reduces the feature map input to its module to 10 times the resolution of the discriminator. Multiplied resolution, n cascaded ReBlockGs reduce the feature map input to the first ReBlockD. Output at a resolution of times.
9. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store processor-executable instructions; The processor executes the executable instructions to implement the method as described in any one of claims 1-6 or to implement the method as described in claim 7.
10. A computer-readable storage medium storing computer instructions thereon, characterized in that, When the instructions are executed by the processor, they implement the method as described in any one of claims 1-6 or the steps of the method as described in claim 7.