A building outer surface defect unmanned aerial vehicle detection method and system based on an improved YOLO model

By improving the focal residual convolution and feature injection network modules of the YOLO model, the problem of insufficient feature extraction in the detection of defects on the exterior surface of buildings was solved, and high-precision and high-reliability defect detection was achieved.

CN122157033APending Publication Date: 2026-06-05HENAN UNIVERSITY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HENAN UNIVERSITY
Filing Date
2026-02-02
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing methods for detecting defects on building exterior surfaces struggle to take into account defect features at different scales and in complex backgrounds during feature extraction, resulting in low detection accuracy and a high false detection rate, failing to meet the requirements for high precision.

Method used

An improved YOLO model is adopted, which enhances feature extraction capabilities by adding a focal residual convolution module and a feature injection network module between the backbone network and the neck network, thereby achieving high-precision detection of defects on the exterior surface of buildings.

Benefits of technology

It improves the recognition rate and resistance to complex backgrounds of building exterior surface defect detection, and enhances the detection accuracy and reliability under different scales and complex lighting conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122157033A_ABST
    Figure CN122157033A_ABST
Patent Text Reader

Abstract

The application provides a kind of building outer surface defect unmanned aerial vehicle detection method and system based on improved YOLO model.The method first constructs the data set CS-Dataset of building outer wall defect detection of two targets of crack and peeling, and divides the data set into training set, validation set and test set.In detection, the image is transmitted to the processing terminal deep learning model in real time to identify and locate cracks and peeling and other building defects.The specific deep learning model is that the real-time video obtained by the unmanned aerial vehicle is input into the model: first, the backbone network of YOLO model is used to extract features, then the feature enhancement is carried out through the focal residual convolution module, and then the improved neck network is used for feature fusion to obtain complete image features, and then the cracks and peeling and other building outer surface defects in the features are detected and the position information of the defects is saved for subsequent defect repair and reduction of high-altitude falling object threat caused by building outer surface damage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision target detection technology, and in particular to a method and system for detecting defects on the exterior surface of buildings using a UAV based on an improved YOLO model. Background Technology

[0002] In the construction industry, building exteriors are susceptible to defects such as peeling and cracks due to long-term exposure to natural environmental erosion and structural stress changes. These defects not only affect the building's appearance but can also lead to falling debris from heights, seriously threatening public safety. Therefore, timely and accurate detection of defects on building exteriors is crucial.

[0003] Currently, traditional building exterior surface defect detection mainly relies on manual inspection. Inspectors need to use scaffolding, suspended platforms, and other tools for close-range inspection, which has many drawbacks. Firstly, manual inspection is extremely inefficient; for high-rise and large buildings, completing a comprehensive inspection requires significant time and manpower. Secondly, inspectors work at heights, facing safety risks such as falls and strong winds, posing substantial safety hazards. Furthermore, manual inspection is greatly affected by the subjective factors of the inspectors, making it difficult to guarantee the accuracy and consistency of the results, and easily leading to missed or false detections.

[0004] With the development of computer vision and deep learning technologies, methods for detecting defects on building exterior surfaces based on UAVs and deep learning have gradually emerged. Existing technologies mostly employ single-backbone deep learning models, using UAVs to acquire images and input them into the model for defect identification. However, these methods still have significant shortcomings. Single-backbone models struggle to simultaneously capture defect features of different scales and complexities during feature extraction. For small-target defects such as minute cracks and small-area peeling, single-backbone models are prone to insufficient feature extraction and low detection accuracy. Furthermore, under complex lighting and texture backgrounds, single-backbone models have limited ability to distinguish defect features from background information, easily leading to false detections and insufficient reliability of the detection results. In addition, existing methods lack targeted optimization mechanisms for feature fusion, failing to fully utilize the complementarity of different feature types, and thus failing to meet the practical needs of high-precision detection of building exterior surface defects. Summary of the Invention

[0005] This invention aims to address the problems of insufficient feature extraction capability and low detection accuracy in the detection of slender defects such as cracks in existing methods. This invention provides a UAV detection method and system for building exterior surface defects based on an improved YOLO model. By extracting building exterior wall information from UAV-recorded videos, defects in building exterior walls can be found and marked.

