A semi-supervised method, system and equipment for identifying and assessing concrete cracks

By iteratively training the teacher U-Net and student U-Net in a semi-supervised learning framework, high-confidence pseudo-labels are selected and model parameters are dynamically updated. This solves the problems of scarce labels and accumulation of pseudo-label errors in existing technologies, achieves high-quality crack identification and damage assessment, and improves the stability and accuracy of concrete crack identification.

CN123118549APending Publication Date: 2026-11-17XIJING UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202611346743.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-01
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing concrete crack identification technologies struggle to effectively suppress background noise and ensure the topological integrity and pixel accuracy of the crack binary map, especially when labels are scarce, pseudo-labels are unreliable, and updates lack global supervision. Furthermore, pseudo-label errors tend to accumulate over multiple training rounds, affecting the accuracy of damage assessment.

Method used

A semi-supervised learning framework is adopted. Through iterative training of teacher U-Net and student U-Net, a probability threshold of 0.90 is set to filter pseudo-labels. Background noise is suppressed by combining validity mask and a piecewise linearly increasing pseudo-label loss weight is used to dynamically update the teacher model parameters, ensuring that the model maintains excellent performance on the validation set and outputs high-quality crack binary maps.

Benefits of technology

Under limited annotation conditions, it significantly improves crack segmentation performance and the reliability of damage assessment, ensures data continuity and logical consistency between identification results and damage calculation, and enhances stability and robustness under different lighting and concrete surface conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123118549A_ABST
    Figure CN123118549A_ABST
Patent Text Reader

Abstract

This invention discloses a semi-supervised method, system, and device for concrete crack identification and damage assessment. Addressing the core bottleneck of scarce labeled samples in concrete crack identification, it uses semi-supervised learning as the basic framework and performs collaborative optimization on four key technical aspects: pseudo-label quality control, dynamic adjustment of loss weights, teacher model condition update, and segmentation-damage data integration. This achieves high-precision binary segmentation of cracks and reliable fractal dimension damage assessment with a small number of labeled samples, demonstrating significant technological advancement and engineering practical value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of civil engineering structural appearance inspection and computer vision technology, specifically to a semi-supervised identification, system and equipment for concrete cracks and damage assessment. Background Technology

[0002] Concrete components may develop cracks after being subjected to loads, shrinkage, temperature changes, corrosion, freeze-thaw cycles, or earthquakes. Manual visual inspection is difficult to consistently obtain pixel-level crack morphology due to the influence of experience, working conditions, and surface interference. Conventional threshold or edge detection is prone to false detection under shadows, stains, holes, and rough textures, while fully supervised segmentation relies heavily on manual masking.

[0003] Several advancements have been achieved in existing concrete crack identification technologies. For example, patent CN107590349B discloses a crack damage assessment scheme based on fractal theory. Its technical approach involves box counting of acquired concrete crack images, calculating the fractal dimension of the image by statistically analyzing the logarithmic relationship between the number of grids required to cover the crack area and the grid size, and then using the fractal dimension as a quantitative indicator of the degree of structural damage. This scheme relies on traditional image preprocessing and binarization operations, requiring extremely high integrity and contrast of the crack mask. Under uneven lighting, complex textures, or noise interference, the box counting results are easily affected by background noise, and the stability of the fractal dimension is difficult to guarantee. Patent CN116152219B discloses a detection and assessment system combining depth instance segmentation and geometric measurement. Its core scheme involves using a Mask R-CNN network to perform pixel-level mask prediction on crack images. After obtaining the crack area, the system further calculates geometric parameters such as the crack width, length, area, and orientation to achieve comprehensive quantification of the crack morphology. The current approach requires a large number of finely labeled crack masks for training Mask R-CNN. When the number of labeled samples is limited, mask prediction bias directly leads to errors in geometric parameter calculation, and the network's ability to segment small cracks and blurred edge regions is limited. Patent CN114693615A discloses a method for applying a domain-adaptive deep network to crack detection in concrete bridges. By constructing a domain-adaptive module, crack features learned in the source domain (such as laboratory or public datasets) are transferred to the target domain (actual bridge scenario). Adversarial training or feature alignment strategies are used to improve the model's crack recognition generalization ability under different lighting, background, and bridge surface conditions. However, this method still has shortcomings: the domain adaptation process usually requires a small number of real crack masks in the target domain as supervision signals. If the target domain annotation is completely lacking, the quality of pseudo-labels is difficult to guarantee, and the distribution alignment error in the adaptation process may introduce additional background noise, affecting the reliability of the final detection results. The paper "Study on Fractal Damage of Concrete Cracks Based on U-Net" (Buildings, 2024, 14(10):3262) discloses a method for crack segmentation using the U-Net network. After obtaining the segmentation mask, the box dimension and damage index are calculated, thus combining deep learning feature extraction with fractal damage theory. The limitation of this paper is that the segmentation accuracy of U-Net also depends on sufficient labeled data, and in low-contrast or complex backgrounds, the segmentation output often contains background artifacts. These noises can significantly interfere with the subsequent calculation of the box dimension, leading to a deviation in the damage index.

