A Smart Detection Method for Concrete Surface Cracks Based on an Improved Mask R-CNN Model
By improving the Mask R-CNN model and employing a cascaded multi-threshold detector, a ConvNext network, and a novel scoring strategy, the problems of low detection accuracy and poor mask segmentation were solved, achieving more accurate concrete crack detection and segmentation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-14
- Publication Date
- 2026-04-07
AI Technical Summary
Existing Mask R-CNN models suffer from low detection accuracy, poor mask segmentation quality, and inaccurate localization in concrete surface crack detection. In particular, they are prone to misidentification as multiple cracks when the image pixel count is low or the cracks are close to the background pixels.
The improved Mask R-CNN model uses a cascaded multi-threshold detector, a ConvNext network as the feature extraction network, and introduces a new scoring strategy, including adding a mask branch on the Mask Head, to optimize the model structure and improve detection accuracy and mask quality.
It significantly improves detection accuracy and mask segmentation quality, enhances crack detection and segmentation, and improves the model's localization accuracy and robustness.
Smart Images

Figure CN117011518B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer vision in deep learning, and relates to an intelligent detection method for cracks on concrete surfaces based on an improved Mask R-CNN model. Background Technology
[0002] Concrete, as a building material, is widely used in infrastructure such as bridges, tunnels, highways, buildings, and railways. Due to factors such as temperature effects, external loads, uneven foundation settlement, and concrete shrinkage, cracks inevitably appear in concrete structures during their later use. Cracks not only affect the aesthetics of concrete structures but also reflect their stress state and durability, posing potential safety hazards. Therefore, accurately and efficiently detecting and promptly repairing cracks on the surface of concrete structures is of paramount importance for maintaining their health and safety.
[0003] Currently, the main methods for detecting cracks on concrete surfaces are manual visual inspection and digital image processing. Manual visual inspection requires staff to conduct on-site surveys, manually measure, and record the crack findings. However, manual inspection suffers from low efficiency, susceptibility to subjective factors affecting staff, resulting in low accuracy, long processing times, and overall low efficiency. Digital image processing effectively addresses the shortcomings of manual visual inspection, but this method requires high image quality, is significantly affected by external factors such as lighting, shadows, and occlusion, and exhibits low robustness and weak generalization ability.
[0004] With the rapid development of computer vision, deep learning methods are gradually replacing traditional image processing techniques. This method is less affected by factors such as lighting intensity and noise, and requires no preprocessing of the acquired images. Instead, it trains a deep learning model on a large amount of data to learn the relevant features of cracks, thereby achieving crack detection and extraction. Deep learning-based crack detection methods have advantages such as low cost, high accuracy, and high speed, and exhibit good robustness in image recognition and detection.
[0005] In recent years, deep learning-based crack detection methods have achieved considerable success. The Mask R-CNN algorithm combines object detection and semantic segmentation, enabling it to not only locate and segment cracks in images but also distinguish between different individuals with the same type of crack. However, this algorithm suffers from several technical problems when detecting cracks, including low detection accuracy, poor mask segmentation quality, inaccurate localization, and the tendency to misidentify a single crack as multiple cracks when the image resolution is low or the crack's pixel count is close to the background resolution. Summary of the Invention
[0006] Based on this, an intelligent detection method for concrete surface cracks based on an improved Mask R-CNN model is proposed. This method can solve the problems of low detection accuracy, poor mask segmentation quality, inaccurate positioning, and misidentification of one crack as multiple cracks in existing algorithms for concrete surface crack detection.
[0007] This invention provides an intelligent method for detecting cracks on concrete surfaces based on an improved Mask R-CNN model, comprising the following steps:
[0008] (1) Crack datasets are obtained by collecting actual concrete images. The datasets include data on cracks appearing on the surfaces of concrete pavements, track slabs, buildings, and bridge structures.
[0009] (2) Perform data augmentation on the acquired crack data;
[0010] (3) Mark and label all crack data pixel by pixel;
[0011] (4) Divide the labeled dataset into a training set and a test set;
[0012] (5) Construct a network model, which consists of a feature extraction network, a region candidate network, a classification and regression network, and a masking network;
[0013] (6) Input the divided dataset into the constructed model for training, select the optimizer type, and set the learning rate, number of batches, number of training rounds of the dataset, momentum settings, weight decay coefficient and other hyperparameters.
[0014] (7) Input the test dataset into the trained network model to obtain the model detection accuracy, crack image detection and segmentation results.
[0015] Furthermore, in step (2), data augmentation operations are performed on the acquired crack data, including 90-degree rotation, 180-degree rotation, 270-degree rotation, mirror symmetry, salt and pepper noise, Gaussian noise, blurring, brightness enhancement, and brightness reduction.
[0016] Furthermore, in step (4), the labeled dataset is divided into a training set and a test set in a 9:1 ratio.
[0017] Furthermore, in step (7), the detection result of the crack image includes using a rectangular box in the original crack image to frame the part belonging to the crack and the probability that the framed part is a crack.
[0018] Furthermore, in step (7), the segmentation result of the crack image includes generating a colored mask at the crack, and using the quality of the mask to reflect the segmentation effect, thereby obtaining the trend and geometric features of the crack.
[0019] Compared with the prior art, the advantages of the present invention are as follows:
[0020] This invention presents an intelligent concrete surface crack detection method based on an improved Mask R-CNN model. By modifying the model structure, it addresses the problems of low detection accuracy, poor mask segmentation quality, inaccurate localization, and misidentification of a single crack as multiple cracks when the image pixel count is low or the crack is close to the background pixel count. First, a cascaded multi-threshold detector is employed to continuously improve the quality of the detection boxes and the accuracy of model localization, resolving the issues of inaccurate localization and misidentification of a single crack as multiple cracks in the original model. Second, to further improve the model's detection accuracy, the feature extraction network of the original model is replaced with a ConvNext network, enhancing the model's ability to extract crack features and improving crack detection accuracy. Finally, a new scoring strategy is introduced, adding a mask branch to the model's Mask Head to measure mask quality, thereby obtaining an accurate mask quality score. This invention can effectively perform the tasks of concrete crack detection, classification, and segmentation. Attached Figure Description
[0021] Figure 1 The flowchart is a process for the intelligent detection method of concrete surface cracks based on the improved Mask R-CNN model of the present invention.
[0022] Figure 2 This is a diagram showing the data augmentation results of the present invention;
[0023] Figure 3 This is a schematic diagram of the dataset annotation of the present invention;
[0024] Figure 4 This is a schematic diagram of the structure of the improved Mask R-CNN model of this invention;
[0025] Figure 5 This is a schematic diagram of the ConvNext module structure in the feature extraction network part of the present invention;
[0026] Figure 6 This is a schematic diagram of the connected multi-threshold detector structure of the present invention;
[0027] Figure 7 This is a schematic diagram illustrating the new scoring strategy introduced in the mask portion of the present invention;
[0028] Figure 8 This is a comparison chart showing the detection results of the improved Mask R-CNN model of the present invention applied to actual crack images, compared to the original image and the original Mask R-CNN model. Detailed Implementation
[0029] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. The described examples are merely one aspect of the present invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0030] This invention provides an intelligent method for detecting cracks on concrete surfaces based on an improved Mask R-CNN model, comprising the following steps:
[0031] (1) A crack dataset was obtained by collecting actual concrete images. To improve robustness and generalization ability, the dataset includes cracks on various structural surfaces such as concrete pavement, track slabs, buildings, and bridges. Specifically, photos of cracks on concrete surfaces were taken with a mobile phone. The photos mainly consist of linear cracks and include various situations such as bridges, track slabs, highways, and buildings, which together constitute the crack dataset.
[0032] (2) In order to improve the generalization ability of the network and avoid overfitting of the model, data augmentation operations are performed on the acquired crack data, including 90-degree rotation, 180-degree rotation, 270-degree rotation, mirror symmetry, salt and pepper noise, Gaussian noise, blurring, brightness enhancement and brightness reduction, so that the model can be trained normally, learn the relevant features of cracks, avoid overfitting, and improve the robustness and generalization ability of the network model.
[0033] (3) All crack data are annotated and labeled pixel by pixel. Specifically, before inputting concrete crack images into the network model, the foreground and background of the images need to be distinguished so that the model can learn the features of the cracked parts and identify the cracks in the images. All crack images are annotated and labeled pixel by pixel using the labelme software;
[0034] (4) Divide the labeled dataset into training set and test set in a ratio of 9:1. Use 90% of the dataset to train the network model, adjust the parameters, save the model and related parameter values, and use the remaining 10% of the data to test the model and calculate the accuracy of the model in detecting cracks.
[0035] (5) Construct a network model, which consists of a feature extraction network, a region candidate network, a classification and regression network, and a masking network;
[0036] The improved model is mainly improved in the following three aspects: first, multiple different threshold detectors are cascaded; second, the feature extraction network is improved; and third, a new scoring strategy is introduced. The structure of the improved Mask R-CNN model is shown in the attached figure. Figure 4 As shown. The original Mask R-CNN model uses a ResNet network for feature extraction, which mainly uses 1x1 and 3x3 convolutions for feature extraction. For small objects like cracks, where the foreground pixels are much smaller than the background pixels, the feature extraction capability is insufficient, making it impossible to effectively extract crack features, thus reducing the model's detection accuracy. Therefore, this invention uses ConvNext for the feature extraction network. The ConvNext network is based on the ResNet network and is a fully convolutional neural network. In the original ResNet network, the number of times the blocks are stacked in conv4_x is the most. The number of times the blocks are stacked in stage 1 to stage 4 of the original feature extraction network are (3, 4, 6, 3), with a ratio of approximately 1:1:2:1. Now, the number of times the blocks are stacked is adjusted from (3, 4, 6, 3) to (3, 3, 9, 3).
[0037] Compared to the ResNet-Block module, the ConvNext-Block module, as a basic network skeleton unit, has five improvements, as shown in the appendix. Figure 5 As shown, ConvNext-Block reduces model parameters by employing depthwise separable convolutions, addressing the feature loss issue present in ordinary convolutions and enabling better fusion of feature maps. The original ResNet-Block module has 256 input channels, 64 intermediate channels, and 256 output channels, while the improved module has 96 input channels, 384 intermediate channels, and 96 output channels. The use of an inverse bottleneck layer structure avoids the loss of feature information due to the reduced number of channels, improving model accuracy. Replacing 3×3 convolutional kernels in the ResNet module with larger 7×7 kernels increases the model's receptive field, enhancing its ability to acquire global image information. Replacing Batch Normalization (BN) layers with LayerNormalization (LN) layers and using GELU activation functions instead of ReLU activation functions improves the network model's expressive power and efficiency. Adding layerscale to the feature output of each layer makes the model focus more on features belonging to cracks, improving its ability to extract features from small cracks.
[0038] The original Mask R-CNN network uses a single-threshold detector, typically setting the threshold to 0.5 to ensure a balance between positive and negative samples. However, this threshold is unsuitable for detecting cracks, which are irregularly shaped and vary in length, size, and dimensions. It can easily lead to inaccurate crack localization and misidentification of a single crack as multiple cracks. Directly increasing the threshold results in a small percentage of cracks being used as positive samples during training, leading to an imbalance between positive and negative samples and causing weight errors in subsequent classification and regression networks.
[0039] Therefore, to address the problem of inaccurate localization and misidentification of a single crack as multiple cracks in crack detection, this invention improves the classification and regression network by concatenating multiple threshold detectors on top of the Mask R-CNN network structure. Each detector consists of ROI Align, a fully connected layer, a classification network, and a bounding box regression network, as shown in the attached figure. Figure 6 As shown, the model uses the RoI Align layer and a fully connected layer to perform classification and bounding box regression on the obtained crack features. The candidate boxes generated by the first detector are then fed into a second threshold detector, which continues classification and bounding box regression. The newly generated candidate boxes are then fed into a third threshold detector, and so on. The threshold values for later detectors are higher, resulting in smaller discrepancies between the generated detection boxes and the actual boxes. This method continuously updates and improves the quality of candidate boxes, allowing more samples belonging to cracks to be used in training, balancing positive and negative samples during model training, and preventing overfitting. By adding threshold detectors to continuously improve the quality of candidate boxes, the model's localization becomes more accurate, and the detection precision is also improved.
[0040] The number of detectors has a certain impact on the model's detection performance; excessive cascading of detectors can actually lead to decreased model accuracy and reduced detector performance. In object detection tasks that determine the desired object category, the IoU threshold must not be less than 0.5, and the initial threshold for the Mask R-CNN model was set to 0.5. Therefore, to ensure a constant threshold increase, an appropriate number of positive samples, high detection accuracy, and better address overfitting issues caused by increasing the threshold, this invention chooses to continuously increase the threshold of subsequent detectors in increments of 0.1. This invention ultimately selects three detectors, with corresponding thresholds of 0.5, 0.6, and 0.7, respectively.
[0041] Because of the three threshold detectors, the first two only perform classification and regression tasks without involving mask calculation, while only the third threshold detector performs classification, regression, and segmentation tasks. Furthermore, a strategy of concatenating object detection and mask branches is employed, using classification confidence as the mask quality score. The accuracy of object bounding box localization directly affects the segmentation result, but there is no strong correlation between mask quality and classification score. Therefore, the resulting mAP value cannot accurately assess the actual quality of the mask portion. Thus, to obtain the true mask quality score, this paper introduces a new scoring strategy: adding a mask branch (MaskIOU Head) to the model's Mask Head to measure mask quality, thereby deriving an accurate mask quality score. The network architecture is shown in the attached figure. Figure 7 As shown. The model obtains a 14×14×256 feature map after passing through the RoI Align layer. This feature map is then passed through a masking network to obtain a 28×28×1 feature map. The improved model concatenates the 14×14×256 feature map obtained from the original model's RoI Align layer with the 28×28×1 feature map obtained from the masking network, resulting in a 14×14×257 feature map. Similar to the classification and regression network, convolution and fully connected operations are performed on the 14×14×257 feature map to predict the IoU between the input mask and the ground truth mask, thus obtaining the MaskIoU regression score. The final Mask score is calculated using the following formula:
[0042] ;
[0043] (6) Input the divided dataset into the constructed model for training. Select the optimizer type and set the learning rate, number of batches, number of training epochs, momentum settings, weight decay coefficient, and other hyperparameter values. The learning rate is dynamically adjusted, with an initial learning rate of 0.0001. The model is trained for 36 epochs and 100,000 iterations. The SGD optimizer is used, with momentum set to 0.9 and weight decay coefficient set to 0.0001. As training progresses, crack features are continuously extracted through the convolutional layers in the network structure, the model weights are continuously updated, and the loss value continuously decreases until it eventually stabilizes. When the model's loss value reaches its minimum, save the model and its optimal weights and related hyperparameter values.
[0044] (7) Input the test dataset into the trained network model to obtain the model's detection accuracy, crack image detection, and segmentation results. The detection part uses rectangular boxes to outline the cracks in the original crack image and the probability that the outlined part is a crack. The segmentation part generates colored masks at the cracks, and the segmentation effect is reflected by the quality of the masks. The segmentation results can be further used to obtain information such as the crack's trend and geometric features.
[0045] For example, in one implementation, the Ubuntu 18.04 operating system is used, and the specific computer configuration is: Intel i7-12700H, 16GB of memory, NVIDIA RTX3060 graphics card, 6GB of video memory.
[0046] The experimental environment configuration for this embodiment of the invention is as follows: CUDA 11.1, CUDNN 8.0.5, mmcv 1.6.1, python 3.7, Pytorch 1.8.0.
[0047] Please see Figure 1 The intelligent detection method for concrete surface cracks based on the improved Mask R-CNN model includes the following steps:
[0048] (1) Obtain the crack dataset
[0049] The dataset consists of photos of cracks on concrete surfaces taken with a mobile phone. The photos mainly show linear cracks and include various types of cracks, such as those on bridges, railway tracks, highways, and buildings.
[0050] (2) Data Augmentation
[0051] To improve the generalization ability of the network and avoid model overfitting, this invention performs data augmentation on the acquired crack data images, employing methods such as 90-degree rotation, 180-degree rotation, 270-degree rotation, mirror symmetry, salt-and-pepper noise, Gaussian noise, blurring, brightness enhancement, and brightness reduction. Figure 2 As shown, this allows the model to train and learn normally, avoiding overfitting and improving the robustness and generalization ability of the network model.
[0052] (3) Data labeling
[0053] Using LabelMe software, the crack morphology is marked pixel by pixel and labeled. In this embodiment, the label is named "crack". Figure 3 As shown, the labeled dataset was randomly divided into training and test sets in a 9:1 ratio, resulting in 5678 training images and 631 test images.
[0054] (4) Model building
[0055] To address the issues of low detection accuracy, poor mask segmentation quality, inaccurate localization, and misidentification of a single crack as multiple cracks when the image resolution is low or the crack is close to the background pixel count, this invention improves upon the Mask R-CNN model. The improved model primarily achieves improvements in the following three aspects: First, it cascades multiple different threshold detectors, such as... Figure 6 As shown; secondly, improve the feature extraction network, such as Figure 5 As shown; thirdly, introduce new scoring strategies, such as Figure 7 As shown. The entire detection process of the model is as follows. Figure 4 As shown, the process begins with inputting a preprocessed image of concrete surface cracks into the ConvNext feature extraction network. The image is stored as a two-dimensional matrix in the network, and feature maps of different sizes are obtained by performing inner product operations with convolutional kernels of different scales. A preset number of Regions of Interest (ROIs) is assigned to each point on the feature map. Next, candidate ROIs are input into a Region Proposal Network (RPN) for binary classification and bounding box regression. These candidate ROIs are then filtered to identify the most likely crack regions. The filtered candidate boxes undergo ROI Alignment, transforming the feature map to a fixed size. The normalized feature map is then subjected to classification and bounding box regression. The regression-generated candidate boxes are then fed into a threshold detector, which performs classification, regression, and segmentation tasks.
[0056] The number of detectors has a certain impact on the detection performance of the model. An appropriate number of detectors will improve the model's detection performance, while too many detectors will lead to a decrease in the model's detection accuracy and a reduction in detector performance. This invention selected 2, 3, and 4 detectors for analysis, and the results are shown in Table 1. The results show that the model has the best detection performance when cascaded with 3 detectors, where mAP@50 represents the average accuracy at an IOU threshold of 0.5.
[0057] ;
[0058] Therefore, as Figure 6 As shown, the present invention employs three threshold detectors, with IOU thresholds of 0.5, 0.6, and 0.7 respectively.
[0059] (5) Training the model
[0060] The partitioned dataset is input into the constructed model for training. The optimizer type is selected, and hyperparameters such as learning rate, number of batches, number of training epochs, momentum setting, and weight decay coefficient are set. In this embodiment, the learning rate is dynamically adjusted, with an initial learning rate of 0.0001. Training is conducted for 36 epochs, performing 100,000 iterations. The SGD optimizer is used, with momentum set to 0.9 and weight decay coefficient set to 0.0001.
[0061] The loss function during model training consists of three parts: classification loss, bounding box regression loss, and mask loss, as shown in the formula: ;
[0062] The classification loss uses the binary cross-entropy loss function, the formula of which is: ;
[0063] Among them, when y i The value is 1 for positive samples and 0 for negative samples, p i This represents the probability that the prediction is a crack.
[0064] The bounding box regression loss uses the Smooth L1 loss function, and the formula is as follows: ;
[0065] Where x represents the numerical difference between the predicted bounding box and the ground truth bounding box.
[0066] The mask loss uses the binary cross-entropy loss function, the formula of which is:
[0067] ;
[0068] Where N represents the total number of pixels in the image, y i The label represents the i-th pixel, with 1 for the foreground and 0 for the background. i This represents the probability that the i-th pixel is predicted to be a crack.
[0069] (6) Verification model and crack detection results
[0070] To better compare the detection performance of the models, the COCO evaluation metric was adopted. AP@50 represents the model's average accuracy at a threshold of 0.5. mAP, the mean average accuracy, represents the average AP across all categories and reflects the model's overall performance. Since this embodiment only has one category, cracks, the mAP value is equal to the AP value. The detection results of the Mask R-CNN model for cracks on concrete surfaces are shown in Table 2.
[0071] ;
[0072] As shown in Table 2, with an IoU threshold of 0.5, the improved model increases the detection mAP value from 91.5% to 98.9% and the segmentation mAP value from 65.2% to 81.3%. Comparative analysis shows that the improved model has significantly improved detection accuracy and segmentation accuracy compared to the original model, by 7.4% and 16.1%, respectively.
[0073] The comparison of crack detection results before and after model improvement is shown in the figure below. Figure 8 As shown in the figure, the leftmost image is the original image, the middle image is the detection result of the original Mask R-CNN model, and the rightmost image is the detection result of the improved Mask R-CNN model. It can be seen from the figures that the improved Mask R-CNN model performs more detailed crack detection and segmentation, improving upon issues such as incomplete crack detection boxes, misidentification of a single crack as multiple cracks, and low mask quality that often occur with the Mask R-CNN model. The improved model can generate high-quality crack detection boxes while enhancing crack detection and segmentation capabilities, improving mask quality, and enabling the segmentation of crack pixels.
[0074] This invention presents an intelligent concrete surface crack detection method based on an improved Mask R-CNN model. By modifying the model structure, it addresses the problems of low detection accuracy, poor mask segmentation quality, inaccurate localization, and misidentification of a single crack as multiple cracks when the image pixel count is low or the crack is close to the background pixel count. First, a cascaded multi-threshold detector is employed to continuously improve the quality of the detection boxes and the accuracy of model localization, resolving the issues of inaccurate localization and misidentification of a single crack as multiple cracks in the original model. Second, to further improve the model's detection accuracy, the feature extraction network of the original model is replaced with a ConvNext network, enhancing the model's ability to extract crack features and improving crack detection accuracy. Finally, a new scoring strategy is introduced, adding a mask branch to the model's Mask Head to measure mask quality, thereby obtaining an accurate mask quality score. This invention can effectively perform the tasks of concrete crack detection, classification, and segmentation.
[0075] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not limited to the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for intelligent detection of concrete surface cracks based on an improved Mask R-CNN model, characterized in that, Includes the following steps: (1) Crack datasets are obtained by collecting actual concrete images. The datasets include data on cracks appearing on the surfaces of concrete pavements, track slabs, buildings, and bridge structures. (2) Perform data augmentation on the acquired crack data; (3) Mark and label all crack data pixel by pixel; (4) Divide the labeled dataset into a training set and a test set; (5) Construct a network model, which consists of a feature extraction network, a region candidate network, a classification and regression network, and a mask network. The network structure is based on the original Mask R-CNN network structure with multiple threshold detectors connected in series. The first two detectors are composed of a classification network and a regression network, and the third detector is composed of a classification network, a regression network, and a mask network. On the basis of the mask network of the third threshold detector of the model, a mask branch for measuring mask quality is added. The feature extraction network of the model adopts the ConvNext network with a 7x7 kernel and the activation function is GELU. The number of channels of the feature extraction network module is replaced by 96, 384, and 96 instead of 256, 64, and 256. The model cascades three detectors with thresholds of 0.5, 0.6, and 0.
7. (6) Input the divided dataset into the constructed model for training, select the optimizer type, and set the learning rate, number of batches, number of training rounds of the dataset, momentum settings, weight decay coefficient and other hyperparameters. (7) Input the test dataset into the trained network model to obtain the model detection accuracy, crack image detection and segmentation results.
2. The intelligent detection method for concrete surface cracks based on the improved Mask R-CNN model according to claim 1, characterized in that, In step (2), data augmentation operations are performed on the acquired crack data, including 90-degree rotation, 180-degree rotation, 270-degree rotation, mirror symmetry, salt and pepper noise, Gaussian noise, blurring, brightness enhancement, and brightness reduction.
3. The intelligent detection method for concrete surface cracks based on the improved Mask R-CNN model according to claim 1, characterized in that, In step (4), the labeled dataset is divided into a training set and a test set in a 9:1 ratio.
4. The intelligent detection method for concrete surface cracks based on the improved Mask R-CNN model according to claim 1, characterized in that... In step (6), the model classification loss adopts the binary cross-entropy loss function, the formula of which is: ; Among them, when y i The value is 1 for positive samples and 0 for negative samples, p i This represents the probability that the crack is predicted. The bounding box regression loss uses the Smooth L1 loss function, and the formula is as follows: ; Where x is the numerical difference between the predicted bounding box and the ground truth bounding box; The mask loss uses the binary cross-entropy loss function, the formula of which is: ; Where N represents the total number of pixels in the image, y i The label represents the i-th pixel, with 1 for the foreground and 0 for the background. i This represents the probability that the i-th pixel is predicted to be a crack.
5. The intelligent detection method for concrete surface cracks based on the improved Mask R-CNN model according to claim 1, characterized in that... In step (6), the parameters of the network model are set as follows: the SGD optimizer is used; the number of batches, learning rate, number of training rounds of the dataset, momentum, and weight decay coefficient are set to 2, 0.0001, 36, 0.9, and 0.0001, respectively.
6. The intelligent detection method for concrete surface cracks based on the improved Mask R-CNN model according to claim 1, characterized in that, In step (7), the detection result of the crack image includes using a rectangular box in the original crack image to frame the part that belongs to the crack and the probability that the framed part is a crack.
7. The intelligent detection method for concrete surface cracks based on the improved Mask R-CNN model according to claim 1, characterized in that, In step (7), the segmentation result of the crack image includes generating a colored mask at the crack, using the quality of the mask to reflect the segmentation effect, and further obtaining the crack's trend and geometric features.