[0006] In a first aspect, the present invention provides a UAV-based method for detecting defects on the exterior surface of buildings based on an improved YOLO model, comprising:

[0007] Construct a building exterior wall defect detection dataset, and divide the building exterior wall defect detection dataset into a training set, a validation set, and a test set;

[0008] A network for detecting defects in building exterior walls is constructed, including: using the YOLOv11 model as a framework, adding a focal residual convolution module between the original backbone network and the neck network, and adding a feature injection network module between the FPN network module and the PAN network module of the original neck network;

[0009] The building exterior wall defect detection network is trained using the aforementioned building exterior wall defect detection dataset to obtain the optimal building exterior wall defect detection model.

[0010] The system acquires real-time video data collected by drones and inputs the video data into the optimal building exterior wall defect detection model, outputting the location and type of detected defects.

[0011] Furthermore, the construction of the building exterior wall defect detection dataset specifically includes: filtering from public datasets and images collected by drones, integrating all images that meet the preset filtering conditions to obtain the building exterior wall defect detection dataset; the preset filtering conditions include: defect types including cracks and peeling; and the shooting angle of the images including shooting from bottom to top, drone horizontal and overhead shooting; and the lighting conditions including sunny days, cloudy days and dusk.

[0012] Furthermore, the focal residual convolution module includes a feature projection unit, a hierarchical context modeling unit, a gated aggregation unit, an element-wise modulation unit, and a residual connection;

[0013] The feature projection unit will process the input feature map X through... The convolutional layer performs query projection to generate a query feature map;

[0014] The hierarchical context modeling unit includes stacked L-layer depthwise separable convolutions, with the kernel size of the L-layer depthwise separable convolutions increasing with the focus level; each depthwise separable convolution generates a context feature map, and global average pooling is performed on the context feature map output by the L-th layer to generate a global context feature map. This results in L+1 context feature maps of different granularities.

[0015] The gating aggregation unit passes the input feature map X through... The convolutional layer generates spatially and hierarchically aware gating weights G, with a dimension of (L+1)×H×W; where L+1 represents the number of channels, H represents the height, and W represents the width. The gating weights are then decomposed into L+1 weight coefficients along the channel dimension. These L+1 weight coefficients are used to weight and aggregate L+1 context feature maps of different granularities to obtain an aggregated feature map. Aggregated feature map Channel interaction is performed through convolutional layers to generate modulator feature maps;

[0016] The element-wise modulation unit multiplies the query feature map and the modulator feature map element-wise to generate an intermediate feature map;

[0017] The input feature map X is added element-wise to the intermediate feature map through residual connections to obtain the final output feature map.

[0018] Furthermore, the feature injection network module includes cascaded feature fusion units and two feature injection units;

[0019] The feature fusion unit outputs the FPN network module. , and For input, and Through max pooling layer processing, , and Align the dimensions along both length and width; then align the results. , and The data is then stitched together along the channel dimension; the stitched results are then processed sequentially. Convolution, C3K2 and Convolution is performed to obtain the global feature G; finally, the global feature G is processed along the channel dimension according to... and The global features are obtained by segmenting along the channel dimension. and ;

[0020] The feature injection unit includes cascaded preliminary fusion subunits and injection subunits; wherein, the preliminary fusion subunit acquires features passed from the current feature layer to which it belongs. and features passed from the previous feature layer They merged and formed initial characteristics of fusion. The injection subunit acquires preliminary fusion features. and the global features of the current feature layer in which it is located The features are then fused to obtain the output feature map. ; i=4 and 5; when i=4, , When i=5, , .

[0021] Furthermore, the fusion process of the preliminary fusion subunit includes: ... Through max pooling layer processing, and Alignment is performed along both the length and width dimensions. pass Convolution Adjustment The number of channels; after alignment and channel adjustment and The data is stitched together along the channel dimension, and the stitching result is processed... Convolution forms preliminary fused features .

