A method and system for quantifying microscopic cracks inside 3D printed concrete

By applying the detection methods of the denoising network IADNet and MCR-Former networks of enhanced attention mechanisms in 3D printed concrete, the problem of low accuracy in microscopic crack detection in the prior art is solved, and efficient and accurate microscopic crack quantization measurement is achieved. Improve construction efficiency and safety.

CN118761987BActive Publication Date: 2025-02-14EAST CHINA JIAOTONG UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410906818.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2025-02-14
Estimated Expiration
2044-07-08

AI Technical Summary

Technical Problem

The prior art is difficult to efficiently and accurately detect and quantify microscopic cracks inside 3D printed concrete, especially when the microscopic cracks are irregular in shape, the accuracy is low, which affects construction efficiency and safety.

Method used

Using a detection method based on a variety of deep learning and machine learning improvements, including enhanced attention mechanism denoising networks IADNet and MCR-Former networks, high-precision quantitative measurement of microscopic cracks is achieved through image denoising processing and semantic segmentation algorithms.

Benefits of technology

It realizes stable, real-time and high-precision quantitative measurement of microscopic cracks inside 3D printed concrete, improves construction efficiency and safety, and reduces dependence on manual monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118761987B_ABST
    Figure CN118761987B_ABST
Patent Text Reader

Abstract

The present invention is a method and system for quantifying micro cracks inside 3D printed concrete. The quantification method first uses a denoising network and an enhanced attention mechanism denoising network IADNet before performing relevant standard measurements on micro crack images. IADNet can be used to extract features of micro crack images from different fields of view, perceive noise from multiple levels, and perform denoising, which greatly improves image quality, enhances texture details, and is conducive to training segmentation networks. The use of IADNet in conjunction with a semantic segmentation algorithm has the function of finely identifying image information, can quantify micro crack identification, overcome the shortcomings of 3D printed concrete micro crack measurement and analysis, and improve construction efficiency and quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image semantic segmentation and intelligent construction technology, and in particular to a method and system for quantifying micro cracks inside 3D printed concrete. Background Art

[0002] Micro cracks are common structural damage and one of the threats to the health of concrete building structures. Concrete structures are prone to micro cracks due to factors such as load and environment. These micro cracks allow media such as air to penetrate into the interior of the concrete structure, resulting in a decrease in key parameters such as structural stiffness. When the width of micro cracks is too large, it will accelerate water seepage and corrosion in the structure, thereby weakening the stability of the structure, which may eventually lead to destruction and even natural disasters such as landslides, bringing significant safety risks and economic losses. Therefore, the detection and measurement of micro cracks is crucial in ensuring the safety and quality of concrete structures.

[0003] The use of 3D printing technology has accelerated the manufacturing process, eliminated the need for formwork, reduced material usage, increased design flexibility, and demonstrated the rapid growth potential of the technology for wider application in the construction industry. However, the template-free and extruded filament process of 3D printing poses significant challenges compared to traditional concrete construction. During the manufacturing process of cast concrete, the surface-collected bleeding water limits the evaporation of water in the pores, effectively reducing the shrinkage caused by the formwork. In contrast, due to its unique production process, the materials used in 3D printing technology require more fine particles and a lower water-cement ratio, which reduces bleeding compared to traditional concrete. As a result, the pore water in the printed concrete has been exposed to evaporation conditions for a longer period of time, increasing the loss of pore water and overall shrinkage. Therefore, 3D printed concrete is more susceptible to microcracks. Traditional analysis methods for microcracks are mainly based on visual inspection of SEM images, heavily relying on manual labor, and greatly relying on the experience of the observer. Other more advanced analysis methods are semi-automatic methods that involve equipment assistance, but still lack in providing automatic detection and quantification capabilities.

[0004] Image segmentation technology is widely used in fields such as computer vision and natural language processing. Applying this technology to the detection of micro cracks inside 3D printed concrete is an ideal intelligent detection method, which can realize real-time quality monitoring and quantitative analysis of micro cracks. However, although the traditional micro crack recognition network can accurately locate the micro crack image, it has a low accuracy rate when detecting micro cracks, especially when the micro cracks are irregular in shape, so its guiding role in actual engineering is limited. Therefore, for the micro cracks inside 3D printed concrete, it is urgent to adopt a stable, real-time, and high-precision semantic segmentation algorithm for monitoring and measurement. In recent years, the development of image analysis methods based on multiple deep learning has provided a new way to solve this problem. The present invention proposes a new quantitative method for detecting micro cracks inside 3D printed concrete based on multiple deep learning and machine learning improvements. Summary of the invention

[0005] The purpose of the present invention is to overcome the shortcomings of the above technologies and provide a method and system for quantifying micro cracks inside 3D printed concrete. The method has high stability, good real-time performance, and can achieve high-precision quantitative measurement of micro cracks inside 3D printed concrete.

[0006] In order to solve the above technical problems, the technical solution of the present invention is:

[0007] In a first aspect, the present invention provides a method for quantifying micro cracks inside 3D printed concrete, the quantification method comprising the following contents:

[0008] 1. Preparation of Microscopic Crack Image Dataset

[0009] The defect image data of the printing area of ​​3D printed concrete is obtained using a BSE electron microscope to form a micro crack image dataset, which includes micro crack images of 3D printed concrete, micro crack images of non-3D printed concrete, and images of concrete without micro cracks;

[0010] 2. Enhanced Attention Mechanism Denoising Network IADNet Processing

[0011] An enhanced attention mechanism denoising network IADNet is constructed, wherein the enhanced attention mechanism denoising network IADNet includes a sparse module SB, a feature enhancement module FEB, an attention module AB and a restoration module RB.

[0012] The sparse module SB includes five convolutional layers and four dilated convolutional layers, each layer includes a Leaky ReLU function stacked with a convolution or dilated convolution, and the connection order is convolutional layer - dilated convolutional layer - two convolutional layers - two dilated convolutional layers - two convolutional layers - dilated convolutional layer;

[0013] The feature enhancement module FEB includes a convolution layer, a convolution operation, a compression splicing operation, a convolution operation and a bi-tangent activation function connected in sequence; the output result of the sparse module SB is used as the input of the feature enhancement module FEB;

[0014] The attention module AB includes a 1×1 convolution operation and a vector dot multiplication operation. The input of the 1×1 convolution operation is connected to the output of the feature enhancement module FEB after the double tangent activation function is processed. The feature obtained by the 1×1 convolution operation is used as a weight vector to perform a vector dot multiplication operation with the output of the first convolution operation in the feature enhancement module FEB; the output of the vector dot multiplication operation is connected to the restoration module RB to obtain an output denoised image;

[0015] The micro crack image dataset is used to train the enhanced attention mechanism denoising network IADNet, and the trained enhanced attention mechanism denoising network IADNet is used to denoise the image and construct a crack segmentation dataset;

[0016] 3. Constructing MCR-Former network to realize quantitative measurement of micro crack images

