Road surface crack image preprocessing method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202110106360.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-26
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2041-01-26
AI Technical Summary
[0003]但是路面状况复杂多变,信息采集过程干扰因素众多,现有技术会破坏图像细节使图像模糊或容易受到背景噪声的影响,对于特殊裂缝图像的裂缝识别由于现有技术的制约,而造成识别准确性、实时性和一致性较低的问题
[0037]As can be seen from the above, one or more embodiments of this application provide a method for preprocessing road surface crack images, including: acquiring a road surface crack image set; the road surface crack image set includes: a set of interfering images and a set of de-interfering images; constructing a convolutional generative adversarial network (GAN); the GAN includes: a generator and a discriminator; inputting the set of interfering images into the generator to generate a confused image set; determining whether the discriminator can distinguish between the de-interfering image set and the confused image set; if not, then completing the preprocessing of the road surface crack image set. The method provided in this application utilizes a GAN to preprocess the interfering image set, transforming it into an image set with the same high resolution as the de-interfering image set. While retaining high-resolution crack features, it reduces the influence of background noise, achieving both improved crack model recognition accuracy and reduced model misidentification. The preprocessing method proposed in this application improves the recognition accuracy of the road surface crack recognition model, reduces the impact of special cracks on the road surface on the recognition results, and improves recognition accuracy, real-time performance, and consistency.
Smart Images