[0022] Furthermore, the fusion process of the injected sub-unit includes: firstly, making global features... After processing by the global attention activation layer, attention A is generated, which enables global features to... After processing by the global feature embedding layer, aligned features g are generated, enabling the initial fusion of features. The channel dimensions are adjusted by a local feature embedding layer. Then, the channel-dimension-adjusted features are multiplied point-by-point with attention A. The result of this point-by-point multiplication is added to the aligned features g. The sum is then passed through the C3K2 module to obtain the final output feature map. The global attention activation layer comprises sequentially connected... Convolutional layers, sigmoid layers, and size adjustment layers; the global feature embedding layer comprises sequentially connected... Convolutional and resizing layers; the local feature embedding layer includes Convolution; the size adjustment layer is a max pooling layer or a bilinear interpolation layer.

[0023] Secondly, the present invention provides a UAV detection system for building exterior surface defects based on an improved YOLO model, comprising:

[0024] The dataset construction module is used to construct a building exterior wall defect detection dataset and divide the building exterior wall defect detection dataset into a training set, a validation set, and a test set.

[0025] The network construction module is used to build a network for detecting defects in building exterior walls. It includes: using the YOLOv11 model as a framework, adding a focal residual convolution module between the original backbone network and the neck network, and adding a feature injection network module between the FPN network module and the PAN network module of the original neck network.

[0026] The model training module is used to train the building exterior wall defect detection network using the building exterior wall defect detection dataset to obtain the optimal building exterior wall defect detection model.

[0027] The defect detection module is used to acquire video data collected in real time by the drone and input the video data into the optimal building exterior wall defect detection model, and output the location and type of the detected defects.

[0028] Thirdly, the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method as described in the first aspect.

[0029] Fourthly, the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method described in the first aspect.

[0030] The beneficial effects of this invention are as follows:

[0031] To address the challenges of existing single-network architectures in simultaneously capturing defect details and global information, and in identifying similar background and target defects in complex environments, this invention designs a detection network that adds a focal residual convolution (FR) module between the neck and backbone. This module effectively extracts target information highly similar to the background from the features, enhancing feature extraction capabilities. Furthermore, by adding a feature injection network module to the original neck network, the improved IPF neck network not only fuses adjacent features but also, through global feature injection, achieves more thorough fusion of features at different depths, improving classification and detection capabilities and effectively enhancing the defect recognition rate and resilience against complex backgrounds. Attached Figure Description

[0032] Figure 1 This is a flowchart illustrating a method for detecting defects on the exterior surface of buildings using a UAV based on an improved YOLO model, as provided in an embodiment of the present invention.

[0033] Figure 2 A flowchart illustrating feature enhancement of the focal residual convolution (FR) module provided in this embodiment of the invention;

[0034] Figure 3 This is a flowchart of feature fusion in the IPF neck network provided in an embodiment of the present invention;

[0035] Figure 4 This is a flowchart of feature processing performed by the feature fusion unit provided in an embodiment of the present invention.

[0036] Figure 5 This is a flowchart of feature processing performed by the feature injection unit provided in an embodiment of the present invention;

[0037] Figure 6 This is a schematic diagram of the structure of a UAV detection system for building exterior surface defects based on an improved YOLO model, provided in an embodiment of the present invention.

[0038] Figure 7 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0039] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of the embodiments of this invention will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0040] This invention provides a UAV-based method for detecting building exterior surface defects (peeling, cracks) based on an improved YOLO model. First, a dataset CS-Dataset is constructed to detect building exterior wall defects, including cracks and peeling, and the dataset is divided into training, validation, and test sets. During detection, images are transmitted in real-time to a deep learning model on a processing terminal for identification and localization of building defects such as cracks and peeling. Specifically, the deep learning model inputs real-time video acquired by the UAV: ​​first, features are extracted through the backbone network of the YOLO model; then, feature enhancement is performed through a focal residual convolution module; and finally, feature fusion is performed through an improved neck network to obtain complete image features. This allows for the detection of building exterior surface defects such as cracks and peeling, and the location information of the defects is saved for subsequent defect repair, reducing the threat of falling objects from heights caused by damage to the building exterior surface.

[0041] like Figure 1 As shown, this embodiment of the invention provides a UAV-based method for detecting defects on the exterior surface of buildings based on an improved YOLO model, comprising the following steps:

[0042] S101: Construct a building exterior wall defect detection dataset CS-Dataset (CrackSpallingDataset) that includes two targets: cracks and spalling. Divide the building exterior wall defect detection dataset into a training set, a validation set, and a test set.

[0043] Specifically, the building exterior wall defect detection dataset CS-Dataset was constructed by filtering damage images from public datasets and drones based on defect type, shooting angle, and lighting conditions. The constructed damage images specifically include:

[0044] The defect types screened include cracks and spalling, so that drones can find cracks and spalling when inspecting building exteriors, providing support for subsequent repairs and reducing the possibility of damage caused by falling debris from above.

[0045] The selection angles include shooting from a low angle, shooting from a horizontal angle by a drone, and shooting from a high angle by a drone. This multi-view design greatly improves the generalization ability of the dataset.

[0046] The selected lighting conditions include sunny days, cloudy days, and dusk. This dataset with multiple lighting conditions enables the accuracy of building exterior wall defect detection to be ensured under full lighting conditions.

[0047] In this embodiment, the constructed building exterior wall defect detection dataset CS-Dataset includes 5500 images, which are labeled in YOLO format and divided into training set, validation set and test set in a ratio of 7:2:1.

[0048] S102: Construct a building exterior wall defect detection network, including: using the YOLOv11 model as a framework, adding a Focal Res Convolution (FR) module between the original backbone network and the neck network to enhance the expression of target features; adding a feature injection network module between the FPN network module and the PAN network module of the original neck network. For ease of description, the improved neck network is referred to as the IPF (InjectPAN-FPN Neck) network.

[0049] In this embodiment, the structure of the FR module is as follows: Figure 2 As shown, the system includes: a feature projection unit, a hierarchical context modeling unit, a gated aggregation unit, an element-wise modulation unit, and residual connections. These four units are cascaded sequentially, and all operations are performed based on a C×H×W feature map, where H is the height, W is the width, and C is the number of channels. Through the collaborative operation of the feature projection unit, hierarchical context modeling unit, gated aggregation unit, and element-wise modulation unit, input-dependent token interaction is achieved, reducing computational complexity while ensuring long-range feature capture capabilities. Then, residual connections are used to reduce the probability of model overfitting. Figure 2 In this context, q, z, and g represent query, context, and gating, respectively.

[0050] The feature projection unit processes the input feature map X independently. The convolutional layer performs query projection, generating a query feature map Q with the same dimension as the input. This map is then used to modulate and fuse with the aggregated context features, ensuring dimensional matching and effective interaction between the query features and the context features.

[0051] The hierarchical context modeling unit employs L layers of depthwise separable convolutions stacked together to achieve hierarchical context extraction. The kernel size of the depthwise separable convolutions increases with the focus level, achieving context coverage from short-range to long-range. After generating L context feature maps of different granularities through the L-layer stacked depthwise separable convolutions, global average pooling is performed on the upper and lower feature maps output from the L-th layer to generate a global context feature map. Finally, we obtain L+1 sets of context feature maps with different granularities. It comprehensively covers both local fine-grained and global coarse-grained context information.

[0052] With the first Taking depthwise separable convolution as an example, the formula for the hierarchical context modeling unit to obtain context feature maps at different levels can be expressed as:

[0053] ,

[0054] in, and The first Layer and first The layer depth can separate the context feature map output by the convolution. It is a linear rectified function. This represents depthwise separable convolution. Let be a vector space with C channels, H height, and W width.

[0055] The gated aggregation unit first processes the input feature map X through... The convolutional layer generates spatially and hierarchically aware gating weights G, with dimension 1. Each channel of the gate weight corresponds to a focus level weight coefficient, and then the gate weight G is split by channel to obtain The weight coefficient of each Each weight coefficient has a dimension of 1×H×W. Subsequently, the aggregated feature map is obtained by weighting the corresponding level's context feature map through element-wise multiplication and summing. Finally, the aggregated feature map Channel interaction is performed through convolutional layers to generate a modulator feature map M, providing a contextual fusion basis for subsequent element-wise modulation; aggregated feature maps are then obtained. The formula can be expressed as:

[0056]

[0057] The element-wise modulation unit performs element-wise multiplication between the query feature map Q and the modulator feature map M to achieve deep fusion of context features and query features, generating a preliminary output feature map. ;

[0058] Finally, the input feature map X is connected to the generated feature map via residual connections. Element-by-element addition yields the output feature map of the FR module.

[0059] In one embodiment, the structure of the IPF neck network is as follows: Figure 3 As shown, it includes: FPN network module, feature injection network module and PAN network module; the three modules are cascaded in sequence.

[0060] The feature injection network module comprises three core units: a feature fusion unit, a P4 layer feature injection unit, and a P5 layer feature injection unit. The position of the feature injection network module within the neck network is as follows: Figure 3 As shown. The feature fusion unit aims to generate global features, and the P4 layer feature injection unit aims to generate features injected with the global features. The P5 layer feature injection unit aims to generate features that inject global features. .

[0061] The structure of the feature fusion unit is as follows: Figure 4 As shown. First, obtain the output of the FPN network module. , and By using the max pooling layer and The length and width dimensions and Align and stitch them together along the channel dimension; then proceed sequentially. Convolution, C3K2 and Convolution is used to fuse the concatenated results to obtain global features G; finally, the global features G are processed along the channel dimension according to... and The channel dimension is used for segmentation to obtain the segmented global features. and Obtain global features and The formula can be expressed as

[0062]

[0063]

[0064] Among them, These represent the number of channels for the features in layers P4 and P5, respectively.

[0065] The structure of the feature injection unit is as follows: Figure 5 As shown. The feature generation process of the P4 layer feature injection unit includes: first, acquiring the input features. , and global features And through the max pooling layer Length and width and Align the length and width dimensions, through Convolution Adjustment The number of channels; then and The data is stitched together along the channel dimension, and the stitching result is processed... Convolution forms preliminary fused features Finally, the features and global features The process involves fusion to obtain an output infused with global features. .

[0066] The feature generation process of the P5 layer feature injection unit includes: first, acquiring the input features. , and global features By using the max pooling layer Length and width and Align the length and width dimensions, through Convolution Adjustment The number of channels; then and Features that are initially integrated are pieced together along the channel dimension. Finally, the features and global features The process involves fusion to obtain an output infused with global features. .

[0067] In the above embodiments, the feature injection subunit is used to inject features and global features The process involves fusion to obtain an output infused with global features. ;like Figure 5 As shown, the injection subunit includes a local feature embedding layer, a global feature embedding layer, and a global attention activation layer. The specific implementation process is as follows: the global attention activation layer first processes the input global features... go through The convolutional layer performs channel adjustment, followed by sigmoid activation. Finally, based on the length and width, it aligns with the size of the local features using max pooling or bilinear interpolation to generate attention A. The global feature embedding layer first embeds the input global features... go through Convolution performs channel adjustment, and then, based on the length and width, aligns the data to the size of the local features using max pooling layers or bilinear interpolation to generate aligned features g. The local feature embedding layer first embeds the input features... pass The convolution performs channel adjustment, then multiplies pointwise with attention A, and finally adds it to the aligned feature g. The result is then passed through the C3K2 module to generate an output that fuses global features. .

[0068] Similarly, features are injected using sub-units. and global features The process involves fusion to obtain an output infused with global features. The details will not be elaborated here. The above process can be expressed by the following formula:

[0069]

[0070]

[0071]

[0072] Where G represents the global features of the input. or L is the input feature or .

[0073] S103: Use the building exterior wall defect detection dataset to train the building exterior wall defect detection network to obtain a trained building exterior wall defect detection model;

[0074] Specifically, the training set divided in step S101 is input into the building exterior wall defect detection network constructed in step S102, and the model network parameters are optimized and trained. By continuously adjusting the parameters of the building exterior wall defect detection model, the loss function value of the building exterior wall defect detection model on the training set is continuously reduced. After 300 rounds of training, a well-trained building exterior wall defect detection model is obtained.