[0017] The MCR-Former network includes a path module, and the input image is passed through the path module to extract the feature F to complete the path embedding. After that, the feature F is clustered using the clustering module to obtain the prototype feature G, and a parallel structure including two heterogeneous operators, the initial learning PH and the pixel enhancement symbol PM, is constructed; the initial learning PH is used to capture the favorable frequency components in G to obtain the initial representation G'; the pixel enhancement symbol PM is a CNN-based pixel enhancer, through which the prototype representation G' is restored to obtain the feature F' of the next stage; the clustering module and the parallel structure are repeated in four groups and connected in sequence; then, the convolution layer is used for filtering again to make the features recognized by the network more obvious, and then simplified by group normalization, and then processed by the ReLU activation function, and finally a convolution layer is used as a classification layer (CLS) of single-scale features to output the segmented image;

[0018] The MCR-Former network is trained using the crack segmentation dataset;

[0019] The trained IADNet is used for denoising in advance, and then the image is input into the trained MCR-Former neural network to obtain the micro-crack segmentation result, based on which the micro-crack width is further calculated.

[0020] The process of constructing the crack segmentation dataset is as follows: after all the microscopic crack image datasets have been denoised by IADNet, the MSR algorithm is used for data enhancement:

[0021] ①Perform log transformation on the image; ②Perform Gaussian blur on the log image to obtain the low-frequency information part; ③Differentiate the original image and the blurred log image to obtain image Q;

[0022] The original image R, G, B three dimensions are respectively subjected to ①②③ operations. The difference is that in ②, the Gaussian blur selection sets the sigmoid parameter to 15, 80, and 200 respectively. Finally, the results of ①②③ operations on the three dimensions are weighted averaged, and then the three dimensions are combined and the data is scaled to 0-255 to obtain the crack segmentation dataset R * ;

[0023] The crack segmentation dataset R * The datasets are divided into training and validation datasets and test datasets in a ratio of 9:1 for training the MCR-Former network.

[0024] The MCR-Former outputs the category to which each pixel of the input image belongs, achieving semantic segmentation;

[0025] Based on the micro crack segmentation results of MCR-Former, high-precision measurement of micro crack width is achieved by combining bilateral filtering, morphological processing, Canny edge detection, k+1-means clustering, and eight-direction search method. The overall steps are as follows:

[0026] 1) Using bilateral filtering, firstly, Gaussian blur is used to remove interfering pixels and retain the real micro crack information;

[0027] 2) Then, the micro cracks are refined by morphological processing to obtain a single-pixel micro crack skeleton map. At this time, all pixel values ​​in the micro crack skeleton map are 0 or 1, which is a micro crack skeleton binary map, called a single-pixel micro crack skeleton map; the Canny edge detection algorithm is used to find the image edge and obtain the micro crack edge map by calculating the gray gradient of the single-pixel micro crack skeleton map, and the micro crack edge map obtained by the Canny edge detection is logically ANDed with the single-pixel micro crack skeleton map pixel by pixel;

[0028] 3) k+1-means clustering:

[0029] Select k+1 cluster center points from the results of the logical AND operation, take the k+1th cluster center point as the comparison parameter, and calculate the variance with the results of the first k cluster centers, further enhance the data representation for optimization calculation, and obtain the optimal result. The specific steps are:

[0030] Step 3-1: Randomly initialize k+1 points in the input image set, and select k points as the initial target center points of the k+1-means algorithm;

[0031] Step 3-2: Use the Euclidean distance calculation formula to calculate the geometric distance from the given image set to the initialization target center point;

[0032] Step 3-3: Assign each data point to the nearest cluster according to the principle of shortest distance;

[0033] Step 3-4: Calculate the geometric center of each cluster in the new round. The calculation formula is as follows:

[0034]

[0035] Where P x , P y Respectively represent the horizontal and vertical coordinates of the geometric center point to be calculated for the current cluster; P ix , P iy They represent the horizontal and vertical coordinates of the i-th point in the current cluster respectively; p represents the number of points in the current cluster;

[0036] Use the geometric center of the sample data in each cluster as the cluster center of the new classification;

[0037] Step 3-5: Repeat steps 3-2, 3-3 and 3-4 until the algorithm converges, that is, the center point no longer changes, and output the clustering result;

[0038] Step 3-6: Optimize the obtained clustering results, and use the obtained k center points and the k+1th center point to take the variance. The formula is:

[0039]

[0040] Among them, x k+1 represents the coordinates of the k+1th center point, x j (j=1,2,…k) represents the coordinates of the kth cluster center. Select the cluster center with the smallest variance and find the optimal cluster center;

[0041] Find the optimal clustering result;

[0042] 4) Skeleton extraction: Perform skeleton extraction on the result after k+1-means clustering. The specific skeleton extraction process is as follows:

[0043] Loop through all foreground pixels and mark for deletion those that meet any of the following conditions:

[0044] 2≤N(F1)≤6

[0045] S(F1)=1

[0046] F2F4F6=0

[0047] F4F6F8=0

[0048] F2F4F8=0

[0049] F2F6F8=0

[0050] Where N(F1) represents the number of foreground pixels among the 8 pixels adjacent to F1, S(F1) represents the cumulative number of 0-1 appearing in F2-F9-F2 pixels, where 0 represents background and 1 represents foreground; F represents pixel; the complete pixel position distribution of F1-F9 is:

[0051] <![CDATA[F9]]> <![CDATA[F2]]> <![CDATA[F3]]> <![CDATA[F8]]> <![CDATA[F1]]> <![CDATA[F4]]> <![CDATA[F7]]> <![CDATA[F6]]> <![CDATA[F5]]>

[0052] Until no pixel is marked as deleted, the output result is the skeleton image after the binary image is refined;

[0053] 5) Calculate the micro crack width using the eight-direction search method:

[0054] For the skeleton image after binary image refinement, each micro crack point is used as the initial target center point for width measurement, and an eight-direction search is performed in the skeleton image after binary image refinement extracted from the initial target center point; if it is a micro crack point, the number of pixels in that direction is increased by 1 until the micro crack boundary is reached, and the number of micro crack pixel points in the eight directions of "0°, 45°, 90°, 135°, 180°, 225°, 270°, 315°" where a center point is located is counted respectively, and recorded as n1, n2, n3, n4, n5, n6, n7, n8; the number of micro crack points in the four groups of directions of 0° and 180°, 45° and 225°, 90° and 270°, and 135° and 315° are merged, and the merging method is: d1=n1+n5, d2=2 1 / 2 (n2+n6), d3=n3+n7, d4=2 1 / 2 (n4+n8), take D=min{d1,d2,d3,d4}, and record the direction in which D is obtained, where d1, d2, d3, d4 are the number of pixels in the directions of the four merged straight lines respectively, calculate w=w0×D, where w0 is the actual physical size represented by each pixel, and w is the actual width of the micro crack under the center point of the target; update to the next center point until the widths at all center points are measured.

[0055] Furthermore, a measurement parameter threshold is set. If the MCR-Former network identifies a micro crack defect image and the micro crack width is greater than the measurement parameter threshold, printing is stopped to check the material status; if it does not exceed the measurement parameter threshold range, the printed material is qualified.

[0056] Furthermore, when the training of the enhanced attention mechanism denoising network IADNet is completed, the PSNR peak signal-to-noise ratio value of the denoising evaluation effect is not less than 32.169db, and the SSIM structural similarity value is not less than 0.89.

