Concrete building crack detection method based on image processing and semantic segmentation

By applying image processing and semantic segmentation technology in the crack detection of concrete buildings, combined with the improved U-Net model, the problems of complex background and noise processing difficulties in the existing technology are solved, efficient and accurate crack detection is achieved, and the error detection rate is reduced.

CN119887645APending Publication Date: 2025-04-25XIJING UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411884790.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The prior art has complex background and noise processing difficulties in the detection of cracks in concrete buildings, resulting in a high error detection rate and a lack of automated and efficient detection methods.

Method used

Using an image processing and semantic segmentation method, the U-Net model combines batch normalization and HardTanh activation function to automatically identify and detect cracks in concrete building. The method includes data preprocessing, feature annotation, model training and detection steps.

Benefits of technology

It realizes rapid and efficient identification of cracks in concrete buildings, reduces the false detection rate, improves the accuracy and recognition rate of detection, and has the ability to monitor real-time, contactless detection and adapt to complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119887645A_ABST
    Figure CN119887645A_ABST
Patent Text Reader

Abstract

The invention discloses a concrete building crack detection method based on image processing and semantic segmentation. The method comprises the following steps: constructing a concrete building crack data set; preprocessing the concrete building crack image; marking the concrete building crack image; classifying the concrete building crack annotation drawing and inputting the concrete building crack annotation drawing into a U-Net model improved by a HardTanh activation function for training; the trained model is used for crack detection and extraction; the concrete building crack detection method based on image processing and semantic segmentation can accurately identify cracks in the input image, can eliminate noisy points in the image, has high accuracy and high identification rate, has significant advantages in the aspects of real-time monitoring capability, non-contact detection, complex environment adaptation and the like, can reduce personal errors, and has good application prospects. The detection cost is reduced, the automation and intelligence level of detection is improved, and meanwhile, the method has the potential of further optimization and light weight so as to adapt to wider application scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of image processing, and in particular relates to a concrete building crack detection method based on image processing and semantic segmentation. Background Art

[0002] With the acceleration of urbanization, building maintenance and safety inspection have become particularly important. Cracks are a common manifestation of building damage, and their detection and evaluation are crucial to preventing further deterioration of building structures. Traditional manual detection methods are inefficient and pose safety risks. The development of image processing technology and deep learning has made automated crack detection possible. However, existing technologies have challenges in complex background and noise processing, resulting in a high false detection rate. Therefore, the development of automated and efficient crack detection technology has become an urgent need. Summary of the invention

[0003] In view of the shortcomings of the prior art, the purpose of the present invention is to provide a concrete building crack detection method based on image processing and semantic segmentation, which can quickly and efficiently identify concrete building cracks, and the data is objective and true, the evaluation accuracy is high, and the mobility is strong.

[0004] In order to achieve the above object, the present invention adopts the following technical solutions:

[0005] A method for detecting cracks in concrete buildings based on image processing and semantic segmentation comprises the following steps:

[0006] Step 1: Obtain a concrete building crack image dataset;

[0007] Step 2: correcting, normalizing and data enhancing the concrete building crack image obtained in step 1;

[0008] Step 3: annotate crack features on the image preprocessed in step 2 to construct a concrete building crack annotation dataset;

[0009] Step 4: Use batch normalization HardTanh activation function after each convolution layer of the U-Net model to obtain an improved U-Net model; divide the concrete building crack annotation dataset obtained in step 3 into a training set, a validation set, and a test set, import the test set into the improved U-Net model, set the training parameters, and obtain the optimal model for concrete building crack detection;

[0010] Step 5: Input the unlabeled new concrete building crack image into the optimal concrete building crack detection model for automatic crack recognition and detection.

[0011] Preferably, the correction and normalization processing and data enhancement described in step 2 include:

[0012] Correct the angle of the image of the concrete building cracks to obtain a front view of the cracks;

[0013] Normalize the concrete building crack image to 224×224 pixel size;

[0014] The concrete building crack images are augmented by random rotation, translation, flipping, and scaling to increase the diversity and robustness of the dataset.

[0015] Preferably, the HardTanh activation function expression is as follows:

[0016]

[0017] Wherein, the max_val of the HardTanh activation function is set to -1 and the min_val is set to 1.

[0018] Preferably, in the step 4, the concrete building crack annotation dataset is further divided into a training set, a validation set and a test set according to a ratio of 0.8, 0.1, and 0.1.

[0019] Preferably, the training parameters described in step 4 include the number of training rounds, the learning rate and the batch size.

[0020] Furthermore, the number of training rounds is 20.

[0021] Furthermore, the learning rate is set to 1e-4.

[0022] Furthermore, the batch size is 1.

[0023] Compared with the prior art, the present invention has the following technical effects:

[0024] The present invention combines the semantic segmentation technology in image processing and deep learning, and uses the cross-validation method to iteratively train the improved U-Net with the data set for multiple times, so as to obtain a building crack recognition network model with excellent robustness and generalization ability through small sample training. The model can accurately identify cracks in the input image and eliminate noise in the image, and has both high accuracy and high recognition rate. It has significant advantages in real-time monitoring capability, non-contact detection, and adaptability to complex environments. It can reduce human errors, reduce detection costs, and improve the automation and intelligence level of detection. At the same time, it has the potential for further optimization and lightweighting to adapt to a wider range of application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 It is the operation flow chart of the concrete building crack detection method based on image processing and semantic segmentation;

[0026] Figure 2Schematic diagram of the collected concrete building crack dataset;

[0027] Figure 3 Schematic diagram of the concrete building crack dataset after preprocessing;

[0028] Figure 4 Label crack features and label diagrams for Labelme software;

[0029] Figure 5 This is a schematic diagram of the improved U-Net architecture;

[0030] Figure 6 This is the crack detection effect diagram of the trained U-Net model. DETAILED DESCRIPTION

[0031] The specific contents of the present invention are further explained in detail below in conjunction with embodiments.

[0032] This embodiment provides a concrete building crack detection method based on image processing and semantic segmentation. The operation flow chart is as follows: Figure 1 As shown, the following steps are included:

[0033] Step 1. Use iPhone14 smartphones, half-frame digital cameras, DJI Mini3 drones and other devices to capture and collect images of cracks in concrete buildings to be identified and detected, and combine them with images of cracks in concrete buildings collected by domestic and foreign experts on the open source database git-hub. In order to ensure the comprehensiveness of the dataset and the generalization of the U-Net model after training, different types of crack images (longitudinal cracks, oblique cracks, "Y"-shaped cracks, mesh cracks, etc.) and concrete building crack images with uneven lighting and containing noise such as shadows, mud stains, and exposure are collected in the dataset. There are about 400 self-shot crack images and about 600 crack images collected by git-hub. The collected crack images are as follows: Figure 2 As shown;

[0034] Step 2: Perform angle correction on the concrete building crack image in step 1 to obtain a front view of the crack, and use the OpenCV function in the image processing library built into the PyCharm software to normalize these images to a size of 224×224 pixels to meet the input requirements of the U-Net model; use the OpenCV function in the image processing library built into the PyCharm software to perform random rotation, translation, flipping, scaling and other data enhancement operations on the concrete building crack image to increase the diversity and robustness of the data set, thereby achieving the purpose of data enhancement. The preprocessed crack image is shown in Figure 3 shown.

[0035] Step 3: Use Labelme software to annotate crack features on the images preprocessed in step 2. Use straight lines to select crack features on crack images one by one, label each crack image, and save it as a .json feature file containing target category, straight line crack feature box, and detection target location information to construct a concrete building crack annotation dataset. The Labelme software annotates crack features and labels them. Figure 4 As shown;

[0036] Step 4: Divide the annotated .json feature file into training set, validation set, and test set according to the ratio of 0.8, 0.1, and 0.1. Import the training set, validation set, and test set into the U-Net model, and use the batch normalization HardTanh activation function after each convolution layer to improve the convergence speed and accuracy of the network during the training phase. The HardTanh activation function expression is as follows:

[0037]

[0038] Where: The output range of the HardTanh activation function is between the given minimum and maximum values, and values ​​outside this range will be truncated. This makes it have the computational efficiency of the traditional ReLU function and avoids the gradient vanishing problem of the traditional ReLU function. In this study, the max_val of the HardTanh activation function is set to -1 and the min_val is set to 1, so that the expected value of the output of the activation function is as close to -1 and 1 as possible.

[0039] The improved U-Net model architecture is as follows Figure 5 As shown in the figure, the U-Net running virtual environment is configured, the number of training rounds is set to 20, the learning rate is set to 1e-4, and the batch size is 1. CPU conditions are used for training, where the training set is used for training parameter fitting, the validation set is used for training hyperparameter adjustment to prevent overfitting, and the test set is used to verify the effect and generalization of model training. Finally, the optimal model for concrete building crack detection is obtained.

[0040] Step 5: Use the best model trained in step 4 to input a new unlabeled concrete building crack image for automatic crack recognition and detection. The trained U-Net model can recognize and detect cracks. Figure 6 shown.

[0041] In the crack detection task, crack pixels are defined as positive samples and non-crack pixels are defined as negative samples. In order to systematically evaluate the performance of the improved U-Net in this study, we adopted three core evaluation indicators: precision (Pr), recall (Re) and F1 score (F1), which are defined as:

[0042]

[0043] Where: TP refers to the number of true positives in crack identification, FP refers to the number of false positives in crack identification, and FN refers to the number of false negatives in crack identification.

[0044] As shown in Table 1, we made a quantitative comparison between the improved U-Net and the traditional U-Net. It can be seen that in crack segmentation detection, the improved U-Net is superior to the traditional U-Net in all three indicators.

[0045] Table 1 Comparison of U-Net and traditional methods

[0046]

[0047] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.

Claims

1. A concrete building crack detection method based on image processing and semantic segmentation, characterized in that: The following steps are involved: Step 1: Obtain a concrete building crack image dataset; Step 2: correcting, normalizing and data enhancing the concrete building crack image obtained in step 1; Step 3: annotate crack features on the image preprocessed in step 2 to construct a concrete building crack annotation dataset; Step 4: Use batch normalization HardTanh activation function after each convolutional layer of the U-Net model to obtain the improved U-Net model; The concrete building crack annotation dataset obtained in step 3 is divided into a training set, a validation set, and a test set. The test set is imported into the improved U-Net model, and the training parameters are set to obtain the optimal model for concrete building crack detection. Step 5: Input the unlabeled new concrete building crack image into the optimal concrete building crack detection model for automatic crack recognition and detection.

2. The method for detecting cracks in concrete buildings based on image processing and semantic segmentation as claimed in claim 1, characterized in that: The correction and normalization processing and data enhancement described in step 2 include: Correct the angle of the image of the concrete building cracks to obtain a front view of the cracks; Normalize the concrete building crack image to 224×224 pixel size; The concrete building crack images are augmented by random rotation, translation, flipping, and scaling to increase the diversity and robustness of the dataset.

3. The method for detecting cracks in concrete buildings based on image processing and semantic segmentation as claimed in claim 1, characterized in that: The HardTanh activation function expression is as follows: Wherein, the max_val of the HardTanh activation function is set to -1 and the min_val is set to 1.

4. The method for detecting cracks in concrete buildings based on image processing and semantic segmentation as claimed in claim 1, characterized in that: In the step 4, the concrete building crack annotation dataset is further divided into a training set, a validation set and a test set according to a ratio of 0.8, 0.1, and 0.

1.

5. The method for detecting cracks in concrete buildings based on image processing and semantic segmentation as claimed in claim 1, characterized in that: The training parameters described in step 4 include the number of training rounds, learning rate, and batch size.

6. The method for detecting cracks in concrete buildings based on image processing and semantic segmentation as claimed in claim 5, characterized in that: The number of training rounds is 20.

7. The method for detecting cracks in concrete buildings based on image processing and semantic segmentation as claimed in claim 5, characterized in that: The learning rate is set to 1e-4.

8. The method for detecting cracks in concrete buildings based on image processing and semantic segmentation as claimed in claim 5, characterized in that: The batch size is 1.

Citation Information

Cited By

  • Concrete crack intelligent identification method and system based on polyline marking

    CN120543973A