[0075] The validation set divided in step S101 is input into the trained building exterior wall defect detection model for validation. When the performance index of the building exterior wall defect detection model on the validation set no longer improves significantly in multiple consecutive training rounds and the convergence condition is met, the optimized generalized building exterior wall defect detection model is obtained.

[0076] The test set divided in step S101 is input into the optimized generalized building exterior wall defect model for testing. The model generates prediction results. By calculating the Precision, Recall, mAP50, and mAP50~95 indices, the detection accuracy and robustness of the model on the test set are quantified, and the optimal building exterior wall defect detection model is obtained.

[0077] S104: Acquire video data collected in real time by the drone and input the video data into the optimal building exterior wall defect detection model, and output the location and type of the detected defects;

[0078] Specifically, a drone equipped with a camera is first used to orbit the exterior surface of the target building, collecting video footage of the exterior walls and simultaneously recording its flight altitude and positioning information. The collected information is then directly transmitted to a mobile receiving platform equipped with a building exterior wall defect detection model for defect detection. Due to the high bandwidth required for real-time video transmission, the video is first downsampled and compressed during transmission. The data is then transmitted to a mobile receiving platform for exterior wall defect detection. If the model detects cracks or peeling, it will record the current location and height, extract the frame containing the defect from the video, and mark its location to facilitate rapid and comprehensive subsequent exterior wall defect repair work.

[0079] Figure 7 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 7 As shown, the electronic device may include: a processor 701, a communication interface 702, a memory 703, and a communication bus 704, wherein the processor 701, the communication interface 702, and the memory 703 communicate with each other through the communication bus 704. The processor 701 can call logical instructions in the memory 703 to execute a UAV-based method for detecting defects on building exterior surfaces based on an improved YOLO model. This method includes: constructing a building exterior wall defect detection dataset and dividing the dataset into a training set, a validation set, and a test set; constructing a building exterior wall defect detection network, including: using the YOLOv11 model as a framework, adding a focal residual convolution module between the original backbone network and the neck network, and adding a feature injection network module between the FPN network module and the PAN network module of the original neck network; training the building exterior wall defect detection network using the dataset to obtain an optimal building exterior wall defect detection model; acquiring real-time video data collected by the UAV and inputting the video data into the optimal model, outputting the detected defect location and type.

[0080] Furthermore, when the logical instructions in the aforementioned memory 703 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0081] This invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer can execute the UAV detection method for building exterior surface defects based on an improved YOLO model provided in the above-described method embodiments.

[0082] This invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the UAV detection method for building exterior surface defects based on an improved YOLO model provided in the above-described method embodiments.

[0083] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0084] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A UAV-based method for detecting defects on building exterior surfaces based on an improved YOLO model, characterized in that, include: Construct a building exterior wall defect detection dataset, and divide the building exterior wall defect detection dataset into a training set, a validation set, and a test set; A network for detecting defects in building exterior walls is constructed, including: using the YOLOv11 model as a framework, adding a focal residual convolution module between the original backbone network and the neck network, and adding a feature injection network module between the FPN network module and the PAN network module of the original neck network; The building exterior wall defect detection network is trained using the aforementioned building exterior wall defect detection dataset to obtain the optimal building exterior wall defect detection model. The system acquires real-time video data collected by drones and inputs the video data into the optimal building exterior wall defect detection model, outputting the location and type of detected defects.

2. The method for UAV detection of building exterior surface defects based on an improved YOLO model according to claim 1, characterized in that, The construction of the building exterior wall defect detection dataset specifically includes: filtering from public datasets and images collected by drones, integrating all images that meet the preset filtering conditions to obtain the building exterior wall defect detection dataset; the preset filtering conditions include: defect types including cracks and peeling; and the shooting angle of the images including shooting from bottom to top, drone horizontal and overhead shooting; and the lighting conditions including sunny days, cloudy days and dusk.