Figure CN112862706B_ABST
Abstract
Description
Technical Field
[0001] One or more embodiments of this application relate to the field of computer vision technology, and in particular to a method, apparatus, electronic device and storage medium for preprocessing road surface crack images. Background Technology
[0002] In existing technologies, due to the complexity of road surface backgrounds, the diversity of crack types, and the significant differences in the characteristics of special cracks, data collection is difficult. Therefore, preprocessing of road surface images is required. Existing technologies typically employ image enhancement and image denoising methods for preprocessing road surface images.
[0003] However, road conditions are complex and changeable, and there are many interfering factors in the information collection process. Existing technologies can destroy image details, making images blurry or easily affected by background noise. For crack recognition of special crack images, the limitations of existing technologies result in problems with low recognition accuracy, real-time performance, and consistency. Summary of the Invention
[0004] In view of this, the purpose of one or more embodiments in this application is to provide a method, apparatus, electronic device and storage medium for preprocessing road surface crack images to solve at least one of the above-mentioned problems existing in the prior art.
[0005] To achieve the above objectives, one or more embodiments of this application provide a method for preprocessing road surface crack images, including:
[0006] Obtain a set of road surface crack images; the set of road surface crack images includes: a set of interfering images and a set of de-interfering images;
[0007] Construct a convolutional generative adversarial network; the convolutional generative adversarial network includes: a generator and a discriminator;
[0008] The set of interfering images is input into the generator to generate a set of confused images;
[0009] Determine whether the discriminator can distinguish between the de-interference image set and the confused image set;
[0010] If not, then the preprocessing of the road surface crack image set is completed.
[0011] Optionally, the convolutional generative adversarial network includes: a convolutional layer; in the convolutional generative adversarial network, the convolutional layer replaces the fully connected layer.
[0012] Optionally, the step of inputting the set of interfering images into the generator to generate the set of obfuscated images further includes:
[0013] Upsampling is performed on the road surface crack image set based on transposed convolution with stride.
[0014] Optionally, the generator includes: a first model parameter; the discriminator includes: a second model parameter;
[0015] The construction of the convolutional generative adversarial network further includes:
[0016] The first model parameters are fixed, and the de-interference image set and the interference image set are respectively associated with the real labels and zero labels to update the second model parameters;
[0017] The second model parameters are fixed, and the set of interfering images is associated with the ground truth labels to update the first model parameters;
[0018] The convolutional generative adversarial network is optimized based on the updated first and second model parameters.
[0019] Optionally, the convolutional generative adversarial network further includes: an objective function.
[0020] The construction of the convolutional generative adversarial network further includes:
[0021] The convolutional generative adversarial network is optimized according to the objective function; the objective function is expressed as follows:
[0022]
[0023] Wherein, G represents the generator, D represents the discriminator, z represents noise, x represents the truly distributed sample, and p data This represents the true distribution. The denoting operator represents the mean operation, D() represents the loss function value of the discriminator, and G() represents the loss function value of the generator.
[0024] Optionally, the step of optimizing the convolutional generative adversarial network according to the objective function further includes:
[0025] The convolutional generative adversarial network is optimized using a binary cross-entropy loss function, a sigmoid activation function, and an Adam optimizer.
[0026] Optionally, optimizing the convolutional generative adversarial network according to the objective function specifically includes:
[0027] The objective function of the discriminator is determined by maximizing the objective function based on the discriminator.
[0028] The objective function of the generator is determined by minimizing the objective function based on the generator.
[0029] Based on the same inventive concept, one or more embodiments of this application also propose a pavement crack image preprocessing device, comprising:
[0030] The acquisition module is configured to acquire a set of road surface crack images; the set of road surface crack images includes: a set of interfering images and a set of de-interfering images;
[0031] The building module is configured to build a convolutional generative adversarial network; the convolutional generative adversarial network includes: a generator and a discriminator;
[0032] The generation module is configured to input the set of interfering images into the generator to generate a set of confused images;
[0033] The judgment module is configured to determine whether the discriminator can distinguish between the de-interference image set and the confused image set;
[0034] The processing module is configured to perform preprocessing on the road surface crack image set if no.
[0035] Based on the same inventive concept, one or more embodiments of this application also propose an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the road surface crack image preprocessing method described in any of the above claims.
[0036] Based on the same inventive concept, one or more embodiments of this application also propose a non-transitory computer-readable storage medium that stores computer instructions for causing the computer to execute the road surface crack image preprocessing method described in any one of the above claims.
[0037] As can be seen from the above, one or more embodiments of this application provide a method for preprocessing road surface crack images, including: acquiring a road surface crack image set; the road surface crack image set includes: a set of interfering images and a set of de-interfering images; constructing a convolutional generative adversarial network (GAN); the GAN includes: a generator and a discriminator; inputting the set of interfering images into the generator to generate a confused image set; determining whether the discriminator can distinguish between the de-interfering image set and the confused image set; if not, then completing the preprocessing of the road surface crack image set. The method provided in this application utilizes a GAN to preprocess the interfering image set, transforming it into an image set with the same high resolution as the de-interfering image set. While retaining high-resolution crack features, it reduces the influence of background noise, achieving both improved crack model recognition accuracy and reduced model misidentification. The preprocessing method proposed in this application improves the recognition accuracy of the road surface crack recognition model, reduces the impact of special cracks on the road surface on the recognition results, and improves recognition accuracy, real-time performance, and consistency. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in one or more embodiments of this application or in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only one or more embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 This is a flowchart of a road surface crack image preprocessing method in one or more embodiments of this application;
[0040] Figure 2 This is a schematic diagram of the generator network structure in one or more embodiments of this application;
[0041] Figure 3 This is a schematic diagram of the discriminator network structure in one or more embodiments of this application;
[0042] Figure 4 This is a schematic diagram of the training process of the convolutional generative adversarial network in one or more embodiments of this application;
[0043] Figure 5 This is a flowchart illustrating one or more embodiments of this application;
[0044] Figure 6 This is a flowchart illustrating one or more embodiments of this application;
[0045] Figure 7This is a flowchart illustrating one or more embodiments of this application;
[0046] Figure 8 This is a schematic diagram of the structure of a road surface crack image preprocessing device in one or more embodiments of this application;
[0047] Figure 9 This is a schematic diagram of the structure of an electronic device in one or more embodiments of this application. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.
[0049] It should be noted that, unless otherwise defined, the technical or scientific terms used in one or more embodiments of this application should have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms "first," "second," and similar terms used in one or more embodiments of this application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0050] As described in the background section, in existing technologies, due to the complexity of road surface backgrounds (shadows, stains, markings, repairs, etc.), the diversity of crack types (light-colored cracks, blurred cracks, damp cracks, alligator cracks, etc.), and the significant differences in the characteristics of special cracks, data collection is difficult. Crack recognition models trained by traditional convolutional neural networks often perform poorly in recognizing light-colored and blurred cracks and are prone to misidentification of stains, markings, and other interference, thus affecting the overall recognition accuracy of the model. To reduce or eliminate these interferences, appropriate image preprocessing is required. Automated road crack preprocessing methods are mainly derived from traditional digital image processing techniques and can be broadly divided into two categories based on their focus: image denoising and image enhancement.
[0051] The applicant's research revealed that existing technologies often encounter complex and variable road conditions, with numerous interfering factors during information acquisition (such as shadows and lighting). Image enhancement and denoising methods struggle to eliminate these effects. For example, mean filtering, while denoising, can destroy image details, making the image blurry; median filtering, although effective at smoothing small grayscale variations, cannot effectively filter out various noises superimposed on road images; low-pass filtering also tends to produce blurring effects; high-pass filtering enhances crack contrast by preserving areas of dramatic grayscale changes, but is easily affected by road background noise. While various recognition algorithms have their advantages and disadvantages, none can adequately improve the discontinuous nature of cracks.
[0052] Currently, most crack recognition technologies utilize image datasets with low resolution, minimal background interference, and readily apparent crack features. However, insufficient data volume leads to models that struggle to accurately fit crack features against complex real-world road surfaces, resulting in numerous false positives and false negatives, particularly for special crack types like light-colored and blurred cracks. Existing road crack preprocessing and recognition algorithms suffer from a trade-off between accuracy and speed, hindering their application in engineering. Thresholding segmentation is fast but heavily influenced by lighting conditions; spatial domain edge detection is fast, but the recognition result is actually boundary pixels, not the narrow, strip-like crack itself; seed-based recognition algorithms are often used for automatic real-time processing, but identifying cracks using seeds rather than pixels reduces accuracy; algorithms based on multi-scale wavelet transform, global dynamic optimization, and supervised learning typically achieve better results but are computationally expensive and primarily used for offline processing. In summary, existing crack image preprocessing and recognition algorithms fail to achieve satisfactory results in terms of accuracy, real-time performance, and consistency.
[0053] Therefore, this application proposes a preprocessing method for road crack images. It involves acquiring a set of road crack images and identifying interfering and de-interfering image sets. A convolutional generative adversarial network (GAN) including a generator and a discriminator is constructed. The generator produces a confused image set based on the interfering image set. The discriminator then determines whether the de-interfering and confused image sets can be distinguished. If not, it proves that the generator has successfully converted the interfering crack images in the interfering image set into a high-resolution image set, highly consistent with the images in the de-interfering image set. This method reduces computation time while preserving the realistic details of the cracks, comprehensively considering boundary and region features to eliminate texture and noise interference, and achieving an optimized preprocessing method based on local and global information.
[0054] The technical solutions of this disclosure will be further described in detail below through specific embodiments.
[0055] refer to Figure 1Therefore, one or more embodiments of this application provide a method for preprocessing road surface crack images, which specifically includes the following steps:
[0056] S101: Obtain a set of road surface crack images; the set of road surface crack images includes: a set of interfering images and a set of de-interfering images.
[0057] In this embodiment, a road surface crack image set can be obtained, which may specifically include an interference image set and a de-interference image set. Specifically, the interference image set may include light-colored crack samples and blurred crack samples; the de-interference image set may include clear crack samples. The number of light-colored crack samples, blurred crack samples, and clear crack samples is the same. For example, light-colored crack samples can be divided according to RGB values.
[0058] S102: Construct a convolutional generative adversarial network; the convolutional generative adversarial network includes: a generator and a discriminator.
[0059] In this embodiment, a convolutional generative adversarial network (CGN) is constructed, comprising a generator and a discriminator. The generator and discriminator network models of the CGN are designed, and the model parameters are trained using adversarial learning. Based on the performance of convolutional neural networks in crack detection, a preliminary CGN (also known as DCGAN) is constructed.
[0060] In some alternative implementations, the convolutional generative adversarial network (CGIAN) includes convolutional layers. Compared to the original generative adversarial network (also known as a GAN), the CGIAN uses convolutional layers instead of fully connected layers in the GAN. (See reference...) Figure 2 and Figure 3 The network consists of a generator network structure and a discriminator network structure. The discriminator network structure is symmetrical to the generator network structure. There are no pooling layers or upsampling layers in the entire network.
[0061] It should be noted that, specifically, a strided transposed convolution (i.e., deconvolution) was used instead of upsampling. Upsampling of the road surface crack image set was performed based on the strided transposed convolution to increase the stability of training.
[0062] In some optional implementations, the convolutional generative adversarial network (CGN) further includes: an objective function; after constructing the CGN, it can be optimized according to the objective function, wherein the objective function can be expressed as:
[0063]
[0064] Where G represents the generator, D represents the discriminator, z represents noise, x represents the sample from the true distribution, and p data Represents the true distribution. The 'G' represents the mean operation, D() represents the loss function value of the discriminator, and G() represents the loss function value of the generator.
[0065] It should be noted that optimizing the convolutional generative adversarial network (GAN) based on the objective function specifically includes: maximizing the objective function of the discriminator to determine the discriminator's objective function; and minimizing the objective function of the generator to determine the generator's objective function. Specifically, during GAN training, the discriminator's objective function maximizes the above expression. When updating the parameters of the discriminator D, for data from the real distribution p... data For a given sample x, we want the output of D(x) to be as close to 1 as possible, i.e., the larger logD(x) is, the better. For the data G(z) generated from noise z, we want D(G(z)) to be as close to 0 as possible (i.e., the discriminator D can distinguish between real and fake data), so log(1-D(G(z))) is also as large as possible, thus requiring maxD, i.e., maximizing the objective function; and when updating the parameters of the generator G, we want G(z) to be as similar as possible to the real data, i.e., p g =p data Therefore, we want D(G(z)) to be as close to 1 as possible, that is, to minimize log(1-D(G(z))), which requires minG, i.e., minimizing the objective function. It should be noted that logD(x) is a term independent of G(z) and is directly equal to 0 when taking the derivative.
[0066] In some optional implementations, the generator includes: first model parameters; the discriminator includes: second model parameters; constructing a convolutional generative adversarial network, specifically further including: fixing the first model parameters and associating the de-interference image set and the interference image set with real labels and zero labels respectively to update the second model parameters; fixing the second model parameters and associating the interference image set with real labels to update the first model parameters; constructing a convolutional generative adversarial network based on the updated first model parameters and second model parameters.
[0067] S103: Input the set of interfering images into the generator to generate a set of confused images.
[0068] In this embodiment, a set of interfering images is input into a generator to generate a set of obfuscated images. Specifically, light-colored crack images and blurred crack images are input into the generator to generate a set of obfuscated images, i.e., "fake samples." See also... Figure 4First, the generator's initial model parameters are fixed. Then, "real" samples of clear crack images and "fake" samples of special crack images generated by the generator are input into the discriminator of the adversarial network for training. Clear crack samples correspond to real crack labels, while special crack samples correspond to all "0" labels. The discriminator's network parameters are updated so that the discriminator can learn to distinguish between "real" and "fake" samples. Then, the discriminator parameters are fixed, and the "fake" samples of special crack images generated by the generator are assigned to real crack labels. The generator's network parameters are trained and updated so that the generator can learn to generate samples that can pass for "real" ones.
[0069] It should be noted that during training, after optimizing the convolutional generative adversarial network (GAN) according to the objective function, the GAN can be further optimized using the binary cross-entropy loss function, the sigmoid activation function, and the Adam optimizer. The loss function is expressed as:
[0070] l(x, y) = L = {l1, ..., l N}, l n =-w n [y n ·logx n +(1-y n )·log(1-x n )]
[0071] Where N represents the batch size, w represents the Sigmoid activation function, and y represents the predicted value. The optimizer function chosen is the Adam optimizer, an algorithm that performs first-order gradient optimization on a stochastic objective function. This method calculates the adaptive learning rate for different parameters by estimating the first and second gradients.
[0072] S104: Determine whether the discriminator can distinguish between the de-interference image set and the confused image set.
[0073] S105: If not, then complete the preprocessing of the road surface crack image set.
[0074] In this embodiment, after obtaining the scrambled image set using step S103, a discriminator is used to determine whether the de-interference image set and the scrambled image set can be distinguished. To determine whether the generator can transform the special crack images in the interference image set into images of the same quality as the clear crack images in the de-interference image set, the discriminator needs to distinguish between the de-interference image set and the scrambled image set. If the discriminator can distinguish between the de-interference image set and the scrambled image set generated by the generator, it proves that the convolutional generative adversarial network (CGN) is not yet able to preprocess the interference image set into a high-resolution image set. Further optimization and training of the constructed CGN is needed until the discriminator can no longer distinguish between the de-interference image set and the scrambled image set generated by the generator.
[0075] It should be noted that by continuously adjusting the network structure and parameters of the generator and discriminator, the generator ultimately transforms light-colored cracks into dark cracks and blurry cracks into clear cracks. The discriminator, however, cannot distinguish between clear crack samples and special crack samples processed by the generator from the input image. Furthermore, because the generator focuses on learning crack features during training, it effectively reduces background noise (including shadows and lighting) in the generated images, significantly decreasing misidentification and missed identification by the subsequent crack model, thereby improving the overall recognition performance of the model.
[0076] It should be noted that the pavement crack image preprocessing algorithm proposed in this application does not target single noise sources, but rather optimizes preprocessing based on global information. During adversarial learning, it only focuses on features in the cracked and non-cracked areas, thus achieving a unified processing effect for various superimposed background noises. The crack image processed by the proposed preprocessing method retains high-resolution crack features. Although some pavement texture features are lost, these lost features are all part of the pavement background outside the cracks, indirectly enhancing the contrast of crack features during preprocessing. Furthermore, the preprocessing method provided in this application can be accelerated by GPUs and supports distributed parallel training and prediction modes on multiple GPU servers, significantly improving the efficiency of image preprocessing and crack model training and recognition.
[0077] Furthermore, for the trained generator model, various schemes such as preprocessing before training and recognition, preprocessing before multi-channel training, and preprocessing before direct recognition are designed to enable the image data preprocessed by the generator to participate in the training or recognition process of the crack model constructed by the traditional convolutional neural network from multiple dimensions, thereby playing an auxiliary role in model training or recognition.
[0078] refer to Figure 5The preprocessing methods proposed in this application are incorporated into the training and testing processes of the crack recognition network. The specific processing flow is as follows: Following the generator and discriminator network structures proposed in this application, a convolutional generative adversarial network (CGN) is constructed for crack image preprocessing. Simultaneously, a traditional convolutional neural network (such as UNet, ResNet, DenseNet, etc.) is constructed as the crack recognition network to compare whether incorporating the preprocessing methods of this application can improve crack recognition accuracy. A certain number of light-colored crack samples and blurry crack samples are selected as "fake" sample datasets, and an equal number of clear crack samples are selected as "real" sample datasets. These are input into the CGN for adversarial learning, training a generator model for crack image preprocessing. A portion of real road surface image datasets from engineering applications are selected and divided into training, validation, and test sets for training and testing the crack recognition network. Before training the crack recognition network, the input data of the training set is preprocessed using the generator of the CGN, transforming blurry cracks into clear cracks and light-colored cracks into dark cracks, while removing background noise, before being used to train the crack recognition network. The crack detection model with the highest performance during training was selected for test set prediction analysis. The test set data was preprocessed using a convolutional generative adversarial network (CGN) generator before being used to predict cracks using the selected model. Comparing the best crack detection model obtained without preprocessing, the analysis shows that adding the CGN to the crack detection network and preprocessing the training and test sets separately improves both training and detection performance.
[0079] refer to Figure 6The training set data, after being processed using the preprocessing method proposed in this application, is concat-overlayed with the unprocessed training set data in the channel dimension. A dual-channel data mode is used to train the crack recognition network, which assists in the training of the crack recognition model. The specific processing flow is as follows: Following the generator and discriminator network structure proposed in this application, a convolutional generative adversarial network (GAN) is constructed for crack image preprocessing. Simultaneously, a traditional convolutional neural network (such as UNet, ResNet, DenseNet, etc.) is constructed as the crack recognition network to compare whether incorporating the proposed preprocessing method can improve crack recognition accuracy. A certain number of light-colored crack samples and blurry crack samples are selected as "fake" sample datasets, and an equal number of clear crack samples are selected as "real" sample datasets. These are input into the GAN for adversarial learning, training a generator model for crack image preprocessing. A portion of real road surface image datasets from engineering applications are selected and divided into training, validation, and test sets for training and testing the crack recognition network. Before training the crack recognition network, the input data of the training set is preprocessed using a generator from a convolutional generative adversarial network (GAN). This process transforms blurry cracks in the training set into clear cracks and light-colored cracks into dark-colored cracks, while also removing background noise, resulting in preprocessed training data. The preprocessed training data is then concatenated with the original training data along the channel dimension to obtain dual-channel training data. The preprocessed data channels assist in training the original training data. The crack recognition model with the highest performance during training is selected for test set prediction analysis. Comparison with the optimal crack recognition model obtained without preprocessing shows that incorporating the preprocessing method described in this application for dual-channel assisted training improves the training and recognition performance of the crack recognition network.
[0080] refer to Figure 7A crack recognition network was trained using unprocessed training data. The optimal crack model was selected, and the crack recognition was performed on the preprocessed test set data of the GAN. The specific processing flow is as follows: A convolutional generative adversarial network (GAN) was constructed for crack image preprocessing according to the generator and discriminator network structure proposed in this application. Simultaneously, a traditional convolutional neural network (such as UNet, ResNet, DenseNet, etc.) was constructed as the crack recognition network to compare whether the preprocessing method proposed in this application could improve crack recognition accuracy. A certain number of light-colored crack samples and blurry crack samples were selected as "fake" sample datasets, and an equal number of clear crack samples were selected as "real" sample datasets. These were input into the GAN for adversarial learning, and the generator model was trained for crack image preprocessing. A dataset of real road surface images from engineering applications was selected and divided into training, validation, and test sets for training and testing the crack recognition network. The crack recognition model was trained using the original training set data without preprocessing. The crack recognition model with the highest performance during training was selected for test set prediction analysis. The preprocessing method proposed in this application is applied only to the test set data. The test set data is preprocessed by the generator of a convolutional generative adversarial network (CGN) before being used to predict cracks using a selected crack recognition model. Comparison with the optimal crack recognition model obtained without preprocessing shows that incorporating a CGN into the traditional crack recognition process and preprocessing the data to be recognized improves the crack recognition network's performance.
[0081] As can be seen from the above, one or more embodiments of this application provide a method for preprocessing road surface crack images, including: acquiring a road surface crack image set; the road surface crack image set includes: a set of interfering images and a set of de-interfering images; constructing a convolutional generative adversarial network (GAN); the GAN includes: a generator and a discriminator; inputting the set of interfering images into the generator to generate a confused image set; determining whether the discriminator can distinguish between the de-interfering image set and the confused image set; if not, then completing the preprocessing of the road surface crack image set. The method provided in this application utilizes a GAN to preprocess the interfering image set, transforming it into an image set with the same high resolution as the de-interfering image set. While retaining high-resolution crack features, it reduces the influence of background noise, achieving both improved crack model recognition accuracy and reduced model misidentification. The preprocessing method proposed in this application improves the recognition accuracy of the road surface crack recognition model, reduces the impact of special cracks on the road surface on the recognition results, and improves recognition accuracy, real-time performance, and consistency. Specifically, the algorithm relies on a generator to preprocess global information of the crack image to generate the image, and a discriminator to determine the location of the crack. This allows for the preservation of complete and continuous crack features, improving upon the poor continuity of traditional digital image processing techniques when preprocessing crack features. Furthermore, the dataset used in the experimental verification consists of real road surface data collected during actual engineering processes by highway maintenance units. This data, precisely calibrated by professionals, has an image resolution of approximately 3000×2000 pixels and contains continuous and rich crack features as well as various background interference factors. Therefore, the preprocessing algorithm developed has greater practical significance and engineering application value.
[0082] It is understandable that this method can be executed by any device, equipment, platform, or cluster of devices with computing and processing capabilities.
[0083] It should be noted that the methods of one or more embodiments of this specification can be executed by a single device, such as a computer or server. The methods of this embodiment can also be applied in a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the methods of one or more embodiments of this specification, and the multiple devices will interact with each other to complete the method described.
[0084] It should be noted that the above description describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims may be performed in a different order than that shown in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0085] Based on the same inventive concept, one or more embodiments of this application also propose a pavement crack image preprocessing device, see reference. Figure 8 The road surface crack image preprocessing device includes:
[0086] The acquisition module is configured to acquire a set of road surface crack images; the set of road surface crack images includes: a set of interfering images and a set of de-interfering images;
[0087] The building module is configured to build a convolutional generative adversarial network; the convolutional generative adversarial network includes: a generator and a discriminator;
[0088] The generation module is configured to input the set of interfering images into the generator to generate a set of confused images;
[0089] The judgment module is configured to determine whether the discriminator can distinguish between the de-interference image set and the confused image set;
[0090] The processing module is configured to perform preprocessing on the road surface crack image set if no.
[0091] In some alternative implementations, the convolutional generative adversarial network includes: convolutional layers; in the convolutional generative adversarial network, the convolutional layers replace fully connected layers.
[0092] In some alternative implementations, the step of inputting the set of interfering images into the generator to generate the obfuscated set further includes:
[0093] Upsampling is performed on the road surface crack image set based on transposed convolution with stride.
[0094] In some optional implementations, the generator includes: a first model parameter; the discriminator includes: a second model parameter;
[0095] The construction of the convolutional generative adversarial network further includes:
[0096] The first model parameters are fixed, and the de-interference image set and the interference image set are respectively associated with the real labels and zero labels to update the second model parameters;
[0097] The second model parameters are fixed, and the set of interfering images is associated with the ground truth labels to update the first model parameters;
[0098] The convolutional generative adversarial network is optimized based on the updated first and second model parameters.
[0099] In some optional implementations, the convolutional generative adversarial network further includes: an objective function.
[0100] The construction of the convolutional generative adversarial network further includes:
[0101] The convolutional generative adversarial network is optimized according to the objective function; the objective function is expressed as follows:
[0102]
[0103] Wherein, G represents the generator, D represents the discriminator, z represents noise, x represents the truly distributed sample, and p data This represents the true distribution. The denoting operator represents the mean operation, D() represents the loss function value of the discriminator, and G() represents the loss function value of the generator.
[0104] In some alternative implementations, the step of optimizing the convolutional generative adversarial network according to the objective function further includes:
[0105] The convolutional generative adversarial network is optimized using a binary cross-entropy loss function, a sigmoid activation function, and an Adam optimizer.
[0106] In some optional implementations, optimizing the convolutional generative adversarial network according to the objective function specifically includes:
[0107] The objective function of the discriminator is determined by maximizing the objective function based on the discriminator.
[0108] The objective function of the generator is determined by minimizing the objective function based on the generator.
[0109] For ease of description, the above apparatus is described in terms of function, divided into various modules. Of course, when implementing one or more embodiments of this specification, the functions of each module can be implemented in one or more software and / or hardware.
[0110] The apparatus described above is used to implement the corresponding methods in the foregoing embodiments and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0111] Based on the same inventive concept, corresponding to any of the above embodiments, one or more embodiments of this specification also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the road surface crack image preprocessing method described in any of the above embodiments.
[0112] Figure 9 This embodiment illustrates a more specific hardware structure of an electronic device, which may include a processor 910, a memory 920, an input / output interface 930, a communication interface 940, and a bus 950. The processor 910, memory 920, input / output interface 930, and communication interface 940 are interconnected internally via the bus 950.
[0113] The processor 910 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0114] The memory 920 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 920 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 920 and is called and executed by the processor 910.
[0115] The input / output interface 930 is used to connect input / output modules to enable information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.
[0116] The communication interface 940 is used to connect the communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0117] Bus 950 includes a pathway for transmitting information between various components of the device, such as processor 910, memory 920, input / output interface 930, and communication interface 940.
[0118] It should be noted that although the above-described device only shows the processor 910, memory 920, input / output interface 930, communication interface 940, and bus 950, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.
[0119] The electronic devices described above are used to implement the corresponding methods in the foregoing embodiments and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0120] Based on the same inventive concept, corresponding to any of the above embodiments, one or more embodiments of this specification also provide a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the road surface crack image preprocessing method as described in any of the above embodiments.
[0121] The non-transitory computer-readable storage medium of this embodiment includes both permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0122] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute the pavement crack image preprocessing method as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0123] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this disclosure (including the claims) is limited to these examples; within the framework of this disclosure, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of one or more embodiments of this application as described above, which are not provided in detail for the sake of brevity.
[0124] Additionally, to simplify the description and discussion, and to avoid obscuring one or more embodiments of this specification, well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Furthermore, the apparatus may be illustrated in block diagram form to avoid obscuring one or more embodiments of this specification, and this also takes into account the fact that the details of implementation of these block diagram apparatuses are highly dependent on the platform on which one or more embodiments of this specification will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuits) have been set forth to describe exemplary embodiments of this disclosure, it will be apparent to those skilled in the art that one or more embodiments of this specification may be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0125] Although this disclosure has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.
[0126] One or more embodiments in this application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments in this application should be included within the scope of protection of this disclosure.
Claims
1. A method for preprocessing road surface crack images, characterized in that, include: Obtain a set of images of road surface cracks; The road surface crack image set includes: a set of interfering images and a set of de-interfering images; the set of interfering images includes: light-colored crack samples and blurred crack samples; the set of de-interfering images includes: clear crack samples. Construct a convolutional generative adversarial network; the convolutional generative adversarial network includes: a generator and a discriminator; wherein, the generator is used to transform light-colored cracks into dark-colored cracks and blurry cracks into clear cracks; The set of interfering images is input into the generator to generate a set of confused images; Determine whether the discriminator can distinguish between the de-interference image set and the confused image set; If not, then the preprocessing of the road surface crack image set is completed.
2. The method for preprocessing road surface crack images according to claim 1, characterized in that, The convolutional generative adversarial network includes: a convolutional layer; in the convolutional generative adversarial network, the convolutional layer replaces the fully connected layer.
3. The method for preprocessing road surface crack images according to claim 1, characterized in that, The step of inputting the set of interfering images into the generator to generate a set of obfuscated images further includes: Upsampling is performed on the road surface crack image set based on transposed convolution with stride.
4. The method for preprocessing road surface crack images according to claim 1, characterized in that, The generator includes: a first model parameter; the discriminator includes: a second model parameter; The construction of the convolutional generative adversarial network further includes: The first model parameters are fixed, and the de-interference image set and the interference image set are respectively associated with the real labels and zero labels to update the second model parameters; The second model parameters are fixed, and the set of interfering images is associated with the ground truth labels to update the first model parameters; The convolutional generative adversarial network is optimized based on the updated first and second model parameters.
5. The method for preprocessing road surface crack images according to claim 1, characterized in that, The convolutional generative adversarial network also includes: an objective function. The construction of the convolutional generative adversarial network further includes: The convolutional generative adversarial network is optimized according to the objective function; the objective function is expressed as follows: Wherein, G represents the generator, D represents the discriminator, z represents noise, x represents the truly distributed sample, and p data This represents the true distribution. The denoting operator represents the mean operation, D() represents the loss function value of the discriminator, and G() represents the loss function value of the generator.
6. The method for preprocessing road surface crack images according to claim 5, characterized in that, The process of optimizing the convolutional generative adversarial network according to the objective function further includes: The convolutional generative adversarial network is optimized using a binary cross-entropy loss function, a sigmoid activation function, and an Adam optimizer.
7. The method for preprocessing road surface crack images according to claim 5, characterized in that, The optimization of the convolutional generative adversarial network according to the objective function specifically includes: The objective function of the discriminator is determined by maximizing the objective function based on the discriminator. The objective function of the generator is determined by minimizing the objective function based on the generator.
8. A pavement crack image preprocessing device, characterized in that, include: The acquisition module is configured to acquire a set of road surface crack images; The road surface crack image set includes: a set of interfering images and a set of de-interfering images; the set of interfering images includes: light-colored crack samples and blurred crack samples; the set of de-interfering images includes: clear crack samples. The building module is configured to build a convolutional generative adversarial network; the convolutional generative adversarial network includes: a generator and a discriminator; wherein, the generator is used to transform light-colored cracks into dark-colored cracks and blurry cracks into clear cracks; The generation module is configured to input the set of interfering images into the generator to generate a set of confused images; The judgment module is configured to determine whether the discriminator can distinguish between the de-interference image set and the confused image set; The processing module is configured to perform preprocessing on the road surface crack image set if no.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the road surface crack image preprocessing method as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium stores computer instructions for causing the computer to perform the pavement crack image preprocessing method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method and system for judging an overrun object on an escalator
CN110245619A
Pavement crack image virtual augmentation model establishment and image virtual augmentation method
CN111861906A