Engineering construction quality defect identification method based on artificial intelligence
By constructing the initial sample set and using wavelet transform to extract texture features, combining the adversarial generation network and Markov random field model, dynamically adjusting the discriminator weight, the problem of traditional methods being difficult to distinguish between mortar artifacts and real defects is solved, and engineering structural defect identification with high accuracy and low error detection rate is achieved.
Patent Information
- Application Number
- CN202510212059.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-25
- Publication Date
- 2025-06-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional engineering structural defect identification methods are difficult to effectively distinguish between mortar artifacts and real defects, especially when the artifact shape and distribution changes are complex, which makes it difficult to balance the identification accuracy and false detection rate.
Using an artificial intelligence-based engineering construction quality defect identification method, by constructing an initial sample set containing artifacts and defects, texture features are extracted using wavelet transform, and diverse artifact image samples are generated based on the adversarial generation network. The structured prior information of the defect area is extracted through the Markov random field model, and the discriminator weight is dynamically adjusted to improve the ability to distinguish artifacts from real defects.
It effectively improves the accuracy and reliability of surface quality detection of masonry structures, reduces the false detection rate of artifacts, and realizes accurate identification of engineering structural defects.
Smart Images

Figure CN120147710A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology, and in particular to an engineering construction quality defect recognition method based on artificial intelligence. Background Art
[0002] In the defect recognition system of engineering structures, the presence of surface artifacts such as stains and rust constitutes a significant interference to the recognition of real defects. These artifacts are diverse in morphology and distribution, and have certain similarities with real defects in visual features, making it difficult for traditional recognition methods to effectively distinguish them. In the adversarial generative network, the task of the discriminator is to accurately distinguish between artifacts and real defects, while the generator attempts to generate artifact features that are sufficient to confuse the discriminator. When the morphology and distribution of artifacts change, the discriminator and generator need to dynamically adjust their respective network parameters to capture the subtle feature differences between artifacts and real defects. Specifically, the discriminator needs to extract the feature distribution of artifacts and real defects at different scales through multi-scale texture feature analysis. The generator needs to generate samples that are closer to real artifacts based on the feedback of the discriminator to enhance the feature extraction ability of the discriminator. In this process, the parameter adjustment of the discriminator mainly focuses on improving the ability to distinguish artifact features, while the parameter adjustment of the generator focuses on generating more representative artifact samples. The morphology and distribution of artifacts are often random and complex, which makes it more difficult to coordinate the discriminator and generator. The network needs to reduce false detection of artifacts as much as possible while maintaining high recognition accuracy of real defects. This contradiction directly affects the overall performance of the system, especially under the high-precision requirements of engineering structure detection. How to balance recognition accuracy and false detection rate becomes a core issue in system design. Summary of the invention
[0003] The present invention provides an engineering construction quality defect recognition method based on artificial intelligence, which mainly includes:
[0004] Obtain a surface image dataset of the target engineering structure, annotate crack defects and mortar artifact areas on the surface of the masonry structure, and construct an initial sample set with diverse artifact morphologies and relatively concentrated defect distribution;
[0005] The multi-scale decomposition method of wavelet transform is used to process the image data in the initial sample set, extract the directional information and periodic characteristics of the image texture under different frequency sub-bands, and obtain the richness of the artifact texture details and the sharpness of the defect edge;
[0006] A generative adversarial network is constructed based on the initial sample set and the annotation results. The surface texture features of the masonry structure extracted from the initial sample set are input into the generator as prior information to generate artifact image samples with inconsistent artifact intensity and large grayscale value changes.
[0007] Input the generated artifact image samples into the discriminator. According to the cross-entropy loss function, generate the similarity between the artifacts and the real defects. If the similarity does not reach the preset standard, update the parameters of the generator through backpropagation until the similarity between the generated artifacts and the real defects reaches the preset standard;
[0008] According to the energy distribution law of wavelet coefficients, compare the statistical characteristic differences between the generated artifacts and the real defects at different scales and directions. If the energy of the generated artifacts at the preset scale and direction is significantly higher or lower than the energy of the real defects at the same scale and direction, and exceeds the set threshold range, it is determined that the energy of a specific sub-band exceeds the set range, then adjust the generator to add a feature enhancement layer corresponding to the scale;
[0009] Obtain the annotation information and texture features of the real defect images, construct a Markov random field model, extract the structured prior information of the defect area through the Markov random field model, and dynamically adjust the weights of the discriminator according to the differences between the structured prior information extracted by the Markov random field model and the structured information of the artifact images generated by the generator;
[0010] Use the trained generator as an image enhancement preprocessing module, input the image of the surface of the masonry structure to be detected, remove the artifacts and enhance the edges of the defects, and combine wavelet features for classification and recognition to identify the quality defects on the surface of the masonry structure.
[0011] The technical solutions provided in the embodiments of the present invention may include the following beneficial effects:
[0012] The present invention discloses an artificial intelligence-based method for identifying quality defects in engineering construction. Aiming at the identification problems of crack defects and mortar artifacts on the surface of masonry structures, by constructing an initial sample set containing artifacts and defects, using wavelet transform to extract texture features, and generating diverse artifact image samples based on a generative adversarial network. Extract the structured prior information of the defect area through the Markov random field model, dynamically adjust the weights of the discriminator, and improve the ability to distinguish between artifacts and real defects. Finally, use the trained generator as an image enhancement preprocessing module, combine wavelet features for classification and recognition, and achieve accurate detection of quality defects on the surface of masonry structures. The present invention effectively solves the problem that it is difficult for traditional methods to distinguish between mortar artifacts and real defects, improves the accuracy and reliability of the surface quality detection of masonry structures, and has important significance for the quality assessment of engineering structures. Description of the Drawings
[0013] Figure 1 It is a flowchart of an artificial intelligence-based method for identifying quality defects in engineering construction according to the present invention.
[0014] Figure 2 It is a schematic diagram of an artificial intelligence-based method for identifying quality defects in engineering construction according to the present invention.
[0015] Figure 3 This is another schematic diagram of an artificial intelligence-based method for identifying engineering construction quality defects of the present invention. Detailed implementation manners
[0016] Next, the technical solutions in the embodiments of the present invention will be clearly and detailedly described with reference to the accompanying drawings in the embodiments of the present invention. The described embodiments are only a part of the embodiments of the present invention.
[0017] As Figures 1-3 , a method for identifying engineering construction quality defects based on artificial intelligence in this embodiment may specifically include:
[0018] Step S101: Obtain a surface image dataset of the target engineering structure, label the crack defects and mortar artifact areas on the surface of the masonry structure, and construct an initial sample set with diverse artifact morphologies and relatively concentrated defect distributions.
[0019] Obtain high-resolution image data of the engineering surface area, and process the high-resolution image data through a light compensation algorithm to obtain first standardized image data; extract the gray value of the mortar area in the first standardized image data, and obtain the mortar artifact area through the region growing method. The mortar artifact area is processed through morphological operations to obtain second feature data; locate the crack area according to the crack edge gradient value in the first standardized image data, and the crack edge gradient value is processed through a morphological thinning algorithm to obtain third feature data; perform density clustering on the crack distribution coordinates in the third feature data, and the crack distribution coordinates are fitted through the least square method to obtain fourth feature data. A feature vector matrix is constructed according to the second feature data, the third feature data and the fourth feature data to form an initial sample set after annotation.
[0020] Specifically, high-resolution image data is acquired from the engineering surface acquisition area, and the illumination compensation algorithm is used to perform brightness equalization processing on the image. The compensation coefficient is set between 0.5 and 2. Pixel resampling is performed according to the image resolution, and the texture features of the masonry surface are extracted to obtain the first standardized image data. The gray values of the mortar area in the first standardized image data are extracted, and the mortar artifact area is segmented by the region growing method. The region growing threshold is set to be less than 10 for the gray difference between adjacent pixels. The edge contour features of the segmented mortar artifact area are extracted to obtain the first feature data. Morphological dilation and erosion operations are performed on the mortar artifact area in the first feature data. The structural element is set as a 3×3 matrix, and the morphological features of the mortar artifact are extracted to obtain the second feature data. The morphological thinning algorithm is used to preliminarily locate the crack area in the first standardized image data, and the crack width is quantified according to the crack edge gradient value. The crack edge gradient threshold is set to 20 to obtain the third feature data. According to the crack distribution coordinates in the third feature data, the density clustering algorithm is used for spatial clustering, and the clustering radius is set to 0.1 times the length of the image diagonal to obtain the crack density area distribution map. For the crack density area, the least squares method is used to fit the crack contour curve. The fitting curve uses a cubic polynomial function, and the curve curvature value is calculated to obtain the fourth feature data. A feature vector matrix is constructed according to the second feature data, the third feature data, and the fourth feature data. Each sample corresponds to a feature vector to form the initial labeled sample set. When collecting engineering surface images, a high-resolution camera obtains 4K resolution images. When the compensation coefficient in the illumination compensation algorithm is set to 0.8, it can effectively eliminate the shadow area, and when the compensation coefficient is adjusted to 1.5, the details of the low-light area can be enhanced. During the resampling process, the bicubic interpolation method is used to recalculate the pixel points to maintain the clarity of the image edge features. The gray-level co-occurrence matrix method is used to extract the texture features of the masonry surface, and statistical feature values such as energy, contrast, and correlation are calculated. When extracting the gray values of the mortar area, the gray values are usually distributed between 120 and 180. The region growing method uses a gray difference less than 10 as the growth condition and spreads from the center point of the image to the surrounding area. When the gray difference between adjacent pixel points is greater than the threshold, the growth stops. The Sobel operator is used to calculate the pixel gradient for edge contour feature extraction, and pixel points with a gradient value greater than 20 are marked as edge points. In the morphological operation, a 3×3 rectangular template is selected as the structural element. The dilation operation uses the maximum value to replace, and the erosion operation uses the minimum value to replace. The number of iterations is set to 3 times. After the morphological processing of the mortar artifact area, the area boundary is smoother, and the morphological feature values such as area size, perimeter, and circularity are more accurate. The morphological thinning algorithm is used for crack area location, and the iteration termination condition is that the pixel points no longer change. The crack edge gradient value is usually between 35 and 50, and the width quantization accuracy can reach 0.1 mm.In the density clustering algorithm, the clustering radius is taken as 0.1 times the length of the image diagonal, which is approximately 200 pixels. When the number of crack points in a certain area exceeds 50, it is marked as a dense area. The crack contour curve fitting uses a cubic polynomial function y = ax. 3 + bx 2 + cx + d. The coefficients a, b, c, and d are solved by the least squares method, and the curvature value k is calculated by the formula k = (y'') / [1 + (y')^2]^(3 / 2). Each sample in the eigenvector matrix contains 28 eigenvalues, including 8 mortar artifact features, 12 crack morphology features, and 8 curvature features, constituting a complete sample feature description. For a brick wall with a length of 5 meters, an image is collected every 0.5 meters, and a total of 10 standardized images are obtained. Among them, the area ratio of the detected mortar artifact area is 15% to 25%, the area ratio of the crack area is 5% to 8%, the length of a single crack is distributed between 50 and 200 pixels, the width is distributed between 3 and 8 pixels, and the curvature value is distributed between 0.02 and 0.08. The eigenvector of each sample in the sample set can completely describe the damage state of the corresponding area.
[0021] Step S102: Use the multi-scale decomposition method of wavelet transform to process the image data in the initial sample set, extract the direction information and periodic characteristics of the image texture in different frequency sub-bands, and obtain the richness of the artifact texture details and the sharpness of the defect edges.
[0022] Perform three-layer wavelet transform decomposition on the initial sample set image using the Haar wavelet basis function to obtain high-frequency sub-band data and low-frequency sub-band data; reconstruct the three-layer scale texture decomposition image according to the high-frequency sub-band data and the low-frequency sub-band data, and calculate the first feature data composed of contrast, correlation, uniformity, and entropy value for the texture decomposition image using the gray-level co-occurrence matrix; calculate the energy distribution values in the horizontal, vertical, and diagonal directions using the three-layer wavelet transform sub-band coefficients, and obtain the second feature data through the energy distribution values; construct an eigenvector according to the first feature data and the second feature data, map the eigenvector using the Gaussian kernel function, and establish the corresponding relationship between the feature score and the defect degree through the support vector regression method.
[0023] Specifically, three-layer wavelet transform decomposition is performed on the initial sample set image data using Haar wavelet basis functions. High-frequency subband data in three directions, namely horizontal, vertical, and diagonal, and one low-frequency subband data are obtained from each layer of decomposition. Texture decomposition images at the first, second, and third layer scales are obtained through wavelet coefficient reconstruction. For the three-layer texture decomposition images, a gray-level co-occurrence matrix is used to extract image contrast, correlation, uniformity, and entropy values. The matrix step size is set to 1, and the direction angles are set to 0°, 45°, 90°, and 135° to obtain the first feature data. The energy distribution values in the horizontal, vertical, and diagonal directions are calculated based on the subband coefficients of the three-layer wavelet transform. The subband energy is calculated as the sum of the squares of the wavelet coefficients to obtain the second feature data. The texture richness score of the artifact region is calculated using the contrast and entropy values in the first feature data. The score calculation uses normalized weighted summation, and the weight coefficients are set to 0.5, 0.3, and 0.2 according to the number of wavelet decomposition layers. The sharpness score of the defect edge is calculated based on the energy distribution values in the three directions in the second feature data. The sharpness score is calculated as the proportion of the high-frequency subband energy to obtain the third feature data. A feature vector is constructed for the texture richness score and the edge sharpness score, and the Gaussian kernel function is used to map the feature space. The bandwidth parameter of the kernel function is set to the median of the feature variances. The corresponding relationship between the feature scores and the defect degree is established through the support vector regression method. The relaxation variable is set to 0.1, and the penalty parameter is set to 1 to obtain the final feature evaluation result. During the wavelet transform decomposition process, the Haar wavelet basis function has compact support and orthogonality. Different frequency components are obtained by decomposing the image through high-pass filtering and low-pass filtering. The first layer of decomposition obtains a resolution of the original Figure 1The four sub-images of / 2 include horizontal high-frequency, vertical high-frequency, diagonal high-frequency, and low-frequency approximation components. The second and third layer decompositions continue on the basis of the low-frequency image of the previous layer, ultimately forming a multi-scale feature representation. In the surface image of the masonry structure, the artifact area often exhibits local texture changes. When extracting texture features through the gray-level co-occurrence matrix, the contrast reflects the degree of gray difference between adjacent pixels, the entropy value characterizes the complexity of the texture, the uniformity describes the uniformity of the gray distribution, and the feature extraction in 4 direction angles ensures direction invariance. When the matrix step size is 1, the subtlest texture changes can be captured. In actual calculation, the contrast value is distributed between 0 and 25, and the entropy value is distributed between 4 and 8. In the calculation of the sub-band energy, the sum of the squares of the high-frequency sub-band coefficients reflects the intensity of edge and detail information. A larger energy value in the horizontal direction indicates the existence of vertical edges, a larger energy value in the vertical direction indicates the existence of horizontal edges, and the energy value in the diagonal direction corresponds to the oblique edge feature. In practical applications, the sub-band energy value in the edge area is usually 3 to 5 times that of the flat area. The calculation of the texture richness score adopts multi-layer feature weighted fusion. The weight coefficients 0.5, 0.3, and 0.2 reflect the decreasing importance of different scale features. The higher layer contains global features, and the lower layer retains local details. The score value is mapped to the interval from 0 to 1 through normalization. The larger the value, the richer the texture. The edge sharpness score is calculated based on the proportion of the high-frequency sub-band energy in the total energy. In the sharp edge area, this ratio is usually above 0.4. In the support vector regression modeling, the bandwidth parameter of the Gaussian kernel function selects the median of the feature variance to ensure the adaptability of the feature space mapping. The slack variable 0.1 allows a small number of samples to deviate from the regression surface, and the penalty parameter 1 achieves a balance between the model complexity and the fitting accuracy. The detection results for a certain section of the concrete wall show that when the texture richness score is greater than 0.7 and the edge sharpness score is greater than 0.5, there is a 95% probability of serious damage in the corresponding area, while the damage probability in the area where the scores are both lower than 0.3 is only 5%.
[0024] Step S103, construct an adversarial generation network based on the initial sample set and the annotation results, and use the texture features of the masonry structure surface extracted from the initial sample set as prior information to input into the generator to generate artifact image samples with inconsistent artifact intensities and large gray value changes.
[0025] A five-layer convolutional neural network is used to perform feature encoding on the surface texture of the masonry structure. The convolutional neural network calculates the feature correlation between the masonry texture and the artifact area through feature mapping to obtain a feature map. A generator network is constructed according to the feature map. The generator network uses five deconvolutional layers to decode and restore the features, and obtains the first artifact texture image through feature recombination. For the first artifact texture image, gray value remapping is performed, the gray distribution range is adjusted through histogram equalization, and the gray value is adjusted using a piecewise linear transformation function to obtain the second artifact texture image. A discriminator network is constructed according to the second artifact texture image and the real artifact image. The discriminator network calculates the structural similarity between the generated image and the real image to obtain an adversarial loss value, and uses the adversarial loss value to iteratively optimize the generator parameters to obtain the third artifact texture image.
[0026] Specifically, extract the surface texture features of the masonry structure from the initial sample set, and use a five-layer convolutional neural network to perform feature encoding on the surface texture. The size of the convolutional kernel is set to 3×3, and the rectified linear unit is used as the activation function. Calculate the correlation between the masonry texture and the artifact region features through feature mapping to obtain the first feature map. Construct a generator network based on the first feature map, and use five deconvolution layers to decode and restore the features. The size of the deconvolution kernel is set to 4×4, and Gaussian noise with a mean of zero and a variance of 0.1 is added during the decoding process. Recombine the features to obtain the first artifact texture image. Perform gray value remapping on the first artifact texture image, adjust the gray distribution range through histogram equalization with 128 gray levels, and use a piecewise linear transformation function to adjust the gray values. The slope of the transformation function changes dynamically between 0.5 and 2 to obtain the second artifact texture image. Construct a four-layer discriminator network based on the second artifact texture image and the real artifact image. The number of channels in each layer is set to 64, 128, 256, and 512. Calculate the structural similarity between the generated image and the real image to obtain the adversarial loss value. Use the adversarial loss value to iteratively optimize the generator parameters. The loss threshold is set to 0.3, and the iteration stops when the loss value is less than the threshold to obtain the third artifact texture image. Perform artifact intensity quantization evaluation on the third artifact texture image. Calculate the texture complexity of the image block through local variance, and adjust the variance threshold within the range of 0.2 to 0.8 times the image mean to obtain the artifact intensity distribution map. Non-uniformly enhance the third artifact texture image according to the artifact intensity distribution map. The enhancement coefficient is positively correlated with the intensity value to generate the final artifact sample image. During the generation of artifacts on the masonry structure surface, the five-layer convolutional neural network extracts features layer by layer through small-sized convolutional kernels of 3×3. The first layer captures basic features such as edges and textures, and subsequent layers gradually extract more abstract high-level features. Finally, a 128-dimensional feature vector is obtained in the fifth layer. This hierarchical feature extraction method enables the network to learn the texture expression from local to global. Feature decoding and restoration use deconvolution operations. The 4×4 deconvolution kernel gradually restores the image details during upsampling. The added Gaussian noise generates a moderate perturbation through a variance value of 0.1, which not only preserves the original texture features but also introduces random changes. In actual generation, when the noise variance increases to 0.2, it will cause excessive distortion, while when it is less than 0.05, the perturbation effect is not obvious. During the gray value remapping stage, 128-level histogram equalization highlights the details in different gray intervals while maintaining the overall contrast of the image. Piecewise linear transformation realizes non-uniform mapping of gray values by dynamically adjusting the slope. Larger slope values (close to 2) enhance the contrast in the high-gray region, while smaller slope values (close to 0.5) weaken the changes in the low-gray region. The discriminator network adopts a design with gradually increasing channel numbers from 64 to 512. Shallow feature maps retain more spatial details, while deep feature maps focus on semantic feature extraction.In the calculation of structural similarity, when the adversarial loss value first drops below 0.3, the generated image is already visually difficult to distinguish from the real sample. In the quantitative evaluation of artifact intensity, the local variance reflects the degree of gray-scale fluctuation within a 16×16 image block. The variance threshold is linked to the image mean to ensure the self-adaptability of the evaluation criteria. For typical artifact regions on the masonry surface, their local variance is usually 2 to 3 times that of non-artifact regions. In a measured wall image segment, the average local variance of the artifact region reached 150, while that of the normal region was only 45. During the non-uniform enhancement process, the enhancement coefficient is directly proportional to the artifact intensity value. Regions with higher intensity values, such as those where the local variance exceeds 1.5 times the threshold, receive a greater enhancement amplitude. This differential processing makes the generated samples closer to the real artifact distribution law in terms of visual performance. In practical applications, when the maximum enhancement coefficient is set to 1.8, the enhanced image still maintains a good sense of reality.
[0027] Step S104: Input the generated artifact image sample into the discriminator. According to the cross-entropy loss function, calculate the similarity between the generated artifact and the real defect. If the similarity does not reach the preset standard, update the parameters of the generator through backpropagation until the similarity between the generated artifact and the real defect reaches the preset standard.
[0028] After extracting the features of the artifact sample image using a convolutional neural network, extract the local significant features through the max-pooling layer to obtain a second feature map containing texture complexity, edge sharpness, and gray-scale distribution uniformity; calculate the Euclidean distance value between the second feature map and the real defect sample feature map, and obtain the similarity score through the min-max normalization method; if the similarity score is less than the similarity score threshold and the number of iterations is less than the iteration number threshold, update the generator parameters using the momentum method and then regenerate the artifact sample, and obtain the generator parameter combination that meets the discrimination standard according to the generator parameter matrix at the end of the iteration.
[0029] Specifically, a discriminator is built using a seven-layer convolutional neural network. The size of the convolutional kernel is set to 3×3, and the number of channels in each layer is 64, 128, 256, 512, 256, 128, and 64 in sequence. The rectified linear unit is used as the activation function. The generated artifact sample image is input into the discriminator to obtain the first feature map. For the first feature map, local significant features are extracted through a max-pooling layer. The pooling window is set to 2×2, and three types of features, namely the texture complexity, edge sharpness, and gray-scale distribution uniformity of the artifact region, are extracted to obtain the second feature map. The Euclidean distance is calculated based on the second feature map and the feature map of the real defect samples. The min-max normalization method is used to map the distance value to the interval from zero to one, and a similarity scoring function is established to obtain the first similarity score. The cross-entropy function is used to calculate the loss value between the first similarity score and the ideal score. The gradient of each layer parameter of the generator is calculated through the backpropagation algorithm, and the learning rate is set to 0.001 to obtain the first parameter gradient matrix. The parameters of the generator are updated according to the first parameter gradient matrix, and the momentum method is used for gradient correction with the momentum coefficient set to 0.9 to obtain the updated generator parameter matrix. The updated generator parameter matrix is used to regenerate the artifact samples, and the similarity score of the new samples is calculated. If the score is less than 0.8 and the number of iterations is less than 500, then the extraction of local significant features is returned; otherwise, the iteration stops. The generator parameter matrix at the end of the iteration is recorded, and the generator is configured with parameters according to this parameter matrix to obtain a combination of generator parameters that meets the discrimination criteria. The seven-layer convolutional network structure of the discriminator adopts a symmetric design, and the number of channels first increases and then decreases to form a changing trend of 64-512-64. This design reduces the number of parameters while maintaining the feature extraction ability. In actual operation, the number of network parameters is reduced from the original 12 million to 8 million. Under the 3×3 small convolutional kernel, the receptive field gradually expands with the number of layers, enabling the network to simultaneously focus on local details and global features. Three key indicators are concerned in the feature extraction process. The texture complexity is calculated through the second moment of the gray-level co-occurrence matrix, and the numerical range is usually between 0.2 and 0.8. A larger value indicates rich texture. The Sobel operator is used to calculate the gradient intensity for the edge sharpness, and the gradient value in a typical clear edge region is above 50. The gray-scale distribution uniformity is measured by the peak-valley ratio of the histogram, and the peak-valley ratio in a uniform region is close to 1. The Euclidean distance is used for similarity scoring to calculate the feature difference. In actual measurement, the original distance values between the real defect samples and the generated samples are distributed between 5 and 20, and it is easier to discriminate after mapping to the interval from 0 to 1 through min-max normalization. In loss calculation, the cross-entropy function imposes a stronger penalty on larger error regions, prompting the generator to focus on optimizing these regions. The gradient descent method with momentum is used for parameter update. The learning rate is set to 0.001 to avoid oscillation, and the momentum coefficient of 0.9 helps to get through the local optimum. In a certain group of experiments, the initial similarity score was only 0.3, and it reached 0.82 after 250 rounds of iteration, exceeding the termination threshold of 0.8.During the iterative process, it was observed that the improvement was relatively fast in the first 100 rounds, and the similarity increased from 0.3 to 0.7. Subsequently, the improvement speed slowed down. For the artifact generation experiment on a certain section of the concrete wall surface, the original image contained 3 crack areas with an area exceeding 100 square centimeters. The similarity of the initial generation result evaluated by the discriminator was only 0.35. The main differences were reflected in the relatively low texture complexity, with 0.3 compared to 0.6 of the real sample, and insufficient edge sharpness, with a gradient mean of 35 compared to 65 of the real sample. Through iterative optimization, the texture complexity of the final generation result was increased to 0.58, the edge gradient mean reached 60, and the overall similarity reached 0.85. The generated artifact area was visually indistinguishable from the real defect. This result verified the effective recognition ability of the discriminator for artifact features and the accuracy of the generator parameter optimization.
[0030] Step S105: According to the energy distribution law of wavelet coefficients, compare the statistical characteristic differences between the generated artifacts and real defects at different scales and directions. If the energy of the generated artifacts at the preset scale and direction is significantly higher or lower than the energy of the real defects at this scale and direction, and exceeds the set threshold range, it is determined that the energy of a specific sub-band exceeds the set range, and then the generator is adjusted to add a feature enhancement layer corresponding to the scale.
[0031] For the generated artifact image and the real defect image, the Haar wavelet transform is used to obtain the high-frequency coefficient matrix and the low-frequency coefficient matrix. The sum of the squares of the wavelet coefficients is calculated according to the coefficient matrix to obtain the first energy distribution matrix; according to the first energy distribution matrix, the energy ratio is calculated using the min-max normalization method, and the local fluctuation is eliminated by the sliding window averaging method to obtain the second energy distribution matrix; for the abnormal scales in the second energy distribution matrix where the ratio exceeds the preset interval, wavelet packet transform is performed, and the maximum inter-class variance method is used to calculate the adaptive threshold to obtain the frequency band adjustment matrix; a feature enhancement layer is constructed according to the frequency band adjustment matrix, and the deconvolution operation is used to enhance the generator feature map, and the original feature information is retained through residual connection to obtain the enhanced feature map.
[0032] Specifically, the generated artifact image and the real defect image are decomposed four times using the Haar wavelet transform to obtain the high-frequency coefficient matrices and the low-frequency coefficient matrix in the horizontal, vertical, and diagonal directions respectively. For each matrix, the sum of the squares of the wavelet coefficients is calculated to obtain the first energy distribution matrix. According to the first energy distribution matrix, the minimum-maximum normalization method is used to calculate the energy ratio of the generated artifacts and real defects at each scale, and the local fluctuations are eliminated by the sliding window averaging method to obtain the second energy distribution matrix. For the abnormal scales in the second energy distribution matrix where the ratio exceeds the preset range of 0.8 to 1.2, the wavelet packet transform is used to subdivide into eight frequency bands to obtain the third energy distribution matrix. According to the third energy distribution matrix, the Otsu method is used to calculate the adaptive threshold, and the frequency bands exceeding the threshold are marked to obtain the frequency band adjustment matrix. A feature enhancement layer is constructed for the frequency band adjustment matrix, and the last layer feature map of the generator is enhanced by the deconvolution operation with a stride of 2, and the deconvolution kernel size is set to 4×4. The rectified linear unit with a leakage parameter of 0.2 is used to activate the enhanced features, and the original feature information is retained through the residual connection to obtain the enhanced feature map. The artifact image is regenerated according to the enhanced feature map, and the updated energy distribution is calculated using the wavelet transform to verify whether the energy of the abnormal frequency band converges within the preset range. During the generation of artifacts on the masonry surface, the four-layer Haar wavelet transform decomposition reveals the frequency characteristics of the image at different scales. Each layer of decomposition divides the image into high-frequency and low-frequency components. The first layer of decomposition mainly captures fine textures, and the energy values are usually between 100 and 200, while the fourth layer of decomposition reflects the large-scale structural features, and the energy values drop to the range of 20 to 50. The calculation of the sum of the squares of the wavelet coefficients reflects the energy distribution law in different directions. Taking a section of concrete wall as an example, the average high-frequency energy of the real defect image in the horizontal direction is 150, 120 in the vertical direction, and 80 in the diagonal direction. This uneven distribution reflects the main direction of the crack. The initial energy values of the generated artifacts in the corresponding directions are 220, 90, and 65 respectively, and the energy ratios obtained after normalization are 1.47, 0.75, and 0.81 respectively. The sliding window averaging method uses a window size of 16×16 to eliminate local fluctuations. The processed energy ratios show that the horizontal direction seriously exceeds the standard and requires fine analysis through the wavelet packet transform. The wavelet packet transform divides the abnormal scale into 8 frequency bands, and the frequency ranges are 0-1 / 8, 1 / 8-2 / 8 until 7 / 8-1. The energy anomalies are mainly concentrated in the two frequency bands of 2 / 8-3 / 8 and 3 / 8-4 / 8, and the spatial scales corresponding to these frequency bands are about 1 / 4 to 1 / 3 of the original image. The adaptive threshold calculated by the Otsu method is 0.85. The frequency bands exceeding the threshold are marked as 1 in the frequency band adjustment matrix, and other frequency bands are marked as 0. For the frequency bands marked as 1, the 4×4 deconvolution kernel performs feature enhancement under the condition of a stride of 2. This configuration maintains the feature continuity while avoiding over-amplifying local details.The rectified linear unit with a leakage parameter of 0.2 allows negative value information to be transmitted at a ratio of 0.2, enhancing the feature expression ability. 80% of the original feature information is retained through residual connection, avoiding information loss during the enhancement process. In actual processing, after the feature enhancement of a certain wall image, the energy ratio in the horizontal direction drops from 1.47 to 1.05, successfully converging to the preset interval, while the energy ratios in the vertical and diagonal directions only fluctuate slightly, being adjusted to 0.78 and 0.83 respectively. The optimized artifact image is closer to the real defect in visual performance, with a more natural texture transition, more coordinated edge features, and a significantly reduced difference in frequency characteristics from the real sample. This feature enhancement method based on energy distribution not only maintains the overall style of the artifact but also precisely adjusts the local detail features.
[0033] Step S106: Obtain the annotation information and texture features of the real defect image, construct a Markov random field model, extract the structured prior information of the defect area through the Markov random field model, and dynamically adjust the weights of the discriminator according to the difference between the structured prior information extracted by the Markov random field model and the structured information of the artifact image generated by the generator.
[0034] The gray-level co-occurrence matrix is used to calculate three types of statistical features, namely contrast, correlation, and entropy value, for the real defect image, and a first feature matrix is constructed based on the statistical features; the node potential energy and edge potential energy are calculated according to the first feature matrix, where the node potential energy is obtained through the average value of the gray-level difference between the node and its eight-neighbor nodes, and the edge potential energy is obtained through the Euclidean distance of the feature vectors of adjacent nodes, to obtain a first potential energy matrix; a Gibbs distribution function is constructed according to the first potential energy matrix, and the node probability distribution is calculated through the Gibbs distribution function, and after normalization, a first probability matrix is obtained; a second potential energy matrix is constructed for the artifact image, and the node probability distribution is calculated according to the second potential energy matrix to obtain the second probability matrix, and the divergence between the first probability matrix and the second probability matrix is calculated through the Kullback-Leibler divergence; for the regions where the divergence exceeds the preset threshold, the weights of the corresponding convolutional layer of the discriminator are adjusted.
[0035] Specifically, annotation information and texture features are extracted from real defect images. The gray-level co-occurrence matrix is used to calculate three types of statistical features: image contrast, correlation, and entropy value. The image grid is divided according to the annotation area into 16×16 pixels, and the center points of the grids are used as Markov random field nodes. The eight-neighborhood connection relationship between the nodes is constructed to obtain the first feature matrix. A Markov random field is constructed for the first feature matrix. The potential energy of each node is calculated by the average value of the gray-scale difference between the node and its surrounding eight neighborhood nodes, and the edge potential energy between the nodes is calculated by the Euclidean distance of the feature vectors of adjacent nodes to obtain the first potential energy matrix. According to the first potential energy matrix, a Gibbs distribution function is constructed to calculate the probability distribution of each node, and after normalization, the first probability matrix is obtained. For the artifact image generated by the generator, node features are extracted using the same grid division method, and a second potential energy matrix is constructed. The second potential energy matrix is used to calculate the node probability distribution of the artifact image, and after normalization, the second probability matrix is obtained. The Kullback-Leibler divergence is used to calculate the difference between the first probability matrix and the second probability matrix, and the preset threshold is set to 0.3. For the area where the difference exceeds the preset threshold, the weights of the corresponding convolutional layer of the discriminator are adjusted, and the weight adjustment amplitude is set to 0.5 times the difference, and the weight adjustment range is limited between 0.5 and 2. During the construction of the Markov random field, the 16×16 pixel grid division method ensures the effective capture of defect features while maintaining computational efficiency. Taking a section of concrete wall as an example, when the width of the defect area is between 20 and 30 pixels, this grid size enables each node to contain sufficient local feature information. The statistical features extracted by the gray-level co-occurrence matrix reveal the texture characteristics of the defect area. Among them, the contrast reflects the gray-scale difference between adjacent pixels, and the value is usually between 15 and 25. The correlation represents the directionality of the texture, and the value is close to 0.8 in the crack area. The entropy value reflects the complexity of the texture, and it is usually between 4.5 and 5.5 in the defect area. The eight-neighborhood connection relationship establishes the spatial dependence between the nodes. In practical applications, the nodes in the crack area show obvious correlation with their neighborhood nodes. The calculation of node potential energy shows that the average value of the gray-scale difference of the internal nodes in the defect area is about 30, while that of the edge nodes reaches more than 45. The edge potential energy reflects the difference between the feature vectors. The edge potential energy values inside the defect area are generally lower than those in the edge area. The Gibbs distribution function converts the potential energy value into a probability distribution. In the real defect image, the probability values of the nodes in the defect area are concentrated between 0.7 and 0.9, while those in the background area are between 0.2 and 0.4. In the initially generated artifact image by the generator, the difference in this probability distribution is not obvious enough, and the gap between the probability values inside and outside the area is small, only fluctuating between 0.4 and 0.6. The calculation of the Kullback-Leibler divergence shows that the difference in the probability distribution between the initially generated artifact image and the real defect reaches 0.45, far exceeding the preset threshold of 0.3.In this case, the weight adjustment of the corresponding layer of the discriminator is particularly crucial. During the weight adjustment process, if the difference degree of a certain area is 0.4, the weight adjustment amplitude is 0.2, and the actual adjusted weight coefficient changes from the original 1.0 to 1.2. In a set of experimental data, the recognition accuracy of the discriminator after weight adjustment for the artifact area has been significantly improved, and the difference degree has been reduced to 0.25, which is lower than the preset threshold. The adjusted probability distribution is closer to the true defect characteristics. The probability value distribution of the nodes in the artifact area tends to be between 0.65 and 0.85, while that in the background area remains between 0.25 and 0.45. This distribution feature highly coincides with the statistical law of true defects.
[0036] Step S107: Use the trained generator as an image enhancement preprocessing module, input the image of the surface of the masonry structure to be detected, remove artifacts and enhance the edges of defects, and perform classification and recognition by combining wavelet features to identify the quality defects on the surface of the masonry structure.
[0037] Receive the image of the surface of the masonry structure to be detected, obtain the image residual through the preprocessing of the generator, use non-local mean filtering to eliminate the background noise according to the image residual to obtain an enhanced image with background noise eliminated; according to the enhanced image with background noise eliminated, perform morphological dilation and erosion operations using a multi-scale diamond-shaped structural element, and obtain an enhanced image with defect edge information extracted by extracting the defect edge information; for the enhanced image with defect edge information extracted, use the Sobel operator to extract the edge gradients in the horizontal and vertical directions, calculate the edge response map according to the edge gradients, and then perform Haar wavelet decomposition to obtain the high-frequency sub-band coefficients in the horizontal, vertical, and diagonal directions; construct a feature vector according to the high-frequency sub-band coefficients and obtain the classifier parameter matrix through support vector machine training; identify the quality defects on the surface of the masonry structure in the image to be detected according to the classifier parameter matrix.
[0038] Specifically, the surface image of the masonry structure to be detected is preprocessed by a generator. The image residual is calculated through backpropagation. Non-local mean filtering with a search window size of seven by seven and a similarity window size of three by three is used to eliminate background noise. An adaptive threshold is set according to twice the mean value of the image gradient to remove the artifact area and obtain the first enhanced image. For the first enhanced image, the image gradient is calculated, and morphological dilation and erosion operations are performed using diamond-shaped structural elements with three scales from three by three to seven by seven to extract the defect edge information and obtain the second enhanced image. According to the edge information of the second enhanced image, Sobel operators are used to extract the edge gradients in the horizontal and vertical directions, and the edge response map is calculated through the gradient magnitude and direction to obtain the third enhanced image. The third enhanced image is decomposed by three-layer Haar wavelet transform, the high-frequency subband coefficients in the horizontal, vertical, and diagonal directions are extracted, and the variance, energy, and entropy values of each subband are calculated to construct a nine-dimensional feature vector to obtain the first feature matrix. The first feature matrix is normalized by the min-max normalization method, and dimensionality reduction is performed by the principal component analysis method to obtain the second feature matrix. A feature space is constructed according to the second feature matrix, and a support vector machine with a penalty parameter of one and a Gaussian kernel bandwidth of the median of the feature variance is used for training to establish a classification boundary and obtain the classifier parameter matrix. According to the classifier parameter matrix, the image to be detected is recognized, and the defect severity level is divided according to the distance from the classification boundary. The distance greater than 0.8 is a severe defect, the distance between 0.3 and 0.8 is a moderate defect, and the distance less than 0.3 is a minor defect. In the detection of surface quality defects of masonry structures, non-local mean filtering is performed in the image preprocessing stage using a 7×7 search window and a 3×3 similarity window. The larger search window ensures sufficient search for similar regions, while the smaller similarity window retains the detail features. In practical applications, for the concrete wall image, this parameter configuration reduces the background noise standard deviation from the original 12 to 4.5 while maintaining the clarity of the defect edges. The morphological operation uses diamond-shaped structural elements with three scales, gradually increasing from 3×3 to 7×7. This multi-scale processing method adapts to crack features of different widths. In a measured brick wall section, a fine crack with a width of 5 pixels is enhanced by the 3×3 structural element, while a larger crack with a width of 15 pixels is completely extracted by the 7×7 structural element. The edge gradient extraction uses Sobel operators to calculate the gradient values in the horizontal and vertical directions respectively. The measured data shows that the gradient magnitude in the defect edge region is usually between 45 and 75, while it is only between 15 and 25 in the normal region. Through the statistics of the gradient direction, it is found that the crack direction shows obvious directionality, and the direction gradient of vertical cracks is concentrated in the range of 80 degrees to 100 degrees. The three-layer Haar wavelet transform generates 9 high-frequency subbands, and each subband reflects the texture features in a specific direction and scale.The subband variance reflects the uniformity of the texture. The subband variance value in the defective area is usually 3 to 5 times that in the normal area. The subband energy reflects the edge intensity. The energy value in the severely defective area can reach more than 2 times that in the slightly defective area. The entropy value quantifies the complexity of the texture. The entropy value in the defective area is usually between 5.5 and 6.5. Through principal component analysis, the 9-dimensional features are reduced to 4 dimensions, and the cumulative contribution rate reaches 92%, effectively reducing feature redundancy. In support vector machine classification, the Gaussian kernel bandwidth is selected as the median of the feature variance, approximately 0.8, and the penalty parameter is set to 1, avoiding overfitting while maintaining classification accuracy. In actual measurement, for 100 groups of samples to be detected, this parameter configuration achieves a classification accuracy of 93%. The distance relationship from the classification boundary is highly correlated with the actual degree of the defect. The verification data shows that for samples with a distance greater than 0.8, the average crack width exceeds 2 mm and the length exceeds 20 cm; for samples with a distance between 0.3 and 0.8, the crack width is between 0.5 and 2 mm; samples with a distance less than 0.3 mainly show fine surface cracks with a width less than 0.5 mm.
[0039] The above embodiments are only one of the preferred embodiments of the present invention and should not be used to limit the protection scope of the present invention. Any meaningless changes or polish made on the main design concept and spirit of the present invention, as long as the technical problems solved are still consistent with the present invention, should be included in the protection scope of the present invention.
Claims
1. A method for identifying engineering construction quality defects based on artificial intelligence, characterized in that: The method comprises: Obtain a surface image dataset of the target engineering structure, annotate crack defects and mortar artifact areas on the surface of the masonry structure, and construct an initial sample set with diverse artifact morphologies and relatively concentrated defect distribution; The multi-scale decomposition method of wavelet transform is used to process the image data in the initial sample set, extract the directional information and periodic characteristics of the image texture under different frequency sub-bands, and obtain the richness of the artifact texture details and the sharpness of the defect edge; A generative adversarial network is constructed based on the initial sample set and the annotation results. The surface texture features of the masonry structure extracted from the initial sample set are input into the generator as prior information to generate artifact image samples with inconsistent artifact intensity and large grayscale value changes. The generated artifact image samples are input into the discriminator, and the similarity between the artifact and the real defect is generated according to the cross entropy loss function. If the similarity does not meet the preset standard, the parameters of the generator are updated by back propagation until the similarity between the generated artifact and the real defect meets the preset standard. According to the energy distribution law of wavelet coefficients, the statistical characteristics of generated artifacts and real defects at different scales and directions are compared. If the energy of generated artifacts at the preset scale and direction is significantly higher or lower than the energy of real defects at the same scale and direction, and exceeds the set threshold range, it is determined that the energy of a specific sub-band exceeds the set range, and the generator is adjusted to add a feature enhancement layer of the corresponding scale; Obtain the annotation information and texture features of the real defect image, build a Markov random field model, extract the structured prior information of the defect area through the Markov random field model, and dynamically adjust the weight of the discriminator based on the difference between the structured prior information extracted by the Markov random field model and the structured information of the artifact image generated by the generator; The trained generator is used as an image enhancement preprocessing module. The surface image of the masonry structure to be detected is input. By removing artifacts and enhancing defect edges, combined with wavelet features, classification and recognition are performed to identify the quality defects on the surface of the masonry structure.
2. The method according to claim 1, characterized in that The method of obtaining a surface image dataset of a target engineering structure, annotating crack defects and mortar artifact areas on the surface of the masonry structure, and constructing an initial sample set with diverse artifact morphologies and relatively concentrated defect distribution includes: Acquiring high-resolution image data of the engineering surface area, wherein the high-resolution image data is processed by an illumination compensation algorithm to obtain first standardized image data; Extracting gray values of the mortar region in the first standardized image data, obtaining a mortar artifact region by using a region growing method, and obtaining second feature data after a morphological operation of the mortar artifact region; Positioning the crack region according to the crack edge gradient value in the first standardized image data, wherein the crack edge gradient value is processed by a morphological thinning algorithm to obtain third feature data; Density clustering is performed on the crack distribution coordinates in the third characteristic data, and the crack distribution coordinates are fitted by the least squares method to obtain the fourth characteristic data. A characteristic vector matrix is constructed according to the second characteristic data, the third characteristic data and the fourth characteristic data to form an annotated initial sample set.
3. The method according to claim 1, characterized in that The multi-scale decomposition method using wavelet transform processes the image data in the initial sample set, extracts the directional information and periodic characteristics of the image texture under different frequency sub-bands, and obtains the richness of the artifact texture details and the sharpness of the defect edge, including: The Haar wavelet basis function is used to perform three-layer wavelet transform decomposition on the initial sample set image to obtain high-frequency sub-band data and low-frequency sub-band data; A three-layer scale texture decomposition image is reconstructed according to the high-frequency sub-band data and the low-frequency sub-band data, and a gray-level co-occurrence matrix is used to calculate the first feature data consisting of contrast, correlation, uniformity and entropy value for the texture decomposition image; Using three-layer wavelet transform subband coefficients to calculate energy distribution values in horizontal, vertical and diagonal directions, and obtaining second feature data through the energy distribution values; A feature vector is constructed according to the first feature data and the second feature data, a Gaussian kernel function is used to map the feature vector, and a corresponding relationship between a feature score and a defect degree is established through a support vector regression method.
4. The method according to claim 1, characterized in that: The adversarial generative network is constructed based on the initial sample set and the annotation results, and the surface texture features of the masonry structure extracted from the initial sample set are input into the generator as prior information to generate artifact image samples with inconsistent artifact intensity and large grayscale value changes, including: A five-layer convolutional neural network is used to encode the surface texture of the masonry structure. The convolutional neural network calculates the correlation between the masonry texture and the artifact area features through feature mapping to obtain a feature map. A generator network is constructed according to the feature map, wherein the generator network uses five deconvolution layers to decode and restore the features, and obtains a first artifact texture image by feature recombination; Remapping the grayscale values of the first artifact texture image, adjusting the grayscale distribution range by histogram equalization, and adjusting the grayscale values by a piecewise linear transformation function to obtain a second artifact texture image; A discriminator network is constructed according to the second artifact texture image and the real artifact image. The discriminator network calculates the structural similarity between the generated image and the real image to obtain an adversarial loss value. The adversarial loss value is used to iteratively optimize the generator parameters to obtain a third artifact texture image.
5. The method according to claim 1, characterized in that The generated artifact image sample is input into the discriminator, and the similarity between the artifact and the real defect is generated according to the cross entropy loss function. If the similarity does not meet the preset standard, the parameters of the generator are updated by back propagation until the similarity between the generated artifact and the real defect meets the preset standard, including: After using a convolutional neural network to extract features from the artifact sample image, a maximum pooling layer is used to extract local significant features to obtain a second feature map containing texture complexity, edge sharpness, and grayscale distribution uniformity; Calculating the Euclidean distance between the second feature map and the feature map of the real defect sample, and obtaining a similarity score by using a minimum-maximum normalization method; If the similarity score is less than the similarity score threshold and the number of iterations is less than the iteration number threshold, the momentum method is used to update the generator parameters and regenerate the artifact samples, and the generator parameter combination that meets the judgment criteria is obtained according to the generator parameter matrix at the end of the iteration.
6. The method according to claim 1, characterized in that According to the energy distribution law of wavelet coefficients, the statistical characteristics of generated artifacts and real defects in different scales and directions are compared. If the energy of the generated artifacts in the preset scale and direction is significantly higher or lower than the energy of the real defects in the scale and direction, and exceeds the set threshold range, it is determined that the energy of the specific sub-band exceeds the set range, and the generator is adjusted to add a feature enhancement layer of the corresponding scale, including: A Haar wavelet transform is used to obtain a high-frequency coefficient matrix and a low-frequency coefficient matrix for generating an artifact image and a real defect image, and a square sum of wavelet coefficients is calculated according to the coefficient matrix to obtain a first energy distribution matrix; Calculating the energy ratio using the minimum-maximum normalization method according to the first energy distribution matrix, and eliminating local fluctuations using the sliding window averaging method to obtain a second energy distribution matrix; Performing wavelet packet transform on abnormal scales whose ratios in the second energy distribution matrix exceed a preset interval, and using the maximum inter-class variance method to calculate the adaptive threshold to obtain a frequency band adjustment matrix; A feature enhancement layer is constructed according to the frequency band adjustment matrix, a deconvolution operation is used to enhance the generator feature map, and the original feature information is retained through a residual connection to obtain an enhanced feature map.
7. The method according to claim 1, characterized in that The method obtains the annotation information and texture features of the real defect image, constructs a Markov random field model, extracts the structured prior information of the defect area through the Markov random field model, and dynamically adjusts the weight of the discriminator according to the difference between the structured prior information extracted by the Markov random field model and the structured information of the artifact image generated by the generator, including: The gray-level co-occurrence matrix is used to calculate three types of statistical features, namely, contrast, correlation and entropy, of the real defect image, and the first feature matrix is constructed based on the statistical features; Calculate node potential energy and edge potential energy according to the first feature matrix, wherein the node potential energy is obtained by the average grayscale difference between the node and the eight neighboring nodes, and the edge potential energy is obtained by the Euclidean distance between the feature vectors of adjacent nodes, to obtain a first potential energy matrix; Constructing a Gibbs distribution function according to the first potential energy matrix, calculating the node probability distribution by the Gibbs distribution function, and obtaining a first probability matrix after normalization processing; Constructing a second potential energy matrix for the artifact image, calculating the node probability distribution according to the second potential energy matrix to obtain the second probability matrix, and calculating the difference between the first probability matrix and the second probability matrix by Kalman divergence; For areas where the difference exceeds the preset threshold, the weights of the corresponding convolutional layer of the discriminator are adjusted.
8. The method according to claim 1, characterized in that The trained generator is used as an image enhancement preprocessing module, and the surface image of the masonry structure to be detected is input. The quality defects of the masonry structure surface are identified by removing artifacts and enhancing defect edges, combined with wavelet features for classification and identification, including: Receiving a surface image of a masonry structure to be detected, obtaining an image residual through preprocessing by a generator, and eliminating background noise using a non-local mean filter according to the image residual to obtain an enhanced image with the background noise eliminated; According to the enhanced image with background noise eliminated, a multi-scale diamond structure element is used to perform morphological dilation and erosion operations, and an enhanced image with extracted defect edge information is obtained by extracting defect edge information; For the enhanced image from which the defect edge information is extracted, the Sobel operator is used to extract edge gradients in the horizontal and vertical directions, and after calculating the edge response map according to the edge gradient, Haar wavelet decomposition is performed to obtain high-frequency subband coefficients in the horizontal, vertical and diagonal directions; Constructing a feature vector according to the high frequency subband coefficients and obtaining a classifier parameter matrix through support vector machine training; The surface quality defects of the masonry structure in the image to be detected are identified according to the classifier parameter matrix.
Citation Information
Cited By
Automobile injection molding part defect classification method based on database comparison
CN120747643A