3. The method for UAV detection of building exterior surface defects based on an improved YOLO model according to claim 1, characterized in that, The focal residual convolution module includes a feature projection unit, a hierarchical context modeling unit, a gated aggregation unit, an element-wise modulation unit, and a residual connection. The feature projection unit will process the input feature map X through... The convolutional layer performs query projection to generate a query feature map; The hierarchical context modeling unit includes stacked L-layer depthwise separable convolutions, with the kernel size of the L-layer depthwise separable convolutions increasing with the focus level; each depthwise separable convolution generates a context feature map, and global average pooling is performed on the context feature map output by the L-th layer to generate a global context feature map. This results in L+1 context feature maps of different granularities. The gating aggregation unit passes the input feature map X through... The convolutional layer generates spatially and hierarchically aware gating weights G, with a dimension of (L+1)×H×W; where L+1 represents the number of channels, H represents the height, and W represents the width. The gating weights are then decomposed into L+1 weight coefficients along the channel dimension. These L+1 weight coefficients are used to weight and aggregate L+1 context feature maps of different granularities to obtain an aggregated feature map. Aggregated feature map Channel interaction is performed through convolutional layers to generate modulator feature maps; The element-wise modulation unit multiplies the query feature map and the modulator feature map element-wise to generate an intermediate feature map; The input feature map X is added element-wise to the intermediate feature map through residual connections to obtain the final output feature map.

4. The method for UAV detection of building exterior surface defects based on an improved YOLO model according to claim 1, characterized in that, The feature injection network module includes cascaded feature fusion units and two feature injection units; The feature fusion unit outputs the FPN network module. , and For input, and Through max pooling layer processing, , and Align the dimensions along both length and width; then align the results. , and The data is then stitched together along the channel dimension; the stitched results are then processed sequentially. Convolution, C3K2 and Convolution is performed to obtain the global feature G; finally, the global feature G is processed along the channel dimension according to... and The global features are obtained by segmenting along the channel dimension. and ; The feature injection unit includes cascaded preliminary fusion subunits and injection subunits; wherein, the preliminary fusion subunit acquires features passed from the current feature layer to which it belongs. and features passed from the previous feature layer They merged and formed initial characteristics of fusion. The injection subunit acquires preliminary fusion features. and the global features of the current feature layer in which it is located The features are then fused to obtain the output feature map. ; i=4 and 5; when i=4, , When i=5, , .

5. The method for UAV detection of building exterior surface defects based on an improved YOLO model according to claim 4, characterized in that, The fusion process of the preliminary fusion subunit includes: Through max pooling layer processing, and Alignment is performed along both the length and width dimensions. pass Convolution Adjustment The number of channels; after alignment and channel adjustment and The data is stitched together along the channel dimension, and the stitching result is processed... Convolution forms preliminary fused features .

6. The method for UAV detection of building exterior surface defects based on an improved YOLO model according to claim 4, characterized in that, The fusion process of the injected subunit includes: first, making global features... After processing by the global attention activation layer, attention A is generated, which enables global features to... After processing by the global feature embedding layer, aligned features g are generated, enabling the initial fusion of features. The channel dimensions are adjusted by a local feature embedding layer. Then, the channel-dimension-adjusted features are multiplied point-by-point with attention A. The result of this point-by-point multiplication is added to the aligned features g. The sum is then passed through the C3K2 module to obtain the final output feature map. The global attention activation layer comprises sequentially connected... Convolutional layers, sigmoid layers, and size adjustment layers; the global feature embedding layer comprises sequentially connected... Convolutional and resizing layers; the local feature embedding layer includes Convolution; the size adjustment layer is a max pooling layer or a bilinear interpolation layer.

7. A UAV-based system for detecting defects on building exterior surfaces based on an improved YOLO model, characterized in that, include: The dataset construction module is used to construct a building exterior wall defect detection dataset and divide the building exterior wall defect detection dataset into a training set, a validation set, and a test set. The network construction module is used to build a network for detecting defects in building exterior walls. It includes: using the YOLOv11 model as a framework, adding a focal residual convolution module between the original backbone network and the neck network, and adding a feature injection network module between the FPN network module and the PAN network module of the original neck network. The model training module is used to train the building exterior wall defect detection network using the building exterior wall defect detection dataset to obtain the optimal building exterior wall defect detection model. The defect detection module is used to acquire video data collected in real time by the drone and input the video data into the optimal building exterior wall defect detection model, and output the location and type of the detected defects.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 6.