[0057] Furthermore, a point-by-point convolution-feedforward neural network (PT-FFN) is introduced into the parallel structure of the MCR-Former network, including an input layer, a Depthwise convolution layer, a ReLU activation function, a GN group normalization layer, a Pointwise convolution layer, a ReLU activation function, a GN group normalization layer, an Average Pooling layer, a fully connected layer, and an output layer connected in sequence; and the sum of the first GN group normalization layer and the second GN group normalization layer is used as the input of the Average Pooling layer;

[0058] The convolution kernel size of the Pointwise convolution layer is 1×1.

[0059] Furthermore, the sparse module SB in the enhanced attention mechanism denoising network IADNet has a total of nine layers, the first, third, fourth, seventh, and eighth layers are set as convolutional layers (convolution Conv+Leaky ReLU) and are regarded as low energy points; the second, fifth, sixth, and ninth layers are regarded as high energy points and are set as dilated convolutional layers (dilated Conv+Leaky ReLU); the convolution filter size of layers 1 to 9 is 3×3, and the input of the first layer is the number of channels c of the input noise image. If the given noise image is in color, c is 3; otherwise, c is 1;

[0060] The feature enhancement module FEB has five levels, including three types: Conv+Leaky ReLU, Conv, and hyperbolic tangent activation function Tanh; the convolution layer of Conv+Leaky ReLU is applied to the tenth layer of IADNet, and its output size is 64×3×3×64; the output size of the eleventh layer of IADNet is adjusted by Conv convolution to 64×3×3×c; finally, the network initial input and the output of the eleventh layer are concatenated by Concat compression and splicing operation and then processed by Conv convolution operation, and the final output size is 64×3×3×2c, and the obtained features are converted into nonlinear features using Tanh activation function;

[0061] The input size of the 1×1 convolution operation of the attention mechanism module AB is 2c×1×1×c.

[0062] In a second aspect, the present invention provides a system for quantifying microscopic cracks inside 3D printed concrete, the system comprising:

[0063] An image acquisition module is used to obtain microscopic crack images of the printing area of ​​3D printed concrete;

[0064] The image processing module is used to segment and annotate the micro crack images of the image acquisition module at the pixel level, add IADNet to pre-process the micro crack images for denoising, and then perform data enhancement to obtain a crack segmentation dataset;

[0065] 3D printed concrete micro crack segmentation model, using MCR-Former neural network to segment micro crack images;

[0066] The width processing and calculation module uses bilateral filtering, morphological processing, Canny edge detection, k+1-means clustering, and eight-direction search method to achieve high-precision measurement of micro crack width and obtain the actual width of micro cracks;

[0067] The micro crack threshold feedback processing module compares the actual width of the micro cracks obtained by the width processing and calculation module with the measurement parameter threshold. When it exceeds the measurement parameter threshold, it is considered that the quality of the produced 3D printed product is unqualified, and feedback is given to stop printing and check the material status; when it does not exceed the measurement parameter threshold, the product is considered qualified.

[0068] In a third aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which can implement the steps of the method when executed by a processor.

[0069] Compared with the prior art, the present invention has the following beneficial effects:

[0070] Before the present invention performs relevant standard measurements on the micro crack image, a denoising network is first used, the enhanced attention mechanism denoising network IADNet, IADNet can be used to extract features of the micro crack image from different fields of view, perceive noise from multiple levels, and perform denoising, greatly improve image quality, enhance texture details, including the problem that hidden features are difficult to find due to the complex background of the image, and the pre-processed micro crack image can provide more feature information, ensure the quality of key parameters, and be conducive to the training of the segmentation network. Avoid image distortion, the so-called image distortion is the loss of image texture details and the loss of intuitive perception of the human eye caused by the loss of information or errors of certain pixels, and improve the accuracy of collecting image data. The use of IADNet in conjunction with the semantic segmentation algorithm has the function of finely identifying image information, can quantify micro crack identification, can overcome the shortcomings of 3D printed concrete micro crack measurement and analysis, improve construction efficiency and quality, reduce the dependence on manual monitoring, and provide a more reliable and safe solution for 3D printed concrete construction.

[0071] The MCR-Former network used in the present invention greatly improves the accuracy of segmentation and prediction, so that the system can achieve real-time and high-precision measurement. Compared with the traditional AFFormer, the convolution layer, GN layer, and nonlinear activation function ReLU are added to perform multi-layer convolution, and feature extraction is performed from both shallow features and deep features. While ensuring the quality of feature information, it also solves the problem of the influence of shallow features on deep features caused by the network layer being too deep, making the model more stable and reliable. And through the stacking and reuse of PT-FFN modules, MCR-Former can effectively learn the spatial relationship and semantic information between features, and improve the accuracy of semantic segmentation. Compared with the traditional DC-FFN module, the PT-FFN module has a lightweight structure, which can reduce the computational complexity of the model, and is suitable for real-time semantic segmentation tasks in resource-constrained environments. It effectively adjusts the number of channels of the image to realize different demand operations of dimensions, and processes the image feature information with low-frequency information and high-frequency information, which greatly ensures the quality of high-frequency information, improves the overall details of the image, ensures the maximum detail texture quality of the image, and enhances the expressiveness of the feature information in the image.

[0072] The present invention first applies a segmentation algorithm to separate micro cracks from the background, and then applies an edge detection algorithm to the segmentation result to extract edge information of the micro cracks. The accuracy of the segmentation algorithm and the edge refinement capability of the edge detection algorithm are fully utilized to obtain more accurate and complete micro crack edges.

[0073] The system of the present invention introduces automation and intelligent technology to improve the accuracy of micro crack measurement of 3D printed concrete. It can be flexibly adjusted according to different printing materials and defect types, including parameters such as the movement speed of the printer nozzle, the discharge speed, and the degree of wetness of the material. Through the feedback mechanism and guiding staff to make adjustments, the system can adapt to a variety of different needs and application scenarios. This high degree of customizability gives the system a wide range of applicability and practicality. It can not only be applied to the quality monitoring of concrete 3D, but also can be extended to other fields, such as surface defect detection in metal 3D printing, medical 3D printing, aviation 3D printing and other fields.

[0074] The system of the present invention provides the possibility of realizing larger-scale architectural-level 3D printing, further promoting the development of this field, has great significance and broad application prospects, and also provides strong support and guarantee for the development of concrete 3D printing technology.

[0075] Compared with the prior art, the system of the present invention adopts image denoising processing technology and improved image segmentation technology to realize quantitative measurement and analysis of micro cracks inside 3D printed concrete. It can accurately and efficiently detect and quantify micro crack defects, providing an effective means to ensure printing quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Figure 1 It is a schematic diagram of the structure of the MCR-Former network in the present invention;

[0077] Figure 2 Schematic diagram of the structure of the initial learning and pixel enhancement operators in the MCR-Former network of the present invention;

[0078] Figure 3 It is a schematic diagram of the structure of the enhanced attention mechanism denoising network IADNet in the present invention;

[0079] Figure 4 Schematic diagram of the structure of the sparse module. DETAILED DESCRIPTION

[0080] In order to more clearly describe the technical problems, technical solutions and advantages of the present invention, the following will be described in detail with reference to the drawings and embodiments. It should be noted that these embodiments are only used to illustrate the principles and application scope of the present invention and should not be regarded as limiting the present invention.