[0004] On the other hand, teacher-student semi-supervised semantic segmentation has been preliminarily applied to surface crack detection, attempting to alleviate the problem of insufficient annotation. However, considering the common defects exposed by the above schemes due to scarce annotations, unreliable pseudo-labels, and lack of global supervision in updates, existing frameworks still face three specific problems that urgently need to be solved under limited mask conditions: First, how to effectively suppress the background noise doped in low-confidence pseudo-labels so that the final crack binary map output by the model has sufficient purity, so that it can be directly input into the box dimension calculation process and avoid additional post-processing operations; Second, how to ensure the topological integrity and pixel accuracy of the binary image to guarantee the accuracy of fractal dimension calculation; Third, how to design the parameter update strategy for the teacher's U-Net so that its iteration process is constrained by pixel-level F1 scores on a unified validation set, rather than relying solely on pseudo-labels generated by the student's U-Net, thereby preventing the continuous accumulation and amplification of pseudo-label errors in multiple training rounds. To address these issues, it is urgent to integrate noise suppression mechanisms with globally validated update constraints within a semi-supervised learning framework to synergistically improve the quality of crack binary maps and the reliability of damage assessment metrics. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a semi-supervised method, system, and device for concrete crack identification and damage assessment. Under the condition of a limited number of pixel-level annotations for concrete cracks, it improves the utilization rate of unannotated images and controls pseudo-label noise, providing verifiable binary crack maps for downstream box-dimensionality and damage index calculations.

[0006] To achieve the above objectives, the following technical solution is adopted: A semi-supervised method for identifying and assessing concrete cracks, characterized by the following steps: S1. Collect images of the concrete component surface, and annotate a portion of these images with pixel-level crack masks to form an annotated sample set L; the remaining unannotated images are assigned to the unannotated sample set U; at the same time, a separate validation set V is established, which remains fixed in each round of training iterations and is used to verify the model performance. S2, supervised training of the teacher U-Net is performed using the labeled sample set L to obtain the initial teacher U-Net parameters θT, which serve as the starting point for subsequent semi-supervised iterations; S3. Input the unlabeled sample set U into the current teacher U-Net and output a pixel-level crack probability map p. For each pixel, only when p≥0.90 is it assigned to the crack positive class pseudo-label M. At the same time, generate a corresponding validity mask W so that pixels p<0.90 are masked in the subsequent pseudo-label loss calculation. S4, in the t-th iteration, t=1, 2, ..., 10, train the student U-Net with the total loss L_total = L_sup + α(t)·L_pseudo, where L_sup is the supervised loss based on the labeled sample set, and L_pseudo is the pseudo-label loss under the constraint of the validity mask W; the weight coefficient α(t) adopts a piecewise linear growth strategy. S5. After each round of student U-Net training, the pixel-level F1 scores of the student U-Net and the current teacher U-Net are calculated on a unified validation set V. Only when the F1 score of the student U-Net is not lower than that of the teacher U-Net, the teacher U-Net parameters θT are updated with the student U-Net parameters; otherwise, the original teacher U-Net parameters θT are retained and the process proceeds directly to the next round of pseudo-label generation. S6. Input the image to be evaluated into the teacher U-Net that is finally retained after the tenth round of iteration to obtain the crack probability map. Then, using a segmentation threshold that is predetermined on the validation set V and kept fixed in the same batch of evaluation, the probability map is transformed into a crack binary map B. S7, for the binary crack image B, count the number of non-empty boxes N(Lk) covering the crack pixels at multiple box scales Lk, and perform linear fitting with log(1 / Lk) as the abscissa and logN(Lk) as the ordinate. Determine the absolute value of the slope of the fitted line as the crack fractal dimension D; based on the preset benchmark value D1=1.05, calculate DI=(D D1) / (2 D1) Calculate the damage index DI, and output the corresponding damage level according to the D value and DI level classification standard to achieve a quantitative assessment of the severity of cracks.

[0007] Preferably, step S1 preprocesses the collected concrete component surface image dataset by dividing the dataset into a training set, a validation set, and a test set; pixel-level crack masking is applied to a portion of the images in the training set to form a labeled sample set L, while the remaining unlabeled images are assigned to the unlabeled sample set U; data augmentation is performed on the training set; the training images are uniformly scaled to 224×224 pixels by cropping or bilinear interpolation; and data augmentation is applied to the training images. The image is randomly rotated within the range of 15° to +15° and horizontally flipped with a probability of 0.5. Simultaneously, the brightness, contrast, and saturation coefficients are independently sampled from the range of 0.9 to 1.1 to enhance the color of the image. For the crack mask of the labeled image and the pseudo-label mask corresponding to the unlabeled image, the same cropping, rotation, and flipping transformation parameters as the image are used. The scaling and rotation of the mask use nearest neighbor interpolation to maintain binaryity. The color perturbation is applied only to the RGB image and not to the mask. The validation and test sets are only subjected to size unification and pixel normalization, and no random enhancement operations are performed.

[0008] Preferably, both the teacher U-Net and the student U-Net consist of an encoder, a decoder, and skip connections. The encoder extracts multi-scale semantic features through progressive downsampling, the decoder restores spatial resolution through progressive upsampling, and the skip connections concatenate the features of each layer of the encoder with the corresponding layer of the decoder to preserve detailed information. After all convolutional layers, a Leaky-ReLU activation function with a negative slope of 0.1 is used, and the output layer uses the Sigmoid function to map the predicted value of each pixel to the [0,1] interval as the crack probability output.

[0009] Preferably, the weighting coefficient α(t) is calculated according to the formula α(t) = 0.1 + (t) 1) × 0.8 / 9 is calculated, where t = 1, 2, ..., 10, so that the pseudo-label loss weight increases linearly from 0.1 to 0.9 with each iteration; the supervision loss L_sup is the weighted sum of the binary cross-entropy loss and the Dice loss, and their weight coefficients are set to 0.5 and 0.5, respectively.

[0010] Preferably, the multiple box scales are square box side lengths that increase or decrease sequentially in a 2:1 relationship, denoted as Lk, k=1,2,…,K. At each scale, non-overlapping square boxes are used to perform grid coverage on the crack binary image. The number of boxes containing at least one crack foreground pixel at each box scale is counted and denoted as N(Lk), which is the number of non-empty boxes at that scale.

[0011] Preferably, the damage level is divided into four levels according to the numerical range of the fractal dimension D: when D < 1.24, the output is slight damage; when 1.24 ≤ D < 1.525, the output is moderate damage; when 1.525 ≤ D < 1.715, the output is severe damage; and when D ≥ 1.715, the output is the damage level, thereby realizing the graded output of the severity of crack damage.

[0012] Preferably, when acquiring the image to be evaluated, a ruler with known actual dimensions is set on the surface of the concrete component, and the proportional relationship between the pixel size and the actual physical size is established through image processing. The pixel length and pixel width of the crack are converted into the actual physical length and physical width according to the proportional relationship. If the ruler is not set or the proportional relationship cannot be established, the length and width values ​​of the crack are output only in pixel units.

[0013] Preferably, the output of the evaluation results includes the original image, crack probability map, crack binary map, fractal dimension D, damage index DI, and damage level; the above contents are displayed in a unified visualization interface so that samples near the critical damage level can be manually reviewed and judged based on the original image and crack binary map.

[0014] A semi-supervised concrete crack identification and damage assessment system includes: an image and annotation management module for acquiring images, managing an annotated sample set L, an unannotated sample set U, and a validation set V; The teacher-student training module is used to perform teacher U-Net initialization, pseudo-label generation, student U-Net training, and teacher model condition update. The crack segmentation module is used to input the image to be evaluated into the final retained teacher U-Net, output the crack probability map and generate the crack binary map B; The box dimension calculation module is used to count the number of non-empty boxes and perform linear fitting at multiple box scales, and calculate the fractal dimension D. The damage index and level determination module is used to calculate the damage index DI and output the corresponding damage level based on the D value. The results output module is used to display and output the evaluation results.

[0015] An electronic device includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, the processor executing a semi-supervised method for identifying and assessing concrete cracks.

[0016] Compared with the prior art, the present invention has the following beneficial effects: This invention does not directly involve teacher U Instead of using the entire prediction result of Net as a pseudo-label, a probability threshold of 0.90 is set, combined with a validity mask W for double screening: only positive crack pixels with a confidence level of not less than 0.90 are included in the calculation of the pseudo-label loss L_pseudo, while low-confidence pixels are completely masked under the constraint of the validity mask W and do not participate in the loss. This setting effectively suppresses the interference of background noise in low-confidence regions on the semi-supervised training process from the training data source, so that the model can still obtain high-quality pseudo-label supervision signals under the condition that the number of available crack masks is extremely limited.

[0017] Instead of using fixed pseudo-label loss weights, the weight coefficient α(t) is designed to increase linearly from 0.1 to 0.9 in a piecewise incrementing strategy (t=1,2,…,10). In the early stages of training, the weights are lower, allowing the model to primarily rely on supervised loss from manually labeled samples, thus avoiding unreliable pseudo-labels generated by immature teacher models that could mislead student training. In the later stages of training, the weights gradually increase, fully utilizing the structured information contained in the large number of unlabeled images. This dynamic weighting mechanism balances the stability of early training with the effectiveness of semi-supervised gains in later stages, significantly improving crack segmentation performance even under conditions of scarce labeled samples.

[0018] This invention does not unconditionally update the teacher model based on the student model parameters. Instead, after each round of training, it calculates the student U on the same fixed validation set V. Net and current teacher U The pixel-level F1 score of the Net is used to replace the teacher parameters only when the student model's F1 score is not lower than the teacher model's; otherwise, the original teacher parameters are retained. This update gating mechanism ensures that the teacher model always maintains the version that performs best on the validation set, effectively blocking the risk of teacher model performance degradation due to increased pseudo-label error in a single round during the iteration process, and preventing the continuous accumulation and propagation of pseudo-label error in multiple rounds of training.

[0019] Teacher U will be retained in the end The crack binary map B output by Net is directly used as input data for subsequent multi-scale box counting. All damage indicators—including the number of non-empty boxes N(Lk), fractal dimension D, damage index DI, and damage level at each box scale—are calculated sequentially from the same binary map B. This design ensures data continuity and logical consistency between the identification and damage assessment stages, eliminates uncertainties that may be introduced by secondary processing or format conversion of intermediate results, and forms a clear unidirectional data flow between crack identification results and damage calculation results, facilitating result traceability and verification.

[0020] First, the training, validation, and test sets are divided. Then, multiple enhancement operations, such as random rotation, horizontal flipping, and brightness / contrast / saturation perturbations, are applied only to the training set. The crack mask uses the same transformation parameters and nearest-neighbor interpolation as the image, expanding the diversity of training samples while ensuring the binary integrity of the mask. The validation and test sets only undergo size unification and normalization, without introducing random enhancements to interfere with performance evaluation. This setup enables the model to maintain stable crack recognition accuracy under different lighting conditions, shooting angles, and concrete surface conditions, enhancing the applicability and robustness of the technical solution in real-world engineering scenarios.

[0021] The output includes the original image, crack probability map, crack binary map, fractal dimension D, damage index DI, and damage level, all displayed comprehensively in the same visualization interface. For samples near the critical damage level, users can manually compare and verify the original image with the crack binary map, effectively compensating for potential ambiguity in automated assessments at the level boundaries and improving the reliability and interpretability of the assessment results. Attached Figure Description

[0022] Figure 1 Flowchart for concrete crack identification and damage assessment; Figure 2 Diagram of the teacher-student dual U-Net training architecture; Figure 3 This is a schematic diagram illustrating the calculation of the two-dimensional box dimension of the crack. Figure 4To evaluate the system's functional modules and data flow diagrams; Figure 5 A diagram showing the relationship between fractal dimension and damage level boundary; Figure 6 Diagram of the U-Net crack segmentation network structure; Figure 7 This diagram illustrates the method for generating pseudo-labels for high-confidence crack positive classes. Detailed Implementation

[0023] like Figure 1 As shown, this invention provides a semi-supervised identification and damage assessment method for concrete cracks, including the following steps: S1, Enhanced Data Acquisition, Dataset Partitioning, and Preprocessing: A dataset of concrete component surface images was collected and divided into training, validation, and test sets. A subset of images in the training set were annotated with pixel-level crack masks, forming an annotated sample set L. The remaining unannotated images were assigned to an unannotated sample set U. A validation set V was established and remained constant throughout each training iteration for model performance verification. Data augmentation was performed only on the training set, scaling the training images to 224×224 pixels using cropping or bilinear interpolation. Random rotations within the range of 15° to +15° are performed, with a horizontal flipping probability of 0.5. Brightness, contrast, and saturation coefficients are independently sampled from 0.9 to 1.1 for color perturbation enhancement. For crack masks in labeled images and pseudo-label masks in unlabeled images, the same cropping, rotation, and flipping transformation parameters as the images are used. Nearest-neighbor interpolation is used for mask scaling and rotation to maintain binary representation. Color perturbation is applied only to RGB images and not to masks. The validation and test sets only undergo size unification and pixel normalization; no random enhancement operations are performed. S2, Teacher Model Initialization: Initialize the teacher model using the labeled sample set L. Net undergoes supervised training to obtain the initial teacher U. The Net parameter θT serves as the starting point for subsequent semi-supervised iterations; the teacher U Net and subsequent student U Each Net consists of an encoder, a decoder, and skip connections. The encoder extracts multi-scale semantic features through progressive downsampling, the decoder restores spatial resolution through progressive upsampling, and skip connections concatenate the features from each layer of the encoder with the corresponding layers of the decoder to preserve detailed information. All convolutional layers are followed by a Leaky loop with a negative slope of 0.1. The ReLU activation function is used, and the output layer uses the Sigmoid function to map the predicted value of each pixel to the [0,1] interval, which is used as the crack probability output. S3, High-Confidence Pseudo-Label Generation and Validity Mask Construction: Input the unlabeled sample set U into the current teacher U Net outputs a pixel-level crack probability map p. For each pixel, only when p ≥ 0.90 is it assigned to the crack positive class pseudo-label M. At the same time, a corresponding validity mask W is generated so that pixels with p < 0.90 are masked in the subsequent pseudo-label loss calculation and do not participate in the loss contribution. S4, Student Model Training and Dynamically Weighted Loss: In the t-th iteration, t=1, 2, ..., 10, the student model U is trained with the total loss L_total=L_sup+α(t)·L_pseudo. Net, where L_sup is the supervised loss based on the labeled sample set, and L_pseudo is the pseudo-label loss under the constraint of the validity mask W; the supervised loss L_sup is the weighted sum of the binary cross-entropy loss and the Dice loss, with their weight coefficients set to 0.5 and 0.5 respectively; the weight coefficient α(t) is calculated according to the formula α(t) = 0.1 + (t 1) × 0.8 / 9 is used to calculate the weight of the pseudo-label loss, which increases linearly from 0.1 to 0.9 with each iteration, in order to control the influence of the pseudo-label loss in the early stage of training and gradually strengthen its supervisory role in the later stage of iteration. S5, Teacher model condition update based on validation set F1: Student U in each round After Net training is completed, student U is computed on a unified validation set V. Net and current teacher U Net's pixel-level F1 score; only when student U Net's F1 score is no lower than Teacher U's. When using Net's F1, with student U Net parameter update teacher U Net parameter θT; otherwise, retain the original teacher U. The Net parameter θT remains unchanged, and the process proceeds directly to the next round of pseudo-label generation. S6, Crack Binary Map Generation: Input the image to be evaluated into the teacher U, which is finally retained after the tenth iteration. Net, obtain the crack probability map; then, using a segmentation threshold that is predetermined on the validation set V and kept fixed during the same batch of evaluations, the probability map is transformed into a crack binary map B. S7, Fractal Dimension Calculation and Damage Level Determination: For the crack binary image B, the number of non-empty boxes N(Lk) covering crack pixels is counted at multiple box scales Lk. These multiple box scales are square box side lengths that increase or decrease sequentially by a factor of two, denoted as Lk, k=1,2,…,K. At each scale, the crack binary image is covered with a grid of non-overlapping square boxes. The number of boxes containing at least one crack foreground pixel at each box scale is counted, denoted as N(Lk), which is the number of non-empty boxes at that scale. A linear fit is performed with log(1 / Lk) as the abscissa and logN(Lk) as the ordinate. The absolute value of the slope of the fitted line is determined as the crack fractal dimension D. Based on the preset benchmark value D1=1.05, the crack fractal dimension is calculated using the formula DI=(D D1) / (2 D1) Calculate the damage index DI, and output the corresponding damage level according to the following standards based on the numerical range of the fractal dimension D: when D < 1.24, the output is slight damage; when 1.24 ≤ D < 1.525, the output is moderate damage; when 1.525 ≤ D < 1.715, the output is severe damage; when D ≥ 1.715, the output is the damage level, thus realizing the quantitative classification and evaluation of the severity of cracks. S8, Physical Size Conversion and Multi-Dimensional Result Output: When acquiring the image to be evaluated, a scale with known actual dimensions is set on the surface of the concrete component. The proportional relationship between pixel size and actual physical size is established through image processing, and the pixel length and pixel width of the crack are converted into actual physical length and width according to this proportional relationship. If no scale is set or the proportional relationship cannot be established, the length and width values ​​of the crack are output only in pixel units. The output of the evaluation results includes the original image, crack probability map, crack binary map, fractal dimension D, damage index DI, and damage level. The above contents are displayed in the same visualization interface so that samples near the critical damage level can be manually reviewed and judged based on the original image and crack binary map.

[0024] Secondly, the concrete crack semi-supervised identification and damage assessment system of the present invention includes: The image and annotation management module is used to acquire images and manage the annotated sample set L, the unannotated sample set U, and the validation set V. The teacher-student training module is used to perform teacher U-Net initialization, pseudo-label generation, student U-Net training, and teacher model condition update. The crack segmentation module is used to input the image to be evaluated into the final retained teacher U-Net, output the crack probability map and generate the crack binary map B; The box dimension calculation module is used to count the number of non-empty boxes and perform linear fitting at multiple box scales, and calculate the fractal dimension D. The damage index and level determination module is used to calculate the damage index DI and output the corresponding damage level based on the D value. The results output module is used to display and output the evaluation results.

[0025] Thirdly, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program to implement a semi-supervised identification and damage assessment method for concrete cracks.

[0026] The following combination Figures 1 to 7 The specific details of the semi-supervised identification and damage assessment method for concrete cracks in this embodiment are as follows: S1: Enhanced Data Acquisition, Dataset Partitioning, and Preprocessing like Figure 1 As shown, a list of original images is first established and sample numbers are frozen. The data source in this embodiment includes 6077 public crack images (1024×1024 pixels) and 1023 on-site images (3250×3250 pixels), totaling 7100 original images. The total number of data sources is not equal to the number used in a single training session: 800 images are selected for the semi-supervised experiment, with 700 from the public data source and 100 from the on-site data source.

[0027] The 800 images are first divided into a training set, a fixed validation set V, and a test set. Then, images in the training set are selected at a trial ratio of 10%, 30%, or 50% for pixel-level annotation, forming an annotated sample set L. The remaining training images form an unannotated sample set U. The validation set V and the test set do not participate in gradient updates during the ten rounds of teacher-student iterations, nor are they changed with each round.

[0028] The images in L are annotated pixel-by-pixel using Labelme, classifying pixels into crack, background, and ignore categories. A binary crack mask Y and an ignore mask Q are generated from the annotation file. Positions where Q=1 are not included in loss calculation and performance evaluation. Each image in L is associated with Y and Q using the same sample number, while images in U are only retained by their image numbers.

[0029] Data augmentation is performed online in the following order and is applied only to the training samples: (1) Reading and normalization: Read the RGB image I; for labeled samples, read Y and Q simultaneously; for unlabeled samples entering student training, read the pseudo-label M and validity mask W generated in the current round simultaneously. Divide the pixel value of I by 255 to normalize to [0,1], and keep each mask discrete.

[0030] (2) Size uniformity: Prioritize cropping the area containing the main body of the crack; when a 224×224 area cannot be directly obtained, use bilinear interpolation to scale the RGB image to 224×224, and use nearest neighbor interpolation for Y, Q, M and W to avoid generating label values ​​between 0 and 1.

[0031] (3) Synchronous rotation: The rotation angle r∈[ is sampled independently for each training sample. [15°, +15°], the same r is used simultaneously for I and its corresponding Y, Q, M, W. RGB images use bilinear interpolation, and the mask uses nearest neighbor interpolation; the blank areas formed by rotation are filled with background values ​​in the image and marked as background or ignored in the mask.

[0032] (4) Synchronous flipping: Generate uniform random numbers u∈[0,1]; when u<0.5, simultaneously flip I and its corresponding Y, Q, M, W horizontally; when u≥0.5, keep them unchanged to ensure that the enhanced image and the supervision mask are still aligned pixel by pixel.

[0033] (5) Color perturbation: Sample the brightness coefficient b, contrast coefficient c and saturation coefficient s from [0.9,1.1] respectively, and adjust the RGB image in sequence; color perturbation does not apply to Y, Q, M and W.

[0034] (6) Batch generation: The enhanced labeled image and Y, Q are sent to the labeled data loader, and the enhanced unlabeled image and M, W are sent to the pseudo-label data loader. Training batches are formed according to batch size=8. Each epoch resamples r, u, b, c, s to generate different training views from the same original image.

[0035] (7) Validation and test preprocessing: The validation set V and the test set are only subjected to the same 224×224 size unification and [0,1] normalization, without random rotation, flipping, color perturbation or noise injection, so that the F1 scores of different training rounds can be directly compared. After completing this step, the data loading configuration of L, U, V and the test set is output for S2 to call.

[0036] S2: Teacher U-Net Initialization like Figure 6 As shown, the teacher U-Net consists of an encoder, a decoder, and skip connections at corresponding scales. The encoder downsamples step-by-step to extract multi-scale features, and the decoder upsamples step-by-step and concatenates with features at the same scale as the encoder to recover crack edges. After convolution, Leaky-ReLU with a negative slope of 0.1 is used, and the output layer uses a sigmoid function to obtain the probability that each pixel belongs to the crack class. The student U-Net adopts the same structure.

[0037] The initial teacher is trained only once using L. For each batch of labeled images, the teacher U-Net outputs a probability map, and the supervised loss L_sup = 0.5L_BCE + 0.5L_Dice is calculated at Q=0. Then, gradient zeroing, backpropagation, and parameter updates are performed sequentially. The optimizer uses Adam with an initial learning rate of 1×10⁻⁶. - ³ and reduce to 1×10 by cosine annealing. -6 The weight decays to 1×10 -5 , β1=0.9, β2=0.999, ε=1×10 -8 .

[0038] The teacher pre-training is capped at 100 epochs, with weights saved every 5 epochs. After each epoch, pixel-level F1 is calculated on V without enhancement. If the F1 on V does not improve for 10 consecutive epochs, the process terminates early and rolls back to the checkpoint with the highest F1 score, denoted as θT. S2 outputs the initial teacher parameters θT for S3 to generate pseudo-labels.

[0039] S3: Generation of high-confidence crack positive class pseudo-labels and validity masks like Figure 7 As shown, at the beginning of round t, θT is fixed and the teacher U-Net is switched to inference state. Only deterministic size unification and normalization are performed on the images in U, and then they are input into the teacher U-Net in batches according to their numbers, resulting in a crack probability map P of the same size as the input images. No random color perturbation is performed during the pseudo-label generation stage to ensure that the output for the same image is reproducible for the same θT.

[0040] For the i-th pixel in P, perform a threshold comparison: when P_i ≥ 0.90, set M_i = 1 and W_i = 1; when P_i < 0.90, set W_i = 0, and the value of M_i does not participate in subsequent loss. Therefore, only high-confidence positive crack pixels enter the pseudo-label loss, and low-confidence pixels will not be incorrectly backpropagated as background. Save the original images in P, M, W, and U with the same numbering as S4.

[0041] S4: Joint training of student U-Net and dynamic weighting of pseudo-label loss like Figure 2 As shown, in each round of student training, both labeled batches (I_L,Y,Q) and pseudo-label batches (I_U,M,W) are read simultaneously. Synchronization enhancement as described in S1 is performed on I_L, Y, and Q; geometric enhancement and color perturbation are performed on I_U; and only the same clipping, rotation, and flipping as I_U are performed on M and W, with nearest neighbor interpolation used.

[0042] The student U-Net performs forward propagation on I_L and I_U respectively: the supervised loss L_sup is calculated at the position where Q=0; the pseudo-label loss L_pseudo is calculated at the position where W=1, and the position where W=0 is excluded from the numerator and denominator of the loss. In one implementation, both L_sup and L_pseudo adopt 0.5L_BCE+0.5L_Dice, the difference being that the former is supervised by the ground-truth mask Y, while the latter is supervised by M and restricted to valid pixels by W.

[0043] The pseudo-label weight of the t-th round is calculated according to α(t)=0.1+(t 1)×0.8 / 9, where t=1,2,…,10; thus α(1)=0.1, α(10)=0.9. Back propagation is performed with L_total=L_sup+α(t)L_pseudo, and only the student parameter θS is updated. Each round of student training has a maximum of 100 epochs, following the Adam, cosine annealing, checkpoint saving and early stopping rules of S2. S4 outputs the optimal student parameter θS of the current round.

[0044] S5: Teacher parameter update gated by fixed validation set F1 After the student training is completed, θS and the current θT are respectively set to the inference state, and F1_student and F1_teacher are calculated using the same V, the same preprocessing, the same segmentation threshold and the same evaluation procedure. The pixel-level F1 is calculated according to F1=2TP / (2TP+FP+FN), where TP, FP and FN are all accumulated on the validation pixels where Q=0.

[0045] If F1_student≥F1_teacher, θT←θS is executed to replace the teacher with the student of the current round; if F1_student<F1_teacher, the θS of the current round is discarded and θT remains unchanged. When t<10, the updated or retained θT is used to return to S3, re-perform inference on U, and regenerate P, M and W; when t=10, the loop ends, and the final θT, the corresponding validation set F1, the segmentation threshold and the training configuration are saved. This sequence ensures that the pseudo-label of the next round is always generated by a model whose current validation performance is not lower than that of the teacher of the previous round.

[0046] S6: Inference of the to-be-evaluated image and generation of the crack binary map The to-be-evaluated RGB image is converted to 224×224 and normalized according to the deterministic rule of S1, without performing training augmentation; it is input to the final θT to obtain a crack probability map. The segmentation threshold is predetermined on V by comparing the F1 corresponding to the candidate thresholds, and once selected, it remains fixed in the same batch of evaluations. Each pixel is marked as 1 if its probability is not lower than the threshold, otherwise marked as 0, to obtain the crack binary map B.

[0047] The correspondence between the original image number, probability map, segmentation threshold, and B is preserved. B is no longer manually drawn but is directly used as the sole crack geometry input for S7, thus avoiding inconsistencies between the recognition results and damage calculations caused by secondary editing.

[0048] S7: Calculation of Box Dimension, Damage Index, and Damage Grade like Figure 3 As shown, at least three square boxes with side lengths L_k varying by a factor of two are selected; non-overlapping meshes are created for the same B, and each box is checked to see if it contains at least one crack pixel with a value of 1. Those containing such a crack pixel are recorded as non-empty boxes, and the number of non-empty boxes N(L_k) at each scale is counted. The scale set, mesh start point, and counting rules are kept consistent within the same batch.

[0049] A least-squares linear fit was performed with x_k = log(1 / L_k) as the abscissa and y_k = logN(L_k) as the ordinate. The absolute value of the fitted slope was denoted as the crack fractal dimension D. The values ​​of L_k, N(L_k), and the fitting results at each scale were saved for verification. The baseline fractal dimension D1 = 1.05 was taken, and the fit was performed according to DI = (D... D1) / (2 D1) Calculate the damage index DI.

[0050] like Figure 5 As shown, the damage level is output according to the interval where D is located; the corresponding boundary between D and DI is shown in the table below.

[0051] The aforementioned boundaries are empirical screening boundaries established based on surface crack images. For images where D is close to the boundary, the crack width is less than approximately 2 pixels, the lighting is uneven, or there are holes or stains, the system simultaneously provides the original image, the probability image, and B for manual verification. For different materials, reinforcement, component dimensions, stress methods, or service environments, the grade boundaries can be recalibrated while keeping the calculation process unchanged.

[0052] S8: Physical Dimension Conversion and Result Output If the image to be evaluated contains a ruler with an actual length of l_ref, calculate its corresponding pixel length n_ref and establish the ratio s = l_ref / n_ref. After refining B to obtain the crack centerline, accumulate the pixel lengths by the horizontal / vertical step size 1 and the diagonal step size √2 of the adjacent pixels of the centerline, and then multiply by s to obtain the actual crack length; the crack width can be obtained by multiplying the pixel width by B's distance transformation or normal pixel span. If there is no ruler or the ruler recognition fails, the length and width are output only in pixels and are not converted to millimeters.

[0053] The final output record includes the sample number, original image, crack probability map, crack binary map B, segmentation threshold used, each L_k and N(L_k), fitted D, DI, damage level, and the actual crack length and width when available. Figure 4 As shown, the data flows sequentially from the image and annotation management module into the teacher-student training module, crack segmentation module, box dimension calculation module, damage index and grade determination module, and result output module, and is displayed on the same interface. This completes a full assessment from image input to damage grade output.

[0054] Implementation effect verification To verify the semi-supervised process, experiments were conducted with annotation ratios of 10%, 30%, and 50% under the same training configuration. The test sets Precision, Recall, and F1 are shown in the table below.

[0055] With a 50% annotation ratio, the Precision was 0.907, Recall was 0.882, and F1 was 0.881; the F1 of the fully supervised DeepCrack control in the same study was 0.896. These results illustrate that this embodiment can still achieve segmentation performance close to that of the fully supervised control while reducing pixel-level annotations, but do not imply that it outperforms the fully supervised method in all datasets and field environments.

[0056] System and electronic device examples The system utilizes PyQt5 to implement image import, model inference, parameter calculation, visualization verification, and result export. During training, the image and annotation management module provides L, U, and V to the teacher-student training module; during inference, the image to be evaluated sequentially passes through the crack segmentation module, box dimension calculation module, damage index and grade determination module, and result output module. Each module transmits intermediate results via sample numbers, thus enabling the backtracking of the original image, probability map, binary map, and box count records corresponding to any grade result.

[0057] The electronic device includes a processor, memory, and a computer program stored in the memory and executed by the processor. The processor can call upon the CPU or GPU to complete teacher-student training and inference, and perform image processing, model calculation, box counting, damage assessment, and result output according to steps S1 to S8. The program, final θT, segmentation threshold, rank boundary, and evaluation records can all be stored in non-volatile storage media.

[0058] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A semi-supervised method for identifying and assessing damage to concrete cracks, characterized in that... Includes the following steps: S1. Collect images of the concrete component surface, and annotate a portion of these images with pixel-level crack masks to form an annotated sample set L; the remaining unannotated images are assigned to the unannotated sample set U; at the same time, a separate validation set V is established, which remains fixed in each round of training iterations and is used to verify the model performance. S2, using the labeled sample set L, supervised training of the teacher U-Net is performed to obtain the initial teacher U-Net parameters θT, which serve as the starting point for subsequent semi-supervised iterations; S3. Input the unlabeled sample set U into the current teacher U-Net and output a pixel-level crack probability map p. For each pixel, only when p≥0.90 is it assigned to the crack positive class pseudo-label M. At the same time, generate a corresponding validity mask W so that pixels p<0.90 are masked in the subsequent pseudo-label loss calculation. S4, in the t-th iteration, t=1, 2, ..., 10, train the student U-Net with the total loss L_total = L_sup + α(t)·L_pseudo, where L_sup is the supervised loss based on the labeled sample set, and L_pseudo is the pseudo-label loss under the constraint of the validity mask W; the weight coefficient α(t) adopts a piecewise linear growth strategy. S5. After each round of student U-Net training, the pixel-level F1 scores of the student U-Net and the current teacher U-Net are calculated on a unified validation set V. Only when the F1 score of the student U-Net is not lower than that of the teacher U-Net, the teacher U-Net parameters θT are updated with the student U-Net parameters; otherwise, the original teacher U-Net parameters θT are retained and the process proceeds directly to the next round of pseudo-label generation. S6. Input the image to be evaluated into the teacher U-Net that is finally retained after the tenth round of iteration to obtain the crack probability map. Then, using a segmentation threshold that is predetermined on the validation set V and kept fixed in the same batch of evaluation, the probability map is transformed into a crack binary map B. S7, for the binary crack image B, count the number of non-empty boxes N(Lk) covering the crack pixels at multiple box scales Lk, and perform linear fitting with log(1 / Lk) as the abscissa and logN(Lk) as the ordinate. Determine the absolute value of the slope of the fitted line as the crack fractal dimension D; based on the preset benchmark value D1=1.05, calculate DI=(D D1) / (2 D1) Calculate the damage index DI, and output the corresponding damage level according to the D value and DI level classification standard to achieve a quantitative assessment of the severity of cracks.

2. The semi-supervised identification and damage assessment method for concrete cracks according to claim 1, characterized in that: Step S1 preprocesses the collected concrete component surface image dataset by dividing it into training, validation, and test sets; pixel-level crack masking is applied to a portion of the images in the training set to form a labeled sample set L, while the remaining unlabeled images are assigned to the unlabeled sample set U; data augmentation is performed on the training set; the training images are then uniformly scaled to 224×224 pixels via cropping or bilinear interpolation; and data augmentation is applied to the training images. The image is randomly rotated within the range of 15° to +15° and horizontally flipped with a probability of 0.

5. Simultaneously, the brightness, contrast, and saturation coefficients are independently sampled from the range of 0.9 to 1.1 to enhance the color of the image. For the crack mask of the labeled image and the pseudo-label mask corresponding to the unlabeled image, the same cropping, rotation, and flipping transformation parameters as the image are used. The scaling and rotation of the mask use nearest neighbor interpolation to maintain binaryity. The color perturbation is applied only to the RGB image and not to the mask. The validation and test sets are only subjected to size unification and pixel normalization, and no random enhancement operations are performed.

3. The semi-supervised identification and damage assessment method for concrete cracks according to claim 1, characterized in that: Both the teacher U-Net and the student U-Net consist of an encoder, a decoder, and skip connections. The encoder extracts multi-scale semantic features through progressive downsampling, the decoder restores spatial resolution through progressive upsampling, and the skip connections concatenate the features of each layer of the encoder with the corresponding layer of the decoder to preserve detailed information. After all convolutional layers, a Leaky-ReLU activation function with a negative slope of 0.1 is used, and the output layer uses the Sigmoid function to map the predicted value of each pixel to the [0,1] interval as the crack probability output.

4. The method for semi-supervised identification and damage assessment of concrete cracks according to claim 1, characterized in that: The weighting coefficient α(t) is calculated using the formula α(t) = 0.1 + (t) 1) × 0.8 / 9 is calculated, where t = 1, 2, ..., 10, so that the pseudo-label loss weight increases linearly from 0.1 to 0.9 with each iteration; the supervision loss L_sup is the weighted sum of the binary cross-entropy loss and the Dice loss, and their weight coefficients are set to 0.5 and 0.5, respectively.

5. The semi-supervised identification and damage assessment method for concrete cracks according to claim 1, characterized in that: The multiple box scales are square box side lengths that increase or decrease sequentially in a 2:1 relationship, denoted as Lk, k=1,2,…,K. At each scale, non-overlapping square boxes are used to mesh-cover the crack binary image. The number of boxes containing at least one crack foreground pixel at each box scale is counted and denoted as N(Lk), which is the number of non-empty boxes at that scale.

6. The semi-supervised identification and damage assessment method for concrete cracks according to claim 1, characterized in that: The damage level is divided into four levels according to the numerical range of the fractal dimension D: when D < 1.24, the output is slight damage; when 1.24 ≤ D < 1.525, the output is moderate damage; when 1.525 ≤ D < 1.715, the output is severe damage; when D ≥ 1.715, the output is the damage level, thereby realizing the graded output of the severity of crack damage.

7. The method for semi-supervised identification and damage assessment of concrete cracks according to claim 1, characterized in that: When acquiring images to be evaluated, a scale with known actual dimensions is set on the surface of the concrete component. The proportional relationship between pixel size and actual physical size is established through image processing. Based on this proportional relationship, the pixel length and pixel width of the crack are converted into the actual physical length and physical width. If the scale is not set or the proportional relationship cannot be established, the length and width values ​​of the crack are output only in pixel units.

8. The method for semi-supervised identification and damage assessment of concrete cracks according to claim 1, characterized in that: The evaluation results include the original image, crack probability map, crack binary map, fractal dimension D, damage index DI, and damage level. All of these are displayed in the same visualization interface so that samples near the critical damage level can be manually reviewed and judged based on the original image and crack binary map.

9. A semi-supervised identification and damage assessment system for concrete cracks, characterized in that, For performing the semi-supervised identification and damage assessment method for concrete cracks as described in any one of claims 1-8, comprising: The image and annotation management module is used to acquire images and manage the annotated sample set L, the unannotated sample set U, and the validation set V. The teacher-student training module is used to perform teacher U-Net initialization, pseudo-label generation, student U-Net training, and teacher model condition update. The crack segmentation module is used to input the image to be evaluated into the final retained teacher U-Net, output the crack probability map and generate the crack binary map B; The box dimension calculation module is used to count the number of non-empty boxes and perform linear fitting at multiple box scales to calculate the fractal dimension D. The damage index and level determination module is used to calculate the damage index DI and output the corresponding damage level based on the D value. The results output module is used to display and output the evaluation results.

10. An electronic device, characterized in that: The method includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program to implement the semi-supervised identification and damage assessment method for concrete cracks as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Methods for assessing the damage degree of crack fractals in concrete members

    CN107590349B

  • Deep learning concrete bridge crack real-time detection method based on domain adaptation

    CN114693615A

  • Method and System for Detecting and Evaluating Damage of Concrete Components

    CN116152219B