A method for detecting apparent damage of existing buildings based on image instance segmentation technology
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- QINGDAO UNIV OF TECH
- Filing Date
- 2026-04-24
- Publication Date
- 2026-08-07
AI Technical Summary
(1)深度学习模型往往依赖大量的标注数据,但是在实际工程中,经常存在损伤数据获取困难、标注成本高且类别分布不均的问题,导致模型性能难以提升;
1、本发明基于深度学习中的图像实例分割方法,首先构建了用于网络训练及验证的既有建筑损伤图像数据集。其次,提出了一种适用于既有建筑损伤分割的S-DACR-YOLOv26网络,实现对建筑物的裂缝、露筋、剥落损伤的自动分割。该方法基于YOLOv26网络架构,通过添加S-DACR模块,在提高网络分割效果与降低参数计算量的同时,解决了复杂环境下暴露出的大面积背景误检与微小裂缝断联问题。
Smart Images

Figure CN122530795A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of building quality inspection and artificial intelligence technology, specifically relating to a method for detecting surface damage to existing buildings based on image instance segmentation technology. Background Technology
[0002] Current deep learning-based methods for detecting existing building damage have the following shortcomings: (1) Deep learning models often rely on a large amount of labeled data. However, in actual engineering, there are often problems such as difficulty in obtaining damaged data, high labeling costs, and uneven class distribution, which makes it difficult to improve model performance. (2) The model has insufficient generalization ability and environmental adaptability. The detection accuracy of the model is prone to decrease in different regions, different structural types, and complex lighting and occlusion environments. (3) For the actual needs of existing buildings, such as the width of cracks, the depth of spalling and the degree of exposed steel bars, there is often a lack of detailed identification ability and it is difficult to make accurate quantitative assessment. Different damages may be visually highly similar, making classification difficult. Summary of the Invention
[0003] This invention discloses a method for detecting apparent damage to existing buildings based on image instance segmentation technology, aiming to solve the technical problems described in the background section (1)-(3). This invention proposes an S-DACR-YOLO damage detection network suitable for damage segmentation of existing buildings. Compared with other networks, it achieves the best segmentation accuracy of 86.2%, realizes automatic damage segmentation of existing buildings, and provides technical support for subsequent damage quantification.
[0004] To achieve the above objectives, the technical solution of the present invention is as follows: A method for detecting apparent damage to existing buildings based on image instance segmentation technology includes the following steps: (1) Identify the types of damage to the building surface, including spalling, exposed reinforcement and cracks, and construct the corresponding dataset; (2) Construct an S-DACR-YOLO damage detection network suitable for damage segmentation of existing buildings; (3) The S-DACR-YOLO damage detection network was trained and evaluated using the dataset; (4) Detect building surface damage using the S-DACR-YOLO damage detection network.
[0005] Preferably, step (1) includes: during the dataset creation process, saving undamaged normal background images as negative sample controls, and all images are annotated with pixel-level and bounding box annotations using the LabelMe tool.
[0006] Preferably, in step (2), the S-DACR-YOLO damage detection network is based on the YOLOv26 network architecture, and the Upsample module in the Neck module is replaced by the S-DACR module.
[0007] Preferably, in step (2), the internal network topology of the S-DACR module includes: a multi-scale context-aware branch component, a spatial-channel dual attention mechanism component, and a feature-preserving residual connection component.
[0008] Preferably, the multi-scale context-aware branch component obtains multi-scale context features through a dilated convolutional pyramid structure, assuming the input feature map is... The system expands its receptive field exponentially without increasing the number of network parameters by using parallel convolutional layers with different dilation rates, thereby obtaining the long-distance extension topological dependency of cracks at different physical scales, as shown in the following equation: (1); In equation (1), Indicates the expansion rate of Dilated convolution operation; This indicates a feature cascade along the channel dimension.
[0009] Preferably, in the spatial-channel dual attention mechanism component, channel attention includes: aggregating spatial information through global average pooling and max pooling, then inferring the importance of each channel through a multilayer perceptron, and generating a channel weight vector. As shown in the following formula: (2); In equation (2), Represents the input feature map The channel attention weight vector; This represents the context feature map obtained after processing through the multi-scale context-aware branch. This represents the Sigmoid activation function; Indicates multilayer sensor operation; This indicates a global average pooling operation; This represents the global max pooling operation; Channel attention assigns weights to channels containing edge and crack features, while suppressing background channels containing smooth walls. After channel weighting, the feature map is denoted as follows: ; Spatial attention includes: in feature maps Based on this, pooling dimensionality reduction is performed along the channel dimension, and then applied... Large kernel convolution generates spatial weight matrix As shown in the following formula: (3); In equation (3), Representation of feature map Spatial attention weight matrix; This represents the feature map after channel attention weighting; This represents the Sigmoid activation function; Indicates the kernel size as Convolution operations; Indicates feature concatenation operation; This represents the average pooling operation along the channel dimension; This represents the max pooling operation along the channel dimension; The final attention feature map is .
[0010] Preferably, in the feature-preserving residual connection component, the original input features are... Features after dual attention recalibration Element-by-element addition is performed as shown in the following formula: (4); In equation (4), To preserve the output feature map of the residual connection component; X represents the feature map after recalibration using a spatial-channel dual attention mechanism; X represents the original feature map input to the module. This is the ReLU activation function.
[0011] The beneficial effects of the present invention's method for detecting apparent damage to existing buildings based on image instance segmentation technology are as follows: 1. This invention, based on image instance segmentation methods in deep learning, first constructs a dataset of existing building damage images for network training and validation. Second, it proposes an S-DACR-YOLOv26 network suitable for segmenting existing building damage, enabling automatic segmentation of cracks, exposed rebar, and spalling damage in buildings. This method, based on the YOLOv26 network architecture, adds an S-DACR module, which improves network segmentation performance and reduces parameter computation while solving the problems of false detection of large-area backgrounds and disconnection of small cracks in complex environments.
[0012] 2. During the actual deployment phase of the system, this invention can acquire images using multi-source acquisition front-ends such as mobile terminals, high-definition camera equipment, or drones. The acquired data is then input into the GUI interface developed in this invention to achieve precise segmentation of the damaged area and archiving of results, providing data support for subsequent damage quantification by inspection personnel.
[0013] 3. This invention proposes an S-DACR-YOLO damage detection network suitable for damage segmentation of existing buildings. Compared with other networks, it achieves the best segmentation accuracy of 86.2%, realizes automatic damage segmentation of existing buildings, and provides technical support for subsequent damage quantification. Attached Figure Description
[0014] Figure 1 It is a dataset distribution diagram; Figure 2 This is a diagram of common damage types; Figure 3 It is a labeled image of the dataset; Figure 4 This is the overall network architecture diagram of S-DACR-YOLO (Conv: Convolution / C3k2: Core Feature Extraction Module / Concat: Connection / S-DACR: Dual Attention Context Residual Module). Figure 5 This is a schematic diagram of the internal workings of the S-DACR module (Input Feature Map, Global Average Pooling, Large Kernel Conv, MLP, Sigmoid, Attention-filtered Features, Channel Attention, Spatial Attention, Multi-branch Contextual Residual Structure, Dilated Conv, Concatenated Features, Output Feature Map, Residual Connection). Figure 6 This is a graph showing the training results of the S-DACR-YOLO model; Figure 7 This is a graph showing the performance comparison results of different models; Figure 8 This is a comparison of the segmentation results from different networks; Figure 9 This is a performance comparison chart between the baseline network and S-DACR-YOLO; Figure 10 This is a screenshot of the DeepCrack Dataset segmentation result; Figure 11 This is the GUI interface of the existing building damage detection system. ((a) is a GUI interface display diagram, (b) is a segmentation result diagram). Detailed Implementation
[0015] The following description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
[0016] Example 1: A method for detecting apparent damage to existing buildings based on image instance segmentation technology includes the following steps: (1) Identify the types of damage to the building surface, including spalling, exposed reinforcement and cracks, and construct the corresponding dataset; (2) Construct an S-DACR-YOLO damage detection network suitable for damage segmentation of existing buildings; (3) The S-DACR-YOLO damage detection network was trained and evaluated using the dataset; (4) Detect building surface damage using the S-DACR-YOLO damage detection network.
[0017] Example 2: This embodiment provides a detailed description of step (1): To ensure the robustness of the deep learning model in complex real-world scenarios, this invention constructs a multi-source building damage dataset containing 29,700 images. The data combines real-world images captured by drones with some open-source standardized data. The open-source standardized data primarily incorporates two benchmark datasets in the field of structural health monitoring: CRACK500 and SDNET2018. Regarding the category distribution, for the minor damage that the network needs to focus on, the core target "crack" samples are expanded to 15,200; "stripping" and "exposed reinforcement" account for 8,500 and 4,000 images respectively; in addition, 2,000 undamaged "normal" background images are intentionally retained as negative samples for comparison, effectively enhancing the model's anti-interference ability and reducing the false detection rate. The specific dataset category distribution is as follows: Figure 1 As shown, common types of structural damage include Figure 2 As shown, all images underwent fine-grained pixel-level and bounding box annotation using the LabelMe tool. To avoid mislabeling normal physical noise or minor stains on building surfaces as damage, strict physical and pixel thresholds were set for annotation. Specific dataset annotation examples are shown below. Figure 3 As shown.
[0018] Example 3: This embodiment provides a detailed description of step (2): Figure 4This paper showcases S-DACR-YOLO, an improved architecture for building damage segmentation based on the YOLOv26 network. Based on the YOLOv26 network architecture, an S-DACR module was designed to replace the Upsample module in the Neck module, deeply enhancing the feature flow of the baseline model from two dimensions: feature selection and receptive field expansion.
[0019] The following is a detailed introduction to the improvements based on the YOLOv26 network: In existing building damage detection, microcracks often exhibit visual characteristics of being "long, discontinuous, and with extremely low contrast." Traditional YOLO network convolutional modules, limited by their local receptive field, easily lose these high-frequency edge features during downsampling and introduce significant background noise. To address this bottleneck, this invention designs an S-DACR module, the internal schematic of which is shown below. Figure 5 As shown.
[0020] The internal network topology of the S-DACR module is mainly composed of three core components: a multi-scale context-aware branch component, a spatial-channel dual attention mechanism component, and a feature-preserving residual connection component.
[0021] 1. Multi-scale context-aware branch component: The identification of minute cracks depends not only on the pixels of the crack itself, but also on the texture distribution of the concrete surface surrounding the crack, i.e., contextual information. Therefore, a dilated convolutional pyramid structure was designed to obtain multi-scale contextual features.
[0022] Let the input feature map be By using parallel convolutional layers with different dilation rates, the system can multiply the receptive field without increasing the number of network parameters. (1); In equation (1), Indicates the expansion rate of Dilated convolution operation; This represents the feature cascade along the channel dimension. This design can effectively capture the long-distance extension topological dependency of cracks at different physical scales.
[0023] 2. Spatial-channel dual attention mechanism component: After the model obtains multi-scale contextual features, it still faces the problems of feature redundancy and background noise interference. Therefore, a channel-spatial dual attention mechanism is designed to adaptively re-encode features.
[0024] Channel attention involves aggregating spatial information through global average pooling and max pooling, then inferring the importance of each channel using a multilayer perceptron to generate channel weight vectors. As shown in the following formula: (2); Channel attention assigns weights to channels containing edge and crack features, while suppressing background channels containing smooth walls. After channel weighting, the feature map is denoted as... .
[0025] Spatial attention: in feature maps Based on this, pooling dimensionality reduction is performed along the channel dimension, and then applied... Large kernel convolution generates spatial weight matrix As shown in the following formula: (3); Based on this design, spatial attention can generate a specular mask, enabling the network to accurately identify narrow, elongated crack geometric regions. The final attention feature map is as follows. .
[0026] 3. Feature-preserving residual connection component: Since there are multiple nonlinear activations and multiplicative weightings in deep networks, which can easily lead to gradient vanishing in small gaps, a cross-layer residual connection is added at the end of the S-DACR module.
[0027] Original input features Features after dual attention recalibration Perform element-wise addition: (4); This design ensures the lossless transmission of fine-grained structural information at the bottom layer during forward propagation of the model network, while also accelerating the convergence speed of the model during backward propagation.
[0028] Example 4: This embodiment provides a detailed description of steps (3) and (4): Network training and performance evaluation: 4.1 Experimental Environment: The experimental environment for damage segmentation based on YOLOv26 is shown in Table 1.
[0029] Table 1. Experimental Environment Configuration: GPU NVIDIA GeForce RTX 1650 Ti RAM 8GB CPU Intel Core i7-10750H OS Windows 10 Framework PyTorch 1.10.0 CUDA CUDA 11.3 Framework Python 3.8 .
[0030] 4.2 Evaluation Indicators: To verify the technical effectiveness of the proposed deep learning-based building damage detection method, the following six objective parameters were used as evaluation indicators: Precision (abbreviated) ): This measures the proportion of actual damage among predicted damage targets. Its calculation formula is: (5); Recall (abbreviated as Recall) ): This measures the proportion of damages that are successfully and correctly retrieved out of all real-world damages. The formula for calculation is: (6); Mean Precision (mAP@0.5): Used to comprehensively evaluate the model's global detection performance on cracks, spalling, and exposed reinforcement. It is calculated as follows: with an Intersection over Union (IoU) threshold of 0.5, the area under the precision-recall curve (PR curve) for each category is calculated (i.e., the mean precision-recall curve). (value), then for all The average value is calculated for each category. The formula is as follows: (7); Parameters: The total number of all learnable variables in a model.
[0031] Floating-point operations (FLOPs): refers to the total number of floating-point operations required for a model to perform a single forward inference computation.
[0032] Frames per second (FPS): This refers to the number of image frames that the model can process and output detection results in one second.
[0033] 4.3 Training Results: During model training, statistical analysis was performed on training loss, validation loss, and evaluation metrics. Specific training results are as follows: Figure 6 As shown.
[0034] First, regarding the changes in training loss, box_loss, seg_loss, and cls_loss all decrease with increasing training epochs, gradually stabilizing after 200 epochs. Specifically, box_loss stabilizes at around 0.6 in the later stages of model training, and cls_loss stabilizes at around 0.8, indicating that the model can learn the features of the training data and achieve good convergence performance. Second, looking at the validation loss curve, the overall trend of the validation loss is basically consistent with that of the training loss, without significant oscillations or divergence. This indicates that the model has not experienced significant overfitting and has good generalization ability. Finally, regarding the changes in model performance metrics, Precision, Recall, and mAP gradually increase and eventually stabilize, indicating that the model can achieve high-precision object detection and segmentation in the task, demonstrating good overall performance.
[0035] 4.4 Comparative Experiment: Based on the aforementioned multi-dimensional evaluation system, a comprehensive evaluation was conducted on representative precursor models in the YOLO series (YOLOv11, YOLOv13, YOLOv26, and S-DACR-YOLO). The performance comparison results of each model are as follows: Figure 7 As shown.
[0036] To more intuitively demonstrate the model's segmentation effect and verify the accuracy of the model in segmenting building surface damage, Figure 8 The results show the segmentation comparison of the four trained networks.
[0037] Depend on Figure 7 and Figure 8 It is obvious that: The S-DACR-YOLO model possesses strong capabilities in capturing minute defects and reduces the redundancy of large parameters. Compared to YOLOv26, the best-performing model in the YOLO series, the S-DACR-YOLO model achieves an improved mAP@0.5. Therefore, this demonstrates that the dual-attention contextual residual mechanism has a stronger feature capture capability for damage such as small cracks in complex backgrounds. Furthermore, it exhibits better edge deployment capabilities, improving detection accuracy without increasing the number of parameters or computational complexity, and its performance is significantly lower than that of the comparison networks.
[0038] In summary, the S-DACR-YOLO model proposed in this invention outperforms other networks in overall image performance, edge rendering, and detail capture. By improving the original network structure and addressing its shortcomings, it demonstrates strong robustness and stability.
[0039] 4.5 Ablation Test: By constructing comparative ablation experiments, the effectiveness of the optimization technique is verified to ensure that the model can achieve optimal results. This invention uses ablation experiments with the S-DACR module to confirm the effectiveness of the enhancement. To evaluate how the module affects performance, YOLOv26 is used as the benchmark for ablation experiments.
[0040] From Table 2 and Figure 9 As shown, the S-DACR-YOLO algorithm adds the S-DACR module, improving performance in four metrics: FPS, Parameters, FLOPs, and mAP0.5. Based on the YOLOv26 model, the S-DACR-YOLO network improves mAP0.5 by 3.8%. Experimental data demonstrate that the proposed module improves the model, indicating that the new model outperforms the original YOLOv26 model in object segmentation tasks.
[0041] Table 2 Ablation Test Data: YOLOv26 82.4 78 5.4 13.2 S-DACR-YOLO 86.2 93 4.3 11.5 .
[0042] 4.6 Dataset Experiment: To verify the generalization ability of the network proposed in this invention, a comprehensive test was conducted using the publicly available DeepCrack Dataset. This dataset includes complex backgrounds, varying lighting conditions, and subtle cracks, placing high demands on the model's robustness. The segmentation results are as follows: Figure 10 As shown.
[0043] from Figure 10 As can be seen, the S-DACR-YOLO model demonstrates good segmentation performance for single cracks, intersecting cracks, and multiple cracks, exhibiting good performance and generalization ability. Furthermore, the model can accurately identify and segment cracks of various shapes, scales, and complexities, showing excellent performance not only on specific datasets but also in cross-dataset tests, demonstrating stable and efficient performance.
[0044] Example 5: GUI Design: This system includes three modules: image upload, recognition result processing, and file saving. The main GUI interface for generating and recognizing images is as follows: Figure 11 As shown, after clicking "Upload Image," you can upload an image to be detected and segmented, which will be displayed on the left side of the system. The system will then automatically segment the uploaded image and display the segmented image on the right side. Finally, clicking "Save Image" allows you to customize the save path. By using this system, inspectors can quickly identify damage to buildings, take appropriate measures, and receive necessary technical support for subsequent lightweighting efforts.
Claims
1. A method for detecting apparent damage to existing buildings based on image instance segmentation technology, characterized in that, Includes the following steps: (1) Identify the types of damage to the building surface, including spalling, exposed reinforcement and cracks, and construct the corresponding dataset; (2) Construct an S-DACR-YOLO damage detection network suitable for damage segmentation of existing buildings; (3) The S-DACR-YOLO damage detection network was trained and evaluated using the dataset; (4) Detect building surface damage using the S-DACR-YOLO damage detection network.
2. The method for detecting apparent damage to existing buildings based on image instance segmentation technology as described in claim 1, characterized in that, Step (1) includes: during the dataset creation process, normal background images without damage are saved as negative sample controls, and all images are annotated with pixels and bounding boxes using the LabelMe tool.
3. The method for detecting apparent damage to existing buildings based on image instance segmentation technology as described in claim 2, characterized in that, In step (2), the S-DACR-YOLO damage detection network is based on the YOLOv26 network architecture, and the Upsample module in the Neck module is replaced by the S-DACR module.
4. The method for detecting apparent damage to existing buildings based on image instance segmentation technology as described in claim 3, characterized in that, In step (2), the internal network topology of the S-DACR module includes: a multi-scale context-aware branch component, a spatial-channel dual attention mechanism component, and a feature-preserving residual connection component.
5. The method for detecting apparent damage to existing buildings based on image instance segmentation technology as described in claim 4, characterized in that, The multi-scale context-aware branch component obtains multi-scale context features through a dilated convolutional pyramid structure. Let the input feature map be... The system expands its receptive field exponentially without increasing the number of network parameters by using parallel convolutional layers with different dilation rates, thereby obtaining the long-distance extension topological dependency of cracks at different physical scales, as shown in the following equation: (1); In equation (1), Indicates the expansion rate of Dilated convolution operation; This indicates a feature cascade along the channel dimension.
6. The method for detecting apparent damage to existing buildings based on image instance segmentation technology as described in claim 4, characterized in that, In the aforementioned spatial-channel dual attention mechanism component, channel attention includes: aggregating spatial information through global average pooling and max pooling, then inferring the importance of each channel through a multilayer perceptron to generate a channel weight vector. As shown in the following formula: (2); In equation (2), Represents the input feature map The channel attention weight vector; This represents the context feature map obtained after processing through the multi-scale context-aware branch. This represents the Sigmoid activation function; Indicates multilayer sensor operation; This indicates a global average pooling operation; This represents the global max pooling operation; Channel attention assigns weights to channels containing edge and crack features, while suppressing background channels containing smooth walls. After channel weighting, the feature map is denoted as follows: ; Spatial attention includes: in feature maps Based on this, pooling dimensionality reduction is performed along the channel dimension, and then applied... Large kernel convolution generates spatial weight matrix As shown in the following formula: (3); In equation (3), Representation of feature map Spatial attention weight matrix; This represents the feature map after channel attention weighting; This represents the Sigmoid activation function; Indicates the kernel size as Convolution operations; Indicates feature concatenation operation; This represents the average pooling operation along the channel dimension; This represents the max pooling operation along the channel dimension; The final attention feature map is .
7. The method for detecting apparent damage to existing buildings based on image instance segmentation technology as described in claim 4, characterized in that, In the feature-preserving residual connection component, the original input features are... Features after dual attention recalibration Element-by-element addition is performed as shown in the following formula: (4); In equation (4), To preserve the output feature map of the residual connection component; X represents the feature map after recalibration using a spatial-channel dual attention mechanism; X represents the original feature map input to the module. This is the ReLU activation function.