[0081] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0082] The quantification method of micro cracks inside 3D printed concrete of the present invention comprises the following overall methods: preparing a micro crack image data set, using an enhanced attention mechanism denoising network IADNet (Improved Attention-guided Denoising Neural Network) to denoise the micro crack images, and training the denoised high-quality micro crack images in an MCR-Former (Microscopic Cracks Recognition-Former) network to achieve quantitative measurement of the micro crack images.

[0083] The specific steps of the quantification method are:

[0084] 1. Preparation of Microscopic Crack Image Dataset

[0085] The defect image data of the 3D printed concrete printing area was obtained using a BSE electron microscope to form a micro crack image dataset. The micro crack image dataset of this experiment consists of 3,000 3D printed concrete micro crack images, 2,000 non-3D printed concrete micro crack images, and 1,500 non-micro crack concrete images. Each image in the micro crack image dataset is a 512x 512 pixel RGB image. The addition of non-3D printed conventional concrete images is to improve the accuracy and robustness of the training, so that it can more accurately identify 3D printed concrete micro crack images.

[0086] 2. Enhanced Attention-guided Denoising Neural Network (IADNet) processing

[0087] The enhanced attention mechanism denoising network IADNet (ImprovedAttention-guided denoisingconvolutional neuralNetwork) has the following structure: Figure 3 As shown, it includes: a sparse module SB (SparseBlock), a feature enhancement module FEB (Feature EnhancementBlock), an attention module AB (AttentionBlock) and a restoration module RB (Reconstruction Block). The present invention uses an enhanced attention mechanism denoising network IADNet to preprocess the micro crack image, which can well solve the problem that the traditional network model faces some difficulties in processing the micro crack image samples when outputting the micro crack area and measuring the micro crack width, such as: the image itself is not of high quality, the available feature information is fuzzy, and the image noise interferes with the network training. It can also avoid the loss of high-frequency detail information of the micro crack image and reduce the smoothness. It can enhance the micro crack image effect while retaining the intuitive perception of the human eye, so that when the micro crack image is converted from a color image to a grayscale image, more available pixel information is retained, and the loss of image texture details is avoided, which is conducive to the further processing of the micro crack image.

[0088] The input image is denoted as I (i) ∈R h×w×c(h, w, c represent the height, width, and number of channels of the image, respectively) After the sparse module SB (Sparse Block), the sparse module SB combines dilated convolution and convolution to extract multi-scale features of the micro crack image, increase the perception field of view, ensure the underlying information of the feature, obtain as much available information as possible, and reduce the computational complexity and memory loss. Then through the feature enhancement module FEB (Feature Enhancement Block), the feature enhancement module FEB fully utilizes global and local features through a long path to mine more robust features. This is complementary to the sparse module SB in processing a given noisy image, solving the problem that the shallow features weaken the deep features as the depth increases in the deep network, and realizing further enhancement of the extracted features. Then enter the attention module AB (AttentionBlock), which uses the current stage to guide the past stage to learn the noise information, so as to capture the key noise features hidden in the complex background of the micro crack image, making the micro crack feature extraction more accurate. The final restoration module, RB (Reconstruction Block), uses reinforcement learning technology to restore a clearer image on the residual image, and then outputs a high-quality, high-texture-detail micro-crack image after denoising.

[0089] The use of sparse module SB helps IADNet obtain a shallow network architecture. The feature enhancement module FEB compresses the number of output channels of the eleventh layer to c. The attention module AB uses a 1×1 convolution filter to reduce the number of parameters until the PSNR peak signal-to-noise ratio reaches 32.169db and the SSIM structural similarity value reaches 0.89, then the training is stopped. IADNet ensures the continuity of image feature information between shallow and deep layers in the network while reducing network parameters to accelerate convergence.

[0090] The SB consists of 9 levels (see Figure 4 ) includes two types: dilated convolution dilated Conv+LeakyReLU and convolution Conv+Leaky ReLU. Dilated convolution dilated Conv+Leaky ReLU is placed in the second, fifth, sixth and ninth layers of IADNet and is regarded as a high energy point. Convolution Conv+Leaky ReLU is set in the first, third, fourth, seventh and eighth layers of IADNet and can be regarded as a low energy point. The convolution kernel size of the first to ninth layers is 3×3, and the number of input channels of the first layer is c. If the given noise image is in color, c is 3; otherwise, c is 1. The Leaky ReLU activation function can give the input a very small slope when the input is negative, ensure the activation state of the neuron, and expand the perception range of the input.

[0091] The feature enhancement module FEB (Feature Enhancement Block) makes full use of global and local features and mines more robust features through long paths, which complements the sparse module SB when processing noisy images. The feature enhancement module FEB consists of five layers, including: Conv+Leaky ReLU, convolution Conv, and hyperbolic tangent activation function Tanh. Conv+Leaky ReLU is applied in the tenth layer of IADNet, and the input size of this layer is 64×3×3×64. Convolution Conv is used in the eleventh layer of IADNet, and the input size of this layer is 64×3×3×c. Finally, the initial input of the network and the output of the eleventh layer are concat-compressed and spliced ​​to enhance the representation ability of the denoising model. The final output size of the feature enhancement module FEB is 64×3×3×2c. In addition, the double tangent activation function Tanh is used to convert the obtained features into nonlinearity, and the image denoising performance is improved through the feature enhancement module.

[0092] The attention module AB (Attention Block) is used to guide the neural network to train the denoising model to reduce the difficulty of training the denoising model. The attention module AB includes a 1×1 convolution operation and a vector dot multiplication operation. The input of the 1×1 convolution operation is connected to the output of the feature enhancement module FEB after the double tangent activation function is processed. The features obtained by the 1×1 convolution operation are used as weight vectors to perform vector dot multiplication operations with the output of the first convolution operation in the feature enhancement module FEB; the output of the vector dot multiplication operation is connected to the restoration module RB to obtain the output denoised image. The input size of the 1×1 convolution operation is 2c×1×1×c. The attention module AB implements the attention mechanism through the following two steps. The first step is to use the 1×1 convolution of the fifteenth layer to compress the features into a vector as the previous stage of weight adjustment, which can improve the denoising efficiency. The second step is to use the obtained weights to perform vector dot multiplication operations with the output of the eleventh layer to extract more prominent noise features.

[0093] The restoration module RB (Reconstruction Block) can predict the residual image and use reinforcement learning technology to restore a clearer image.

[0094] After the micro crack image is denoised by IADNet, the overall image quality is greatly improved, which allows the micro crack image to retain more available feature information, including revealing feature information hidden due to complex background. While ensuring the overall image quality, it also greatly improves the intuitive perception of the human eye, which is conducive to the next stage of segmentation neural network training, accelerates network convergence, and reduces training difficulty.

[0095] IADNet training process:

[0096] From the prepared micro crack image dataset, the training sample set and the test sample set are divided into 9:1. In addition, each image in the training sample set is randomly rotated at different angles based on the original image: 90° rotation, 180° rotation, and 270° rotation. Train for 200 epochs to obtain the verification image. Training can be completed for cracks of any shape, and all images are iteratively trained in sequence to complete the denoising of the micro crack images, improve the overall quality of the micro crack images, and enhance their available feature information. When the training model reaches convergence, that is, the model training gradient is close to 0, the optimal denoising parameters are extracted for prediction. Until the PSNR peak signal-to-noise ratio value of the denoising evaluation effect reaches 32.169db and the SSIM structural similarity value reaches 0.89, the entire enhanced attention mechanism denoising network IADNet training is completed.

[0097] After the training of the enhanced attention mechanism denoising network IADNet is completed, all prepared micro crack image data sets are input into IADNet for batch denoising to improve the quality of micro crack images and construct a crack segmentation data set. Then, the segmentation of micro cracks inside 3D printed concrete is achieved through the MCR-Former network.

[0098] 3. MCR-Former (Microscopic Cracks Recognition-Former) network realizes quantitative measurement of microscopic crack images

[0099] The overall architecture of the MCR-Former network is as follows Figure 1 As shown in the figure, it includes a path module, four parallel structures connected in series, a convolutional layer, group normalization, a ReLU activation function and a classification layer. The parallel structure is filtered again through the convolutional layer to make the features recognized by the network more obvious, and then simplified through group normalization. The training of the neural network is accelerated through the ReLU activation function, and finally a convolutional layer is used as the classification layer (CLS) of the single-scale feature to output the image.

[0100] The input image is passed through the path module (Stem module) to extract the feature F to complete the path embedding. After that, the feature F is clustered using the clustering module to obtain the prototype feature G, and a parallel structure including two heterogeneous operators, initial learning (PH) and pixel enhancer (PM), is constructed. Initial learning (PH) is a transformer-based module for initial learning to capture the favorable frequency components in G and obtain the initial representation G'. The pixel enhancer (PM) is a CNN-based pixel enhancer, which restores the prototype representation G' and obtains the feature F' of the next stage. This process has four stages in total, each stage includes a clustering module (Clustering Block), initial learning (PH) and pixel enhancer (PM).

[0101] The MCR-Former network sets a convolutional layer and a group normalization GN (GroupNormalization) + ReLU activation function before the classification layer (CLS). It has stable training dynamics, does not rely on statistics between batches, can better handle data diversity, and improves performance on small data sets, simplifying model deployment and maintenance; at the same time, it has high computational efficiency and does not require exponential operations, which helps solve the gradient vanishing problem, accelerates the network training efficiency, and is more conducive to the extraction of micro crack width.

[0102] The parallel structure includes two heterogeneous operators: initial learning PH and pixel enhancement operator PM, see Figure 2 The output data of the clustering module enters the initial learning for processing. The initial learning includes position encoding, sharing layer, adaptive frequency mutual inductor, summation group normalization, PT-FFN module, summation group normalization, PT-FFN module, summation group normalization, and the result of the last group normalization is the output of the initial learning PH. The results of the first two summation group normalizations are added together with the output of the second point-by-point convolution-feedforward neural network as the input of the third summation group normalization for processing.

[0103] The pixel enhancement symbol PM receives the output of the initial learning PH and the output of the clustering module to perform a restoration operation to obtain the feature F' of the next stage.

[0104] The MCR-Former network innovatively introduces point-by-point convolution-feedforward neural network (PT-FFN) in a parallel structure (see Figure 2 ), including the sequentially connected input layer, Depthwise convolution layer, ReLU activation function, GN group normalization layer, Pointwise convolution layer, ReLU activation function, GN group normalization layer, Average Pooling layer, fully connected layer, and output layer; and the sum of the first GN group normalization layer and the second GN group normalization layer is used as the input of the Average Pooling layer. In PT-FFN, the convolution layer is divided into two parts: Depthwise convolution and Pointwise convolution. Depthwise convolution uses independent convolution kernels to convolve the input channels separately, while Pointwise convolution uses 1×1 convolution kernels to merge the depth channels into fewer channels. After the convolution layer, there is a nonlinear activation function ReLU to increase the expressive power of the model. After the activation function, a group normalization layer is used to accelerate training and improve the stability of the model, which can more effectively reduce the number of model parameters and improve the computational efficiency of the model and prevent overfitting.

[0105] The operation of the PT-FFN module includes the following steps:

[0106] Pointwise Convolution: also known as 1×1 convolution, uses a 1×1 convolution kernel to process the input feature map for cross-channel information fusion. At the same time, it effectively adjusts the number of channels of the feature map to achieve dimensionality reduction or dimensionality increase, effectively reducing the number of model parameters and computational complexity.

[0107] After the Depthwise convolution (depthwise separable convolution), a nonlinear activation function ReLU is applied to introduce nonlinear transformation and enhance the expressiveness of the features.

[0108] Feed-Forward Network: After the depth-wise separable convolution and nonlinear activation function, the PT-FFN module applies a feed-forward neural network consisting of a fully connected layer after the pooling layer. This feed-forward neural network further transforms the features and models the context to extract richer semantic information.

[0109] The process of processing the crack segmentation dataset for MCR-Former network training is:

[0110] (1.1) All micro crack image datasets after IADNet denoising are enhanced using the MSR algorithm

[0111] ①Perform log transformation on the image; ②Perform Gaussian blur on the log image to obtain the low-frequency information part; ③Differentiate the original image and the blurred log image to obtain image Q;

[0112] The original image R, G, B three dimensions are respectively subjected to ①②③ operations. The difference is that in ②, the Gaussian blur selection sets the sigmoid parameter to 15, 80, and 200 respectively. Finally, the results of ①②③ operations on the three dimensions are weighted averaged, and then the three dimensions are combined and the data is scaled to 0-255 to obtain the crack segmentation dataset R * ;

[0113] (1.2) The crack segmentation dataset R * The datasets are divided into training and validation datasets and test datasets in a ratio of 9:1 for training the MCR-Former network.

[0114] The micro crack segmentation results are obtained through the MCR-Former network, and the high-precision measurement of micro crack width is achieved by combining bilateral filtering, morphological processing, Canny edge detection, k+1-means clustering, and eight-direction search method. The overall steps are as follows:

[0115] 1) Using the bilateral filtering method, firstly Gaussian blur is used to remove interfering pixels and retain the real micro crack information;

[0116] 2) Then, the micro cracks are refined by morphological processing to obtain a single-pixel micro crack skeleton map. At this time, all pixel values ​​in the micro crack skeleton map are 0 or 1, which is a micro crack skeleton binary map, called a single-pixel micro crack skeleton map;

[0117] The Canny edge detection algorithm is used to calculate the grayscale gradient of the single-pixel micro-crack skeleton image, and the obtained grayscale gradient value is non-maximum suppressed to enhance data accuracy, and the micro-crack edge image is obtained. The micro-crack edge image obtained by the Canny edge detection is logically ANDed with the single-pixel micro-crack skeleton image pixel by pixel.

[0118] 3) k+1-means clustering:

[0119] The k+1-means clustering method selects k+1 cluster centers based on the traditional k-means method, takes the k+1th as the comparison parameter, and calculates the variance with the results of the first k cluster centers, further enhancing the data representation for optimization calculation to obtain the optimal solution.

[0120] The k+1-means algorithm clusters objects with a certain point in space as the center, classifies the objects closest to them, and updates the value of each cluster center through an iterative method until the best clustering result is obtained to obtain the most ideal micro crack width.

[0121] The k+1-means algorithm accepts the parameter k+1, and then divides the n data objects input in advance into k+1 clusters so that the obtained clusters meet the classification conditions. The objects in the same cluster have a high similarity, while the objects in different clusters have a low similarity. The cluster similarity is calculated using a "central object" (center of gravity) in the mean of the objects in each cluster.

[0122] The implementation steps of the k+1-means algorithm are:

[0123] Select k+1 cluster center points from the results of the logical AND operation, take the k+1th cluster center point as the comparison parameter, and calculate the variance with the results of the first k cluster centers, further enhance the data representation for optimization calculation, and obtain the optimal result. The specific steps are:

[0124] Step 3-1: Randomly initialize k+1 points in the input image set, and select k points as the initial target center points of the k+1-means algorithm;

[0125] Step 3-2: Use the Euclidean distance calculation formula to calculate the geometric distance from the given image set to the initialization target center point;

[0126] Step 3-3: Assign each data point to the nearest cluster according to the principle of shortest distance;

[0127] Step 3-4: Calculate the geometric center of each cluster in the new round. The calculation formula is as follows:

[0128]

[0129] Where P x , P y Respectively represent the horizontal and vertical coordinates of the geometric center point to be calculated for the current cluster; P ix , P iy They represent the horizontal and vertical coordinates of the i-th point in the current cluster respectively; p represents the number of points in the current cluster;

[0130] Use the geometric center of the sample data in each cluster as the cluster center of the new classification;

[0131] Step 3-5: Repeat steps 3-2, 3-3 and 3-4 until the algorithm converges, that is, the center point no longer changes, and output the clustering result;

[0132] Step 3-6: Optimize the obtained clustering results, and use the obtained k center points and the k+1th center point to take the variance. The formula is:

[0133]

[0134] Among them, x k+1 represents the coordinates of the k+1th center point, x j (j=1,2,…k) represents the coordinates of the kth cluster center. Select the cluster center with the smallest variance and find the optimal cluster center;

[0135] Find the optimal clustering result;

[0136] 4) Skeleton extraction: Perform skeleton extraction on the result after k+1-means clustering. The specific skeleton extraction process is as follows:

[0137] Loop through all foreground pixels and mark for deletion those that meet any of the following conditions:

[0138] 1)2≤N(F1)≤6

[0139] 2) S(F1)=1

[0140] 3) F2F4F6=0

[0141] 4) F4F6F8=0

[0142] 5) F2F4F8=0

[0143] 6) F2F6F8=0

[0144] N(F1) indicates the number of foreground pixels in the eight pixels adjacent to F1, and S(F1) indicates the cumulative number of 0-1 pixels appearing in F2-F9-F2, where 0 indicates background and 1 indicates foreground. The complete pixel position distribution of F1-F9 is as follows, where F1 is the center point, the adjacent pixel just above F1 is F2, and then the next adjacent pixel around F1 is marked counterclockwise from F2 as F3-F9.

[0145] <![CDATA[F9]]> <![CDATA[F2]]> <![CDATA[F3]]> <![CDATA[F8]]> <![CDATA[F1]]> <![CDATA[F4]]> <![CDATA[F7]]> <![CDATA[F6]]> <![CDATA[F5]]>

[0146] Until no pixel is marked for deletion, the output result is the skeleton image after the binary image is refined. Skeleton extraction makes the micro cracks clearer, removes image interference, and further improves the accuracy of width calculation.

[0147] 5) Calculate the micro crack width using the eight-direction search method:

[0148] For the skeleton image after binary image refinement, each micro crack point is used as the initial target center point for width measurement, and an eight-direction search is performed in the skeleton image after binary image refinement extracted from the initial target center point; if it is a micro crack point, the number of pixels in that direction is increased by 1 until the micro crack boundary is reached, and the number of micro crack pixel points in the eight directions of "0°, 45°, 90°, 135°, 180°, 225°, 270°, 315°" where a center point is located is counted respectively, and recorded as n1, n2, n3, n4, n5, n6, n7, n8; the number of micro crack points in the four groups of directions of 0° and 180°, 45° and 225°, 90° and 270°, and 135° and 315° are merged, and the merging method is: d1=n1+n5, d2=2 1 / 2 (n2+n6), d3=n3+n7, d4=2 1 / 2 (n4+n8), take D=min{d1,d2,d3,d4}, and record the direction in which D is obtained, where d1, d2, d3, d4 are the number of pixels in the directions of the four merged straight lines respectively, calculate w=w0×D, where w0 is the actual physical size represented by each pixel, and w is the actual width of the micro crack under the center point of the target; update to the next center point until the widths at all center points are measured.

[0149] Before measuring micro cracks in eight directions, the micro crack pixels are first clustered using the k+1-means clustering algorithm, and then the skeleton is extracted from the results of multiple clustering to obtain the final output result. The micro crack width is then calculated using the eight-direction search method. This allows the center point of the micro crack pixel and the end point of the micro crack width to be easily extracted for any micro crack curve with a strange shape. Most of the micro cracks seen in daily life are irregular in shape. This method solves the problem of inaccurate measurement of micro crack width using the traditional eight-direction search method.

[0150] The micro crack defect image of the 3D printed concrete printing area to be detected is pre-denoised using IADNet, and then input into the MCR-Former network. The measurement parameter threshold is set. If the MCR-Former network recognizes it as a micro crack defect image and the micro crack width is greater than the measurement parameter threshold, printing is stopped to check the material status; if it does not exceed the measurement parameter threshold range, the printed material is qualified.

[0151] Example 1

[0152] The system for quantifying microscopic cracks inside 3D printed concrete in this embodiment is characterized in that the system comprises:

[0153] An image acquisition module is used to obtain microscopic crack images of the printing area of ​​3D printed concrete;

[0154] The image processing module is used to segment and annotate the micro crack images of the image acquisition module at the pixel level, add IADNet to pre-process the micro crack images for denoising, and then perform data enhancement to obtain a crack segmentation dataset;

[0155] 3D printed concrete micro crack segmentation model, using MCR-Former neural network to segment micro crack images;

[0156] The width processing and calculation module uses bilateral filtering, morphological processing, Canny edge detection, k+1-means clustering, and eight-direction search method to achieve high-precision measurement of micro crack width and obtain the actual width of micro cracks;

[0157] The micro-crack threshold feedback processing module compares the actual width of the micro-cracks obtained by the width processing and calculation module with the measurement parameter threshold. When the measurement parameter threshold is exceeded, the quality of the 3D printed product produced is considered unqualified, and feedback is given to stop printing and check the material status. The back-end system automatically reduces the printer nozzle movement speed, increases the discharge speed, and prompts relevant personnel to check the material status; when it does not exceed the measurement parameter threshold, the product is considered qualified.

[0158] In this embodiment, when using the micro crack image data set to train IADNet, the number of iterations is set to 40,000. When the training gradient is close to 0, the model reaches convergence. The measurement parameter threshold is set to 5.0 μm, and the width of the micro cracks is checked. If the width of the micro cracks is not greater than 5.0 μm, the material printing is considered qualified. If the width of the micro cracks is greater than 5.0 μm, the printing is unqualified. If it is unqualified, the back-end system automatically slows down the printing speed and increases the pumping rate, and arranges staff to check the material status; if the image is not identified as a defect, the micro crack width is also considered qualified.

[0159] The hardware used in the present invention also includes:

[0160] Processor: As the core component of the present invention, the processor is responsible for controlling and managing the operation of the entire system, including data acquisition, data processing, image recognition and other functions, and needs to have sufficient computing power and parallel processing capabilities to meet real-time requirements. The processor can be in different forms such as single-chip microcomputers, microprocessors, computers, etc. to meet the needs of different application scenarios;

[0161] Memory: Memory can be used to store collected data and historical data for subsequent processing and analysis. It has the characteristics of high speed, high reliability and scalability to meet the needs of long-term stable operation of the system;

[0162] Database: The back-end system needs to use a database to store and manage collected data, historical data, analysis results and other information;

[0163] Network interface: The back-end system needs to use a network interface to exchange and communicate data with the front-end system and other external systems. It has the characteristics of high speed, high stability and high security to ensure the reliability and security of data transmission.

[0164] The present invention is mainly used to realize the quantitative analysis of micro cracks in 3D printed concrete, and can realize the function of automatically screening qualified materials until all areas meet the requirements after printing, thus completing the behavior analysis.

[0165] MCR-Former can effectively learn the spatial relationship and semantic information between features and improve the accuracy of semantic segmentation. The PT-FFN module has a lightweight structure, which can reduce the computational complexity of the model and is suitable for real-time semantic segmentation tasks in resource-constrained environments. The MCR-Former network is first applied to separate micro cracks from the background, and then processing methods including edge detection algorithms are applied to the segmentation results to extract the actual width of the micro cracks and obtain more accurate and complete micro crack edges.

[0166] The present invention uses an enhanced attention mechanism denoising network to preprocess the data set on multiple semantic segmentation data sets and compares it with existing methods. Compared with SegFormer, MCR-Former has no decoder module, has lower computational complexity and better performance. In addition, the present invention is compared with other models after training for microcrack recognition results, and the comparison results are as follows:

[0167]

[0168] In the processing of micro crack images, the pixel accuracy and average pixel accuracy of MCR-Former are 0.23% and 2.15% higher than those of the existing AFFormer, which has better performance, respectively, and the accuracy of micro crack width measurement has increased by 1.51%. Compared with other Transformer models, the difference is more significant, which proves that the method used in the present invention is innovative and has superior application performance.

[0169] The present invention proposes a system and method for measuring and analyzing micro cracks in 3D printed concrete based on MCR-Former, aiming to solve the problem that the current micro quality of 3D printed concrete cannot be accurately monitored. The present invention can quantitatively analyze micro cracks and automatically screen out unqualified materials when the width of the micro cracks exceeds a set threshold. Compared with the prior art, this technical solution has the following advantages and application prospects: reducing labor costs, improving printing efficiency, ensuring the deep quality of printed products, and providing the possibility of pursuing larger-scale architectural-level 3D printing. This is of great significance to the 3D printing industry and has broad application prospects.

[0170] It should be understood that each part of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system.

[0171] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0172] Any matters not described in the present invention are applicable to the prior art.

Claims

1. A method for quantifying microscopic cracks inside 3D printed concrete, characterized in that: The quantification method includes the following contents:

1. Preparation of Microscopic Crack Image Dataset The defect image data of the printing area of ​​3D printed concrete is obtained using a BSE electron microscope to form a micro crack image dataset, which includes micro crack images of 3D printed concrete, micro crack images of non-3D printed concrete, and images of concrete without micro cracks; 2. Enhanced Attention Mechanism Denoising Network IADNet Processing An enhanced attention mechanism denoising network IADNet is constructed, wherein the enhanced attention mechanism denoising network IADNet includes a sparse module SB, a feature enhancement module FEB, an attention module AB and a restoration module RB. The sparse module SB includes five convolutional layers and four dilated convolutional layers, each layer includes a Leaky ReLU function stacked with a convolution or dilated convolution, and the connection order is convolutional layer - dilated convolutional layer - two convolutional layers - two dilated convolutional layers - two convolutional layers - dilated convolutional layer; The feature enhancement module FEB includes a convolution layer, a convolution operation, a compression splicing operation, a convolution operation and a bi-tangent activation function connected in sequence; the output result of the sparse module SB is used as the input of the feature enhancement module FEB; The attention module AB includes a 1×1 convolution operation and a vector dot multiplication operation. The input of the 1×1 convolution operation is connected to the output of the feature enhancement module FEB after the double tangent activation function is processed. The feature obtained by the 1×1 convolution operation is used as a weight vector to perform a vector dot multiplication operation with the output of the first convolution operation in the feature enhancement module FEB; the output of the vector dot multiplication operation is connected to the restoration module RB to obtain an output denoised image; The micro crack image dataset is used to train the enhanced attention mechanism denoising network IADNet, and the trained enhanced attention mechanism denoising network IADNet is used to denoise the image and construct a crack segmentation dataset; 3. Constructing MCR-Former network to realize quantitative measurement of micro crack images The MCR-Former network includes a path module, and the input image is passed through the path module to extract the feature F to complete the path embedding. After that, the feature F is clustered using the clustering module to obtain the prototype feature G, and a parallel structure including two heterogeneous operators, the initial learning PH and the pixel enhancement symbol PM, is constructed; the initial learning PH is used to capture the favorable frequency components in G to obtain the initial representation G'; the pixel enhancement symbol PM is a CNN-based pixel enhancer, through which the prototype representation G' is restored to obtain the feature F' of the next stage; the clustering module and the parallel structure are repeated in four groups and connected in sequence; then, the convolution layer is used for filtering again to make the features recognized by the network more obvious, and then simplified by group normalization, and then processed by the ReLU activation function, and finally a convolution layer is used as a classification layer (CLS) of single-scale features to output the segmented image; The MCR-Former network is trained using the crack segmentation dataset; The trained IADNet is used for denoising in advance, and then the image is input into the trained MCR-Former neural network to obtain the micro-crack segmentation result, based on which the micro-crack width is further calculated.

2. The quantization method according to claim 1, characterized in that: The process of constructing the crack segmentation dataset is as follows: after all the microscopic crack image datasets have been denoised by IADNet, the MSR algorithm is used for data enhancement: ①Perform log transformation on the image; ②Perform Gaussian blur on the log image to obtain the low-frequency information part; ③Differentiate the original image and the blurred log image to obtain image Q; The original image R, G, B three dimensions are respectively subjected to ①②③ operations. The difference is that in ②, the Gaussian blur selection sets the sigmoid parameter to 15, 80, and 200 respectively. Finally, the results of ①②③ operations on the three dimensions are weighted averaged, and then the three dimensions are combined and the data is scaled to 0-255 to obtain the crack segmentation dataset R * ; The crack segmentation dataset R * The datasets are divided into training and validation datasets and test datasets in a ratio of 9:1 for training the MCR-Former network.

3. The quantization method according to claim 1, characterized in that: The MCR-Former outputs the category to which each pixel of the input image belongs, achieving semantic segmentation; Based on the micro crack segmentation results of MCR-Former, high-precision measurement of micro crack width is achieved by combining bilateral filtering, morphological processing, Canny edge detection, k+1-means clustering, and eight-direction search method. The overall steps are as follows: 1) Using bilateral filtering, firstly, Gaussian blur is used to remove interfering pixels and retain the real micro crack information; 2) Then, the micro cracks are refined by morphological processing to obtain a single-pixel micro crack skeleton map. At this time, all pixel values ​​in the micro crack skeleton map are 0 or 1, which is a micro crack skeleton binary map, called a single-pixel micro crack skeleton map; the Canny edge detection algorithm is used to find the image edge and obtain the micro crack edge map by calculating the gray gradient of the single-pixel micro crack skeleton map, and the micro crack edge map obtained by the Canny edge detection is logically ANDed with the single-pixel micro crack skeleton map pixel by pixel; 3) k+1-means clustering: Select k+1 cluster center points from the result of logical AND operation, take the k+1th cluster center point as the comparison parameter, and calculate the variance with the result of the first k cluster centers, further enhance the data representation for optimization calculation, and obtain the optimal result. The specific steps are: Step 3-1: Randomly initialize k+1 points in the input image set, and select k points as the initial target center points of the k+1-means algorithm; Step 3-2: Use the Euclidean distance calculation formula to calculate the geometric distance from the given image set to the initialization target center point; Step 3-3: Assign each data point to the nearest cluster according to the principle of shortest distance; Step 3-4: Calculate the geometric center of each cluster in the new round. The calculation formula is as follows: Where P x , P y Respectively represent the horizontal and vertical coordinates of the geometric center point to be calculated for the current cluster; P ix , P iy They represent the horizontal and vertical coordinates of the i-th point in the current cluster respectively; p represents the number of points in the current cluster; Use the geometric center of the sample data in each cluster as the cluster center of the new classification; Step 3-5: Repeat steps 3-2, 3-3 and 3-4 until the algorithm converges, that is, the center point no longer changes, and output the clustering result; Step 3-6: Optimize the obtained clustering results, and use the obtained k center points and the k+1th center point to take the variance. The formula is: Among them, x k+1 represents the coordinates of the k+1th center point, x j (j=1,2,…k) represents the coordinates of the kth cluster center point; select the cluster center point with the smallest variance and find the optimal cluster center point; Find the optimal clustering result; 4) Skeleton extraction: Perform skeleton extraction on the result after k+1-means clustering. The specific skeleton extraction process is as follows: Loop through all foreground pixels and mark for deletion those that meet any of the following conditions: 2≤N(F1)≤6 S(F1)=1 F2F4F6=0 F4F6F8=0 F2F4F8=0 F2F6F8=0 Where N(F1) represents the number of foreground pixels among the 8 pixels adjacent to F1, S(F1) represents the cumulative number of 0-1 appearing in F2-F9-F2 pixels, where 0 represents background and 1 represents foreground; F represents pixel; the complete pixel position distribution of F1-F9 is: Until no pixel is marked as deleted, the output result is the skeleton image after the binary image is refined; 5) Calculate the micro crack width using the eight-direction search method: For the skeleton image after binary image refinement, each micro crack point is taken as the initial target center point for width measurement, and an eight-direction search is performed in the skeleton image after binary image refinement from the initial target center point; if it is a micro crack point, the number of pixels in that direction is increased by 1 until the micro crack boundary is reached, and the number of micro crack pixel points in the eight directions of "0°, 45°, 90°, 135°, 180°, 225°, 270°, 315°" where a center point is located is counted respectively, and recorded as n1, n2, n3, n4, n5, n6, n7, n8; the number of micro crack points in the four groups of directions of 0° and 180°, 45° and 225°, 90° and 270°, and 135° and 315° are merged, and the merging method is: d1=n1+n5, d2=2 1 / 2 (n2+n6), d3=n3+n7, d4=2 1 / 2 (n4+n8), take D=min{d1,d2,d3,d4}, and record the direction in which D is obtained, where d1, d2, d3, d4 are the number of pixels in the directions of the four merged straight lines respectively, calculate w=w0×D, where w0 is the actual physical size represented by each pixel, and w is the actual width of the micro crack under the center point of the target; update to the next center point until the widths at all center points are measured.

4. The quantization method according to claim 1, characterized in that: Set the measurement parameter threshold. If the MCR-Former network identifies a micro crack defect image and the micro crack width is greater than the measurement parameter threshold, stop printing and check the material status. If it does not exceed the measurement parameter threshold range, the printed material is qualified.

5. The quantization method according to claim 1, characterized in that: When the training of the enhanced attention mechanism denoising network IADNet is completed, the PSNR peak signal-to-noise ratio value of the denoising evaluation effect is not less than 32.169db, and the SSIM structural similarity value is not less than 0.

89.

6. The quantization method according to claim 1, characterized in that: A point-by-point convolution-feedforward neural network (PT-FFN) is introduced into the parallel structure of the MCR-Former network, including an input layer, a Depthwise convolution layer, a ReLU activation function, a GN group normalization layer, a Pointwise convolution layer, a ReLU activation function, a GN group normalization layer, an Average Pooling layer, a fully connected layer, and an output layer connected in sequence; and the sum of the first GN group normalization layer and the second GN group normalization layer is used as the input of the AveragePooling layer; The convolution kernel size of the Pointwise convolution layer is 1×1.

7. The quantization method according to claim 1, characterized in that: The sparse module SB in the enhanced attention mechanism denoising network IADNet has a total of nine layers. The first, third, fourth, seventh, and eighth layers are set as convolutional layers (convolution Conv+LeakyReLU) and are regarded as low energy points; the second, fifth, sixth, and ninth layers are regarded as high energy points and are set as dilated convolutional layers (dilated Conv+Leaky ReLU); the convolution filter size of layers 1 to 9 is 3×3, and the input of the first layer is the number of channels c of the input noise image. If the given noise image is in color, c is 3; otherwise, c is 1; The feature enhancement module FEB has five levels, including three types: Conv+Leaky ReLU, Conv, and hyperbolic tangent activation function Tanh; the convolution layer of Conv+Leaky ReLU is applied to the tenth layer of IADNet, and its output size is 64×3×3×64; the output size of the eleventh layer of IADNet is adjusted by Conv convolution to 64×3×3×c; finally, the network initial input and the output of the eleventh layer are concatenated by Concat compression and splicing operation and then processed by Conv convolution operation, and the final output size is 64×3×3×2c, and the obtained features are converted into nonlinear features using Tanh activation function; The input size of the 1×1 convolution operation of the attention mechanism module AB is 2c×1×1×c.

8. A system for quantifying microscopic cracks inside 3D printed concrete, characterized in that: The system executes the quantification method according to any one of claims 1 to 7, including: An image acquisition module is used to obtain microscopic crack images of the printing area of ​​3D printed concrete; The image processing module is used to segment and annotate the micro crack images of the image acquisition module at the pixel level, add IADNet to pre-process the micro crack images for denoising, and then perform data enhancement to obtain a crack segmentation dataset; 3D printed concrete micro crack segmentation model, using MCR-Former neural network to segment micro crack images; The width processing and calculation module uses bilateral filtering, morphological processing, Canny edge detection, k+1-means clustering, and eight-direction search method to achieve high-precision measurement of micro crack width and obtain the actual width of micro cracks; The micro crack threshold feedback processing module compares the actual width of the micro cracks obtained by the width processing and calculation module with the measurement parameter threshold. When it exceeds the measurement parameter threshold, it is considered that the quality of the produced 3D printed product is unqualified, and feedback is given to stop printing and check the material status; when it does not exceed the measurement parameter threshold, the product is considered qualified.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of any method described in claims 1-7 can be implemented.

Citation Information

Patent Citations

  • Image recognition method, device and system based on convolutional neural network

    CN115272826A

  • Method for realizing crack measurement in 3D printing retaining wall construction process based on AFFormer

    CN116777898A