Outer wall hole detection method and system based on circular hole geometry and annular texture enhancement

By improving the YOLOv11 model, designing a circular hole sensing detection head and a ring texture enhancement module, the center coordinates and radius of the hole are explicitly predicted, solving the problem of distinguishing hole types in prefabricated exterior wall panels and achieving high-precision hole detection and quality judgment.

CN121921248APending Publication Date: 2026-04-24CHINA TIESIJU CIVIL ENGINEERING GROUP CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA TIESIJU CIVIL ENGINEERING GROUP CO LTD
Filing Date
2025-11-27
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing technologies make it difficult to accurately distinguish between grouting connection holes and process holes on precast exterior wall panels, resulting in a high misjudgment rate in quality inspection and failing to meet the requirements of engineering quality inspection.

Method used

A hole detection model based on YOLOv11 is adopted. By designing a circular hole sensing detection head and a ring texture enhancement module, the center coordinates and radius of the hole are explicitly predicted. Geometric consistency loss is introduced to distinguish between grouting holes and process holes by utilizing the texture and geometric differences.

Benefits of technology

It significantly improves the accuracy and classification rate of hole detection in precast exterior walls, effectively solves the problems of missed detection and misjudgment, and is suitable for automated quality inspection of precast components.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121921248A_ABST
    Figure CN121921248A_ABST
Patent Text Reader

Abstract

The invention provides an outer wall hole detection method and system based on circular hole geometry and annular texture enhancement, and belongs to the technical field of target detection based on deep learning. The method comprises the following steps: acquiring an annotation data set of prefabricated outer wall holes; using YOLOv11 as a baseline model and improving the baseline model, constructing a hole detection model, training the hole detection model by using the annotation data set, and detecting by using the trained model to obtain a hole detection result; wherein the improvement comprises the following steps: designing a round hole sensing detection head in a decoupling detection head, fusing a round structure of a prefabricated hole into a network learning process in prior, and explicitly predicting the circle center coordinate and radius of a target hole; an annular texture enhancement module RT-C3k2 is designed in a shallow feature extraction part of the YOLOv11 network, and response difference between a hole center and an outer ring pit is simulated through depth separable convolution of different receptive fields. According to the scheme, the accuracy of hole detection in a complex industrial scene can be improved, and different types of holes are effectively distinguished.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of target detection technology based on deep learning, and in particular to a method and system for detecting external wall holes based on circular hole geometry and annular texture enhancement. Background Technology

[0002] Precast concrete exterior wall panels are core enclosure components in the field of prefabricated buildings. Their production typically employs large-scale, batch-production mold-forming processes. However, in actual production, factors such as mold manufacturing precision, concrete pouring techniques, and human error can easily lead to quality defects such as missing holes, misaligned holes, or confused hole types. Therefore, precise inspection is essential after production to prevent missing holes or misidentification, thus avoiding serious engineering hazards.

[0003] Two types of holes are usually reserved on the surface of precast exterior wall panels: one is a grouting connection hole with an internal hole (referred to as a grouting hole, GH), and the other is a direct process hole without an internal structure (referred to as a process hole, AH). These two types of holes have slight differences in the number, size, location requirements and functional attributes, which leads to different quality judgment rules for the two.

[0004] In existing technologies, hole detection is mainly achieved using methods based on traditional machine vision or general object detection models. However, methods based on traditional machine vision can usually only identify the existence of holes, but they are unable to identify subtle differences in the internal structure of holes or distinguish between different types of holes. Consequently, they cannot apply corresponding quality judgment rules to determine whether there are quality problems such as omissions or positional deviations of corresponding types of holes. On the other hand, directly applying general object detection models also suffers from high false positive rates, insufficient detection accuracy, and poor applicability due to the lack of specialized modeling of hole morphological features, making it difficult to meet the requirements of engineering quality inspection.

[0005] Therefore, there is a need for a high-precision and robust hole identification technology that can accurately distinguish different hole types so that different quality judgment rules can be applied to detect quality problems such as missing or incorrect holes, thereby ensuring the construction quality and safe service life of prefabricated buildings. Summary of the Invention

[0006] The purpose of this application is to provide a method and system for detecting external wall holes based on circular hole geometry and annular texture enhancement, so as to solve or alleviate the problems existing in the prior art.

[0007] To achieve the above objectives, this application provides the following technical solution: In a first aspect, this application provides a method for detecting external wall holes based on circular hole geometry and annular texture enhancement, including: Obtain the labeled dataset of holes in the precast exterior wall; A hole detection model was constructed using YOLOv11 as a baseline model and improved upon it. The hole detection model is trained using the labeled dataset. The image to be detected is input into the trained hole detection model to obtain the hole detection result. Among them, the improvements of the hole detection model to YOLOv11 include: designing a circular hole sensing detection head in the decoupled detection head, including a circular parameter prediction branch and geometric consistency loss, to incorporate the prior circular structure of the pre-made hole into the network learning process, and to explicitly predict the center coordinates and radius of the target hole; and designing a ring texture enhancement module RT-C3k2 in the shallow feature extraction part of the YOLOv11 network, which simulates the response difference between the hole center and the outer ring pit through separable convolutions with different receptive fields.

[0008] In conjunction with the first aspect, preferably, the circular hole sensing detection head constitutes an independent branch, which is executed in parallel with the existing bounding box regression branch and category prediction branch of the YOLOv11 network. The three branches share the same backbone features, but each uses an independent lightweight convolutional layer for feature mapping.

[0009] In conjunction with the first aspect, preferably, the circular parameter prediction branch includes several lightweight convolutional layers, each of which includes sequentially connected 3×3 convolutions, batch normalization, and linear units; The output of the circular parameter prediction branch is a three-dimensional tensor, denoted as: ,in, They are the centers of the circles. , coordinate, It is the radius.

[0010] In conjunction with the first aspect, preferably, the geometric consistency loss includes: circular IoU loss (also known as CircularIoU loss). The circular IoU loss is obtained by the following steps: first, calculate the distance between the center of the prediction circle and the truth circle, determine the relative position of the two circles based on the distance, find the intersection of the two circles, and calculate the circular IoU according to the definition of intersection-union ratio, and then calculate the circular IoU loss.

[0011] In conjunction with the first aspect, preferably, the geometric consistency loss further includes: a circular-rectangular consistency constraint, wherein the circular-rectangular consistency constraint further includes a center consistency constraint and an inclusion constraint. The calculation steps for the center consistency constraint are as follows: First, obtain the center, width, and height of the predicted rectangle and the center of the predicted circle. Then, calculate the L2 distance between the center of the predicted rectangle and the center of the predicted circle as the center consistency constraint. The inclusion constraint is used to determine whether the center of the circle is inside the predicted rectangle; Multiply the inclusion constraint by the corresponding weight, and then add it to the center consistency constraint to obtain the circle-rectangle consistency constraint.

[0012] In conjunction with the first aspect, preferably, the ring texture enhancement module includes: a main branch and a ring texture branch. The main branch maintains the same structure as the existing C3k2 module of the YOLOv11 network. The ring texture branch contains two sets of depthwise separable convolutions with different dilation rates, used to extract inner ring features and outer ring features to obtain the feature map of the ring texture branch. The main branch and the circular texture branch perform feature extraction in parallel, and output their respective feature maps.

[0013] In conjunction with the first aspect, preferably, the inner ring feature and the outer ring feature correspond to the outputs of depth-separable convolutions with a first dilation rate and a second dilation rate, respectively, and the first dilation rate is less than the second dilation rate; After obtaining the feature map of the annular texture branch, the process also includes: normalizing the inner ring features and outer ring features to construct the annular response features, as shown in the following expression: , In the formula, It exhibits ring-shaped response characteristics. Features of the outer ring Features of the inner circle For batch normalization, This is the balance coefficient.

[0014] In conjunction with the first aspect, preferably, after constructing the annular response features, the method further includes: constructing a channel attention mechanism and feature fusion on the annular response features, specifically: Global average pooling is performed on the ring response features to obtain the channel description vector; Two fully connected layers are used to generate channel weights, and the channel weights are used to recalibrate the feature maps output by the backbone branch to obtain the calibrated backbone features. The calibrated backbone features and the annular response features are concatenated along the channel dimension, and then fused and compressed using a 1×1 convolution to obtain the output of the annular texture enhancement module.

[0015] In conjunction with the first aspect, preferably, when training the hole detection model using the labeled dataset, a phased training strategy is adopted. In the early stage of training, only the bounding box regression loss and the circle-rectangle consistency constraint are used for weak supervision to achieve coarse alignment of the circle parameters. In the later stage of training, the weight of the circle IoU loss in the geometric consistency loss is gradually increased to explicitly strengthen the constraints based on the circle geometry.

[0016] Secondly, this embodiment provides an exterior wall hole detection system based on circular hole geometry and annular texture enhancement. This system is used to execute the exterior wall hole detection method based on circular hole geometry and annular texture enhancement provided in any of the above embodiments, including: The annotation unit is configured to obtain the annotation dataset of prefabricated exterior wall openings; The model building unit is configured to use YOLOv11 as a baseline model and improve upon it to build a hole detection model. The training and prediction unit is configured to train the hole detection model using the labeled dataset, input the image to be detected into the trained hole detection model, and obtain the hole detection result. Among them, the improvements of the hole detection model to YOLOv11 include: designing a circular parameter prediction branch and geometric consistency loss in the decoupled detection head to explicitly predict the center coordinates and radius of the target hole; and designing a ring texture enhancement module RT-C3k2 in the shallow feature extraction part of the YOLOv11 network to simulate the response difference between the hole center and the outer ring pit through separable convolution with different receptive fields.

[0017] Beneficial effects: The technical solution provided in this embodiment uses YOLOv11 as the baseline model. A ring texture enhancement module (RT-C3k2) is designed in the shallow feature extraction stage of the YOLOv11 backbone network. RT-C3k2 includes a dedicated ring texture branch. This branch utilizes depthwise separable convolutions with different receptive fields to simulate the response differences between the center and outer recesses of holes, strengthening the network's feature activation of the unique concave ring structure of grouting holes. This effectively distinguishes between process holes and grouting holes with similar textures, allowing for the application of different quality judgment rules for qualification detection. Secondly, a geometrically prior-constrained circular hole sensing detection head (GCH) is designed. Based on traditional rectangular bounding box regression, it explicitly predicts the center coordinates and radius of the hole and introduces CircularIoU loss and circle-rectangle consistency constraints, integrating the circular geometric prior of the hole into the network training to achieve co-optimization of position and shape. The solution provided in this embodiment can significantly improve the detection accuracy and classification accuracy of micro-holes in complex concrete backgrounds, effectively solving the problems of missed detections and false judgments, and is suitable for automated quality inspection of precast components. Attached Figure Description

[0018] Figure 1 This is an example image of a dataset of holes in prefabricated exterior walls.

[0019] Figure 2 This is a schematic diagram of the baseline model YOLOv11.

[0020] Figure 3 This is a schematic diagram of the improved YOLOv11 structure.

[0021] Figure 4 This is a schematic diagram of the structure of a circular hole sensing detection head.

[0022] Figure 5 This is a schematic diagram of the ring texture enhancement module.

[0023] Figure 6 This is a visual diagram of the hole detection results in this embodiment.

[0024] Figure 7 A schematic diagram of the electronic device structure provided in this application. Detailed Implementation

[0025] To facilitate understanding of the technical solution of this application, some related terms are described in detail below.

[0026] Grouting connection holes: Grouting connection holes with internal small holes are the core functional holes for component splicing. They are used to inject high-strength grout into the joint gaps to achieve rigid connection between components, directly determining the overall integrity, seismic resistance, and mechanical transfer efficiency of the building structure. If these holes are not inspected after fabrication (e.g., not pre-drilled or misaligned), the grouting process cannot be completed during on-site assembly, the joint connection strength is insufficient, and long-term use may lead to structural cracking, detachment, and other safety accidents.

[0027] Process holes: Direct process holes without internal structure are only temporary auxiliary holes for hoisting and mold positioning during the production stage, and have no load-bearing or sealing function. If such holes are not inspected after manufacturing (residual holes are not identified), the sealing process will be omitted after on-site assembly, resulting in water seepage in the wall, failure of thermal insulation, and reduced sound insulation effect. If they are mistakenly identified as grouting connection holes, the holes will remain without grouting material, which will not only damage the wall's sealing performance but also waste subsequent treatment costs.

[0028] Quality judgment rules: refers to a set of specific and quantitative inspection standards and logical judgment criteria used to evaluate whether the reserved holes on prefabricated exterior wall panels meet the design specifications and construction requirements. It should be noted that in this embodiment, the goal of quality inspection is not simply to distinguish between "with holes" or "without holes", but to set different qualification standards in the following dimensions according to the type of hole (grouting hole GH or process hole AH): (1) Existence rule: check whether the specified type and number of holes have been reserved. For example, an exterior wall panel needs 4 grouting holes and 2 process holes. After completing the hole inspection, the quality inspection needs to determine whether all 6 holes exist and whether there are any omissions. (2) Position accuracy rule: check whether the center coordinates of the hole are within the allowable tolerance range of the design. As a key node of structural connection, the position tolerance requirements of grouting holes are usually more stringent than those of process holes. Therefore, the quality judgment rules will set offset tolerances for GH and AH respectively. (3) Size specification rule: check whether the geometric dimensions such as the diameter and depth of the hole meet the design requirements. Because grouting holes have relatively complex internal structures (such as small holes), their dimensional inspection rules should include the dimensional requirements of the internal structure. In contrast, the rules for process holes are relatively simple, focusing only on the main hole diameter (outer ring), etc.

[0029] The embodiments of this application will now be described with reference to the accompanying drawings.

[0030] This embodiment provides a method for detecting external wall holes based on circular hole geometry and annular texture enhancement. The method includes the following steps: S1, obtain the labeled dataset of holes in the prefabricated exterior wall.

[0031] In this embodiment, the dataset used is a self-built dataset, which is constructed by collecting approximately 400 original images from the construction site. Since the construction site environment varies greatly—lighting, occlusion, and dust can all affect the acquisition of the actual images—data augmentation of the detection images is necessary to improve the generalization ability of the detection model.

[0032] Data augmentation includes adjusting exposure and sharpness processing, resulting in approximately 2000 images after augmentation.

[0033] For the detection of holes in precast exterior walls, Labelimg-1.8.6 was used on the Windows 11 system to annotate the images, and the annotated dataset (i.e., the labeled dataset) was divided into training set, test set and validation set. For example, the corresponding ratio can be set to 8:1:1, and the specific quantities are shown in Table 1 below.

[0034] Table 1 Number of Dataset Splits

[0035] As an example, such as Figure 1As shown, the blue rectangle contains grouting connection holes with internal perforations. These are the core functional holes for component splicing, used to inject high-strength grout into the joint gaps. The red rectangle contains direct process holes without internal structure, serving only as temporary auxiliary holes for hoisting and mold positioning during the production stage, without load-bearing or sealing functions. (Observation) Figure 1 It is known that there is a significant difference in texture between grouting holes and process holes. The former is characterized by a small hole nested in a concave annular pit, while the latter is more like a single black hole. Based on this, this application develops model improvements and designs to enhance the distinguishability of the two hole types. At the same time, it reduces the interference of background noise through geometric prior knowledge, thereby improving the accuracy of hole detection and positioning.

[0036] S2. Using YOLOv11 as the baseline model and improving it, a hole detection model is constructed.

[0037] To facilitate understanding of the technology in this embodiment, the baseline model YOLOv11 will be briefly described below.

[0038] like Figure 2 As shown, YOLOv11, as the overall framework of the object detection network, is an improvement and enhancement based on the classic object detection network YOLOv8, possessing high performance and powerful feature extraction capabilities. The main modules of YOLOv11 include a backbone network, a neck network, and a head network. The C3k2 module used in the backbone network reduces redundant parameters and has superior feature extraction capabilities compared to YOLOv8's C2f module, improving computational efficiency. The last layer of the backbone network connects to the C2PSA module, which is an extension of the C2f module, combined with the PSA (Pointwise Spatial Attention) block to enhance feature extraction and attention mechanisms, improving the model's ability to capture important features. The neck network (neck module) includes a Probability Anchor Allocation (PAA) module and a Path Aggregation Network (PAN). The Path Aggregation Network enhances the model's context awareness by fusing features from different levels. The combined effect of PSA, PAA, and PAN effectively fuses features at different scales, improving the model's ability to detect multi-scale objects. The head network (also known as the decoupled detection head) quickly processes the features integrated by the Neck module and outputs the bounding box and class probability of each anchor box, thereby achieving the target detection task.

[0039] Analysis revealed that the main reasons for false positives and false negatives in existing hole detection methods are: the target size of holes on precast exterior wall panels is small, and their edges often exhibit blurred features due to the pouring process; furthermore, the grayscale texture of the holes is similar to the concrete background, resulting in low target differentiation. In addition, exterior wall panel holes are mostly small circular structures, while traditional detection methods typically use rectangular frames as the detection output. These rectangular frames do not match the actual target shape, and their coverage area includes a large number of irrelevant background pixels, easily introducing interference. These problems are further exacerbated when the hole edges are blurred or slightly obscured, leading to unstable detection results.

[0040] Based on the above research findings, to achieve the identification of small holes in concrete backgrounds and effectively distinguish between two similar holes, this embodiment improves YOLOv11 by: designing a Geometry-aware Circular Head (GCH) in the decoupled detection head, including a circular parameter prediction branch and geometric consistency loss, incorporating the prior circular structure of the prefabricated hole into the network learning process, and explicitly predicting the center coordinates and radius of the target hole. Since the hole itself has a typical circular structure, the introduction of the circular parameter makes the network's feature representation more consistent with the actual target shape, which helps to enhance the identification ability of small-sized, weak-edge holes. A Ring-Texture Enhanced C3k2 module is designed in the shallow feature extraction part of the YOLOv11 network, which simulates the response difference between the hole center and the outer ring pit through separable convolutions with different receptive fields.

[0041] Traditional YOLOv11 only regresses rectangular boxes, failing to fully utilize the strong geometric prior that "hole ≈ circle / ring". Due to the difference between rectangular boxes and circles, rectangular boxes often contain noise other than holes, interfering with hole identification and localization. This embodiment designs a circular hole sensing detection head in a decoupled detection head. This detection head includes two parts: a circular parameter branch and a geometric consistency loss. The circular structure prior of the hole is explicitly integrated into the network learning process, enabling the model to fully utilize the strong geometric prior knowledge of circles and directly regress the center coordinates and radius of the hole. This enhances the structural sensitivity to small-sized, weakly boundaryed circular targets, improves the accuracy of hole localization, and achieves collaborative optimization of hole position and shape. By leveraging the significant differences in texture morphology between grouting holes and process holes—the former appearing as a small hole nested within a concave annular pit, while the latter more closely resembles a single black hole—a ring texture enhancement module (RT-C3k2) is added to the shallow feature extraction stage. This module simulates the difference in texture response between the central region of the hole and the outer ring pit through depth-separable convolutions with different dilation rates. This enables the improved YOLOv11 network to generate stronger activation for grouting holes with obvious annular structures, while more accurately distinguishing between the two similar hole types, grouting holes and process holes, thus improving the reliability of hole type determination.

[0042] For ease of description, the improved YOLOv11 network is referred to as the hole detection model, or GRT-YOLO for short, and its full English name is Geometry & Ring-Texture YOLO.

[0043] Preferably, the circular aperture sensing detection head is an independent branch, namely the circular parameter prediction branch and the geometric consistency loss branch, which are executed in parallel with the existing bounding box regression branch and class prediction branch of the YOLOv11 network. The three branches share the same backbone features, but each uses an independent lightweight convolutional layer for feature mapping.

[0044] In other words, considering the characteristic that the geometric shape of prefabricated exterior wall openings closely resembles a circular / ring structure, this embodiment designs a geometrically prior-constrained circular hole sensing detection head (GCH) based on the YOLOv11 detection framework. This involves adding a parallel, independent, lightweight circular parameter prediction branch while maintaining the existing bounding box regression and category prediction branches of the YOLOv11 network. All three branches perform independent convolution processing on the input feature maps, avoiding mutual interference between tasks. Furthermore, by designing a circular IoU geometric loss and a circle-rectangle consistency constraint, the circular prior of the prefabricated holes is explicitly encoded into the network, thereby improving the detection and precise localization capabilities of small holes.

[0045] Preferably, the circular parameter prediction branch includes several lightweight convolutional layers, each of which includes sequentially connected 3×3 convolutions, batch normalization, and linear units; the output of the circular parameter prediction branch is a three-dimensional tensor, denoted as: ,in, These are the offset coordinates of the circle's center relative to the grid. It is the logarithmic radius.

[0046] It should be noted that since the YOLOv11 network has multiple detection heads, each of which receives feature maps of different scales from the neck network, forming a multi-scale detection head output, there are also multiple circular hole sensing detection heads, which can output multi-scale circular detection results.

[0047] Taking a detection head of any scale as an example, Figure 4 This is a schematic diagram of the structure of a circular aperture sensing detection head. Figure 4 As shown, the YOLOv11 network's decoupled detection head includes two branches: a bounding box regression branch (the CioU branch in the figure) and a class prediction branch (the CLSLoss branch in the figure). The output tensor of the bounding box regression branch is: b The output of the category prediction branch is: a category probability vector. ,in, This represents the offset of the bounding box center point relative to the grid. This represents the logarithmic scaling regression of the bounding box width and height. The newly added circular parameter prediction branch, denoted as CircleHead, uses a similar convolutional structure to the existing two branches. For example, its structure may include several lightweight convolutional layers. Each lightweight convolutional layer includes sequentially connected 3×3 convolutions, batch normalization (BN), and linear units (SiLU) to explicitly output the predicted circle's center and radius. .

[0048] This embodiment designs a circular parameter prediction branch that explicitly outputs the center and radius of the predicted circle, achieving a description consistent with the actual geometry of the hole. Compared to traditional detection methods that only output rectangular boxes, this branch effectively reduces background interference caused by the outward expansion of the rectangle, thereby improving positioning accuracy. Furthermore, the circular parameter can impose geometric consistency constraints on candidate targets in the post-processing stage, further reducing the false detection rate through radius rationality screening.

[0049] For each scale feature map, the final detection head output of the GRT-YOLO network is: .

[0050] Furthermore, the method in this embodiment also includes a geometric parameterization operation, as detailed below: To maintain consistency with YOLOv11, assume the feature map size is... stride is The width and height of the input feature map are For coordinates The output of the bounding box regression branch of the grid points is b The normalized bounding box is converted to: , (1) In the formula, The index of the current grid point. For the Sigmoid function, This is the stride for detection at this scale. This is an exponential mapping.

[0051] Circular output for the same grid point The center and radius of the circle are defined as follows: , (2) In the formula, , Let the coordinates be the center of the circle. The radius is [0, 1].

[0052] In the above calculations, the center coordinates use the same mechanism as the existing rectangular box center regression in the YOLOv11 network, namely, a representation combining sigmoid offset and stride, ensuring consistent parameter methods and radius. An exponential mapping is used to ensure that the predicted value is always positive, and this is achieved by dividing by... Normalization is performed, and combined with stride, it enables adaptation to targets of different scales.

[0053] After introducing the circular parameter, the loss function calculation requires both rectangular bounding box labels and circular geometric labels. However, existing datasets typically only provide rectangular bounding box annotations. However, re-annotating the circular parameters would significantly increase annotation costs. Therefore, this embodiment designs a method for automatically constructing circular labels based on the approximate circular features of the hole target, achieving geometric supervision enhancement with zero additional manual annotation.

[0054] Specifically, the center of the labeled rectangle is directly used as the true value of the circle's center, that is: (3) in, , These are the coordinates of the true center point of the labeled rectangle. , These are the true coordinates of the center of the automatically generated circular label.

[0055] To generate circle radius labels, using the shorter side of the rectangle as an approximate geometric scale, the following definition is used: (4) The radius of the automatically generated circular label. To label the true width and height of the rectangle, This is the length of the shorter side of the rectangle. This is a radius scaling factor used to compensate for the issue of the rectangle enclosing the circle being too large. For example, the value range is set as follows: .

[0056] By automatically generating center and radius labels based on the true value of the rectangular box, this embodiment can provide effective supervision signals for the prediction of circular parameters without increasing any manual annotation costs. This automated circular label construction mechanism enables the model to learn the center position of the target and the approximately circular geometric features simultaneously during the training phase, thereby constructing a new geometric constraint loss and enhancing the model's ability to represent circular structural targets. As a result, it not only avoids the increased workload and cost caused by additional circular annotations, but also improves the model's ability to learn geometric consistency for hole-type targets.

[0057] In this embodiment, the geometric consistency loss includes: circular IoU loss (also known as circular parameter loss, CircularIoU) and circular-rectangular consistency constraint (also known as circular-rectangular consistency loss). The geometric consistency loss is combined with the original detection loss of the YOLOv11 network to form the overall loss, the function expression of which is as follows: (5) In the formula, It is an overall loss. This refers to the original detection loss of the YOLOv11 network, also known as the bounding box regression loss. Other losses can also be used, such as bounding box CIoU / DFL and classification loss. For circular IoU loss, For circle-rectangle consistency constraints, , These are the weighting coefficients.

[0058] The circular IoU loss is obtained by the following steps: First, calculate the distance between the center of the prediction circle and the truth circle. Then, determine the relative position of the two circles based on the distance, find the intersection of the two circles, and calculate the circular IoU according to the definition of intersection-union ratio, and then calculate the circular IoU loss.

[0059] Specifically, given any prediction circle With the truth circle Calculate the distance between the centers of the two circles: (6) Based on the distance between the two centers Given their respective radii, determine the relative positions of the two circles: like The two are separate, and the intersection of the two circles ; like The two circles contain each other, and their intersection is the point where they meet. ; Otherwise, determine that the two circles partially intersect, i.e., the intersection of the two circles. The calculation formula is as follows: (7) The areas of the two circles are respectively: , Then, calculate the circular IoU loss according to the definition of intersection-union ratio: (8) The circular IoU loss is then calculated as follows: .

[0060] To ensure that the center of the circle is consistent with the center of the rectangle and that the circle is completely contained within the rectangle, a circle-rectangle consistency constraint is designed, including a center consistency constraint and an inclusion constraint. The calculation steps for the center consistency constraint are as follows: First, obtain the center, width, and height of the predicted rectangle and the center of the predicted circle. Calculate the L2 distance between the center of the predicted rectangle and the center of the predicted circle as the center consistency constraint. The inclusion constraint is used to determine whether the center of the circle is inside the predicted rectangle. Multiply the inclusion constraint by its corresponding weight and then add it to the center consistency constraint to obtain the circle-rectangle consistency constraint.

[0061] Specifically, let the center of the predicted rectangle be... Width and height are The predicted center of the circle is , radius is Then the central consistency constraint The formula for calculation is: (9) The expression for the inclusion constraint is: (10) Inclusion constraint This is used to determine if the center of a circle lies inside a rectangle and the circle does not cross the boundary; the circle is considered complete within the rectangle when it is entirely within the rectangle. .

[0062] Central consistency constraint With inclusion constraint The synthesis involves multiplying the inclusion constraint by its corresponding weight and then adding it to the centrality consistency constraint to obtain the circle-rectangle consistency constraint, calculated as follows: (11) In the formula, for The weight.

[0063] The above is a detailed description of the circular hole sensing detection head. Next, we will elaborate on the second improvement of YOLOv11: the design of the RT-C3k2 ring texture enhancement module in the shallow feature extraction section.

[0064] Because grouting holes and process holes are highly similar in overall brightness and macroscopic shape, relying solely on conventional convolutional features is insufficient for effective differentiation. Analysis reveals stable and distinguishable pattern differences in their detailed texture structures: grouting holes typically exhibit a composite texture of "outer ring-shaped concave structure superimposed with a central small hole," while process holes are closer to a single hole structure. The existing C3k2 module primarily extracts local features based on 3×3 convolutions with a fixed receptive field, failing to explicitly represent the hierarchical texture features of the aforementioned "outer ring + central hole" structure. Therefore, this embodiment constructs a ring texture enhancement module, RT-C3k2, based on the C3k2 module. By introducing a convolutional branch specifically designed for modeling ring structures, it enhances the network's sensitivity and distinguishability to the characteristic ring texture of grouting holes.

[0065] Specifically, the ring texture enhancement module in the GRT-YOLO network includes a backbone branch and a ring texture branch. The backbone branch maintains the same structure as the existing C3k2 module in the YOLOv11 network. The ring texture branch contains two sets of depthwise separable convolutions with different dilation rates, used to extract inner ring features and outer ring features, resulting in the feature map of the ring texture branch. The backbone branch and the ring texture branch perform feature extraction in parallel, and output their respective feature maps.

[0066] The following reference Figure 5 Its structure will be further described. For example... Figure 5 As shown, the ring texture enhancement module includes a ring texture branch and a backbone branch (i.e., the existing C3k2 module in the YOLOv11 network). The backbone branch follows the original C3k2 structure, extracts local semantic information, and establishes residual connections with shallow features. The ring texture branch directly acts on the input feature map, using two sets of depthwise separable convolutions with different dilation (Outer Conv and Inner Conv) to simulate the inner and outer ring (i.e., outer ring) responses of the holes.

[0067] Preferably, the inner circle features and outer circle features correspond to the outputs of depthwise separable convolutions with different dilation rates (i.e., the first dilation rate and the second dilation rate), respectively, and the first dilation rate is less than the second dilation rate; the inner circle and outer circle convolution formulas are as follows: , (12) In the formula, , These are the inner ring features and the outer ring features, respectively. This represents depthwise separable convolution. The parameters for the inner depthwise separable convolution (Inner Conv) are set as follows: 3×3 kernel, dilation rate... Let this dilation rate be denoted as the first dilation rate. The parameters of the outer ring depthwise separable convolution (Outer Conv) are set as follows: 3×3 convolution kernel, dilation rate... This expansion rate is denoted as the second expansion rate.

[0068] in, Setting a small expansion rate (e.g., expansion rate = 1) focuses on capturing the response of the central aperture / black hole. By setting a larger dilation rate, a larger effective receptive field is obtained, focusing on the peripheral area to capture the texture of the concave annular pit. , The feature maps that together form the ring-shaped texture branches.

[0069] In obtaining , The next step involves normalization and differencing, specifically as follows: After normalizing the inner ring features and outer ring features, the differences are performed to obtain the ring response features (also known as the ring response map), expressed as follows: (13) In the formula, It exhibits ring-shaped response characteristics. Features of the outer ring Features of the inner circle For batch normalization, This is the balance coefficient.

[0070] Here, "difference" refers to the subtraction operation between the normalized outer loop features and the normalized inner loop features weighted by the balance coefficients, that is, obtaining the difference features between the two through subtraction.

[0071] The principle behind the above processing is as follows: for grouting holes with obvious pits and a central hole structure, the inner and outer rings respond simultaneously, and the activation remains high after differential processing; while for process holes with only a central black hole, the inner ring response is significantly stronger than the outer ring, and differential operation can effectively suppress its annular response, thereby distinguishing the two types of holes in the feature space.

[0072] To fully utilize the guiding role of the ring response in the overall characteristic distribution, preferably, in this embodiment, after obtaining... The process further includes steps for constructing a channel attention mechanism and feature fusion on the ring response features. Specifically, global average pooling is performed on the ring response features to obtain channel description vectors; two fully connected layers are used to generate channel weights, and the channel weights are used to recalibrate the feature maps output by the backbone branches to obtain calibrated backbone features; the calibrated backbone features and the ring response features are concatenated in the channel dimension, and then fused and compressed using 1×1 convolution to obtain the output of the ring texture enhancement module.

[0073] First of all, Perform global average pooling to obtain the channel description vector. The expression is as follows: (14) In the formula, This is a global average pooling operation. Indicates a channel.

[0074] Then, channel weights are generated using a channel attention network containing two fully connected layers. The expression is as follows: (15) In the formula, , Here are the weight matrices for the two fully connected layers. It is the Sigmoid activation function. It is a non-linear activation function, usually ReLU.

[0075] Using channel weights Channel recalibration is performed on the feature maps output by the main branches to obtain the calibrated main features. The expression is as follows: (16) In the formula, It is the feature map output by the main branch. This indicates element-wise multiplication.

[0076] Finally, the recalibrated backbone features With ring response characteristics splicing along the channel dimension, and through... The convolutions are then fused and compressed to obtain the final output of RT-C3k2.

[0077] In this embodiment, by designing a dual-branch ring texture enhancement module with a main branch and a ring texture branch, the network can maintain its original semantic expression ability while generating a higher response to the grouting hole region with ring texture, thus providing more discriminative features for the subsequent detection head.

[0078] S3. The hole detection model is trained using a labeled dataset. The image to be detected is input into the trained hole detection model to obtain the hole detection results.

[0079] In this embodiment, the hole detection model is trained using a labeled dataset. During the training phase, in each training iteration, positive and negative samples are assigned to the network output and the labels. The positive and negative sample assignment follows the positive sample matching mechanism of YOLOv11 (such as SimOTA / TaskAligned). For each prediction point assigned as a positive sample, its detection loss is also calculated. Circular parameter loss and circle-rectangle consistency loss The detection loss, circular parameter loss, and circle-rectangle consistency loss are weighted and summed according to preset weights to form the total loss, and the network parameters are backpropagated and updated.

[0080] Furthermore, this embodiment employs a phased training strategy: in the initial training phase, only the bounding box regression loss and the center point constraint (circle-rectangle consistency loss) are used. Weak supervision is mainly used to achieve coarse alignment of circular parameters. In the later stages of training, the weight of circular parameter loss (i.e. circular IoU loss) is gradually increased to explicitly strengthen the constraints based on circular geometry.

[0081] For example, for the first few epochs (e.g., 10-20), only L1 / CioU combined with center point constraints is used for weak supervision, allowing the circle parameters to be coarsely aligned initially; the circle parameters are gradually increased in the later stages of training. Explicitly strengthen the constraints of the circular IoU loss to prevent the initial gradient from being too large and causing non-convergence.

[0082] After the above training process, a trained hole detection model is obtained. During the inference phase, non-maximum suppression (NMS) is first performed based on the bounding box confidence. That is, for all generated candidate detection boxes, NMS is performed using the product of the target confidence and class confidence of the bounding box as the ranking criterion, maintaining compatibility with the mainstream YOLO workflow. Then, the center point of the target hole is output based on the circular parameter, which is the center of the predicted circle obtained from the circular parameter prediction branch. As the true center point of the hole, it is used for precise hole positioning in engineering, avoiding interference from the rectangular background. Finally, based on the radius validity condition, the circle parameter is filtered. That is, for the candidate targets retained by NMS, geometric validity constraints are applied according to the circle parameters (such as the center and radius), such as filtering out candidates with unreasonable radii, and further eliminating false detection results.

[0083] To verify the solution provided in this embodiment, the following experimental steps are also included: First, select the test environment and set the hyperparameters.

[0084] The experiment was conducted on a Linux operating system. Since GPU computing is more efficient than CPU computing and can execute deep learning tasks faster, this experiment used two NVIDIA Ampere A100 GPUs with 100GB of memory for both training and testing. The software environment was configured with PyTorch 1.11.0 as the deep learning library and Python 3.8.0 as the programming language. During training, the batch size and training epochs were set to 16 and 300, respectively. Furthermore, stochastic gradient descent (SGD) was selected as the optimizer, with a momentum parameter of 0.937 and weight decay of 0.0005. To ensure a balance between computational speed and accuracy, a learning rate of 0.001 was used.

[0085] Then an ablation test was performed.

[0086] Ablation experiments evaluate the performance of each module in the overall detection task by removing or replacing modules of the detection network. This helps identify the contribution of each module to changes in model accuracy and efficiency. By comparing training loss and validation results under the same configuration, a comprehensive understanding of the role of each module and their interrelationships is achieved, providing a basis for further model optimization. In this embodiment, the ablation experiment metrics are shown in Table 2, as follows: Table 2 Ablation Test Indicators

[0087] As shown in Table 2, the baseline model YOLOv11 (“Base” in the table) has an overall accuracy of approximately 80% on the precast exterior wall hole dataset (i.e., the labeled dataset of precast exterior wall holes), and its recognition performance for GH (grouting holes) is significantly insufficient. This is because GH and AH are similar in appearance and size in the dataset, and the concrete background grayscale is similar, leading to frequent confusion between the two classes in the baseline model. GH is often misdetected as AH or directly missed, resulting in significantly lower overall mAP and GH class mAP. After adding GCH to the baseline model, the overall accuracy, recall, mAP50, and mAP50:95 all show significant improvement, with mAP for both hole types increasing simultaneously. This is because GCH explicitly encodes the geometric prior of the hole's approximate circular / annular shape into the detector head. Through circular parameter prediction and Circular IoU constraints, it improves the center localization and scale regression of small circular holes, preventing small targets from being missed or excessively offset due to edge blurring or background interference. This allows for a better overall solution to the problem of hole presence and localization. Furthermore, adding only RT-C3k2 improved the overall mAP, with a particularly significant improvement in GH class mAP, far exceeding the increase for AH. This is because it closely matches the data features: GH has a unique ring texture of "a small hole nested in a concave ring pit," while AH is closer to a single black hole. RT-C3k2, through differential dilation convolution and ring texture branching, enhances the response to the "outer pit + central hole" structure, making it easier for the network to determine whether a hole is a GH with a pit, even after the hole has been detected, significantly reducing the proportion of GH being misclassified as AH. When GCH and RT-C3k2 are introduced simultaneously, the overall precision, recall, mAP50, and mAP50:95 all reach their highest values. The mAP for both AH and GH classes also simultaneously refreshed the best records, with only a slight increase in inference time. This demonstrates that the two modules complement each other at the geometric and texture levels: GCH is responsible for accurately identifying and locating all holes, while RT-C3k2 is responsible for identifying the hole type. In the typical engineering scenario of "small round holes + single concrete background + GH with ring-shaped pit texture" in this dataset, GRT-YOLO made full use of structural priors and ring-shaped texture information to achieve high-precision automatic identification of grouting holes (GH) and process holes (AH) in precast exterior walls.

[0088] Furthermore, to verify the effectiveness and superiority of the proposed GRT-YOLO in detecting voids in precast concrete exterior walls, the following comparative experiment was designed: The comparison models include the classic two-stage network Faster R-CNN and the single-stage networks YOLOv5, YOLOv7, YOLOv8, YOLOv9, and YOLOv10. The experiments maintained identical hyperparameter settings, training datasets (i.e., the self-built perforated dataset), and operating environments for all models to ensure the fairness of the comparison results. Table 3 shows the mean accuracy (mAP@0.5) and single-frame inference time (Time) for each model on the test set. Table 3 is as follows: Table 3 Comparative test results

[0089] As shown in Table 3, the GRT-YOLO proposed in this embodiment achieves a significant performance improvement in detection accuracy, reaching 95.3% mAP@0.5, far exceeding other mainstream models compared. Compared to the classic two-stage algorithm Faster R-CNN, GRT-YOLO improves accuracy by 7.7 percentage points; and compared to its counterparts YOLOv8 and YOLOv10, the improvements are even greater, reaching 15.9% and 15.1%, respectively. This result indicates that although general object detection models perform well on conventional datasets, they are prone to false positives or false negatives when faced with "grouting holes" and "process holes" with extremely similar textures against a concrete background, due to the lack of targeted modeling for circular geometric features and annular textures. GRT-YOLO, thanks to the introduced RT-C3k2 annular texture enhancement module and GCH geometry-aware detection head, can effectively capture subtle edge changes and internal concave features of holes, thus achieving a qualitative leap in accuracy.

[0090] In terms of inference speed, GRT-YOLO's single-frame inference time is 80.1ms, slightly higher than the more structurally simpler YOLOv5 (64.1ms), but significantly lower than Faster R-CNN's 240.1ms, and on par with YOLOv10 (80.2ms). This data indicates that the improvements in this embodiment did not introduce excessive computational burden, but rather achieved efficient optimization on the critical path of feature extraction. Overall, GRT-YOLO maximizes detection accuracy while maintaining real-time detection capabilities, demonstrating its robustness and superiority in detecting small holes in complex industrial environments, making it more suitable for automated quality inspection tasks on prefabricated exterior walls.

[0091] To visually demonstrate the technical effects of this embodiment, representative precast wall panel images were selected for comparative visualization analysis, and the results are as follows: Figure 6 As shown, the first column, Original, represents the original image; the second column, Base-model, represents the detection results of the baseline model; and the third column, GRT-YOLO, represents the detection results of the model provided in this embodiment. Figure 6 It is evident that in complex industrial scenarios, when faced with tiny, similarly textured holes against a concrete background, the baseline model (i.e., the traditional YOLOv11) exhibits significant limitations. Specifically, in the first row of images, the Base-model misses a process hole (AH) with low edge contrast; in the second row, the model not only misses two tiny process holes located in the edge region but also makes a serious classification error, misclassifying a process hole as a grouting hole (GH); similarly, in the third row, where there is background interference from characters, the Base-model again confuses the features, incorrectly identifying a process hole as a grouting hole. These errors of the baseline model demonstrate that general detection networks struggle to effectively distinguish between process holes and grouting holes and easily overlook weak, small target signals. In contrast, the improved GRT-YOLO model demonstrated superior detection capabilities in all the aforementioned scenarios, successfully identifying and correctly classifying all hole targets without any missed detections or misclassifications. This significant improvement is primarily attributed to two core improvements proposed in this application: First, the RT-C3k2 module, through its unique ring-shaped texture branch, keenly captures the essential difference in texture response between shallow pits outside grouting holes and single black holes in process holes, thus completely correcting the confusion problem of similar targets; second, the geometric prior constraints introduced by the GCH detection head enhance the network's ability to perceive circular structures, enabling the model to accurately locate the position of tiny holes even when the target edges are blurred or the background is cluttered. Therefore, the visualization results further demonstrate that GRT-YOLO has stronger feature discrimination and robustness, perfectly adapting to the high standards required for precast exterior wall quality inspection.

[0092] In summary, to address the challenges of detecting grouting holes and process holes in precast concrete exterior walls due to their small size, blurred edges, and high similarity to background textures, this embodiment proposes an improved algorithm / model (GRT-YOLO) based on the YOLOv11 network architecture. This scheme designs a ring texture enhancement module (RT-C3k2) in the shallow feature extraction stage of the backbone network. By adding a dedicated ring texture branch, it utilizes depth-separable convolutions with different receptive fields to simulate the response differences between the center and outer recesses of the hole, strengthening the network's feature activation of the unique concave ring structure of the grouting hole, thereby effectively distinguishing process holes and grouting holes with similar textures. Secondly, a geometrically prior-constrained circular hole perception detection head (GCH) is designed. Based on traditional rectangular bounding box regression, it explicitly predicts the center coordinates and radius of the hole and introduces Circular IoU loss and circle-rectangle consistency constraints, integrating the circular geometric prior of the hole into the network training to achieve co-optimization of position and shape. The solution provided in this embodiment can significantly improve the detection accuracy and classification accuracy of micro-pores in complex concrete backgrounds, effectively solve the problems of missed detection and misjudgment, and is suitable for automated quality inspection of precast components.

[0093] Based on the same inventive concept, this embodiment also provides an exterior wall hole detection system based on circular hole geometry and annular texture enhancement. This system is used to execute the exterior wall hole detection method based on circular hole geometry and annular texture enhancement provided in any of the above embodiments, including: The annotation unit is configured to obtain the annotation dataset of prefabricated exterior wall openings; The model building unit is configured to use YOLOv11 as a baseline model and improve upon it to build a hole detection model. The training and prediction unit is configured to train the hole detection model using the labeled dataset, input the image to be detected into the trained hole detection model, and obtain the hole detection result. The improvements to YOLOv11 include: designing a circular parameter prediction branch and geometric consistency loss in the decoupled detection head to explicitly predict the center coordinates and radius of the target hole; and designing a ring texture enhancement module RT-C3k2 in the shallow feature extraction part of the YOLOv11 network to simulate the response difference between the hole center and the outer ring pit through separable convolutions with different receptive fields.

[0094] The external wall hole detection system based on circular hole geometry and annular texture enhancement provided in this embodiment can realize the process and steps of the external wall hole detection method based on circular hole geometry and annular texture enhancement provided in any of the above embodiments, and achieve the same technical effect, which will not be described in detail here.

[0095] This embodiment also provides an electronic device (computer device), including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method provided in any of the above embodiments.

[0096] This embodiment also provides a computer-readable storage medium storing a computer program / instructions thereon, which, when executed by a processor, implements the steps of the method provided in any of the above embodiments.

[0097] This embodiment also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the method provided in any of the above embodiments.

[0098] The embodiments of this application can be applied to Figure 7 The electronic devices shown can be edge devices deployed at the edge or devices deployed in the cloud. The types of electronic devices include: mobile terminals such as mobile phones, tablets, handheld computers, and personal digital assistants (PDAs); smart home devices such as smart TVs and smart cameras; wearable devices such as smart bracelets, smartwatches, and smart glasses; or other computer devices such as desktop, laptop, notebook, ultra-mobile personal computer (UMPC), netbook, and smart screen.

[0099] like Figure 7 As shown, the electronic device 200 may include one or more of the following components: a processor 201, a memory 203, a communication interface 202, and a communication bus 204. The memory 203 can be connected to the processor 201 via the bus 204. The bus can transfer data between the processor 201 and the memory 203. The bus can be divided into an address bus, a data bus, a control bus, etc.

[0100] Processor 201 may include one or more processing cores. Processor 201 can connect to various parts within the electronic device 200 using various interfaces and lines. It performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory 203, and by calling data stored in memory 203. For example, processor 201 may include an application processor (AP), a modem processor, a CPU, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a field-programmable gate array (FPGA), a programmable logic array (PLA), and / or a neural network processing unit (NPU). The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content to be displayed; the NPU implements artificial intelligence (AI) functions; and the modem handles wireless communication. Different processing units can be independent devices or integrated into one or more processors. For example, the multiple processing units shown above are all integrated into a single SoC, or the AP is a separate semiconductor chip, while other processing units are integrated into a single SoC. This application does not limit this to any particular type.

[0101] The memory 203 may include random access memory (RAM), read-only memory (ROM), or non-transitory computer-readable storage medium. The memory 203 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 203 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system or instructions for at least one function, such as a method for detecting external wall holes based on circular hole geometry and ring texture enhancement. The data storage area may store data created based on the use of the electronic device 200, such as a labeled dataset of prefabricated external wall holes, output feature maps of the model, etc.

[0102] In addition, those skilled in the art will understand that the structure of the electronic device 200 shown in the above figures does not constitute a limitation on the electronic device 200. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements. For example, the electronic device 200 may also include components such as a microphone, speaker, radio frequency circuit, sensor, audio circuit, power supply, and Bluetooth module, which will not be described in detail here.

[0103] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for detecting external wall holes based on circular hole geometry and annular texture enhancement, characterized in that, include: Obtain the labeled dataset of holes in the precast exterior wall; A hole detection model was constructed using YOLOv11 as a baseline model and improved upon it. The hole detection model is trained using the labeled dataset. The image to be detected is input into the trained hole detection model to obtain the hole detection result. Among them, the improvements of the hole detection model to YOLOv11 include: designing a circular hole sensing detection head in the decoupled detection head, including a circular parameter prediction branch and geometric consistency loss, to incorporate the prior circular structure of the pre-made hole into the network learning process, and to explicitly predict the center coordinates and radius of the target hole; and designing a ring texture enhancement module RT-C3k2 in the shallow feature extraction part of the YOLOv11 network, which simulates the response difference between the hole center and the outer ring pit through separable convolutions with different receptive fields.

2. The method according to claim 1, characterized in that, The circular aperture sensing detection head forms an independent branch, which is executed in parallel with the existing bounding box regression branch and category prediction branch of the YOLOv11 network. The three branches share the same backbone features, but each uses an independent lightweight convolutional layer for feature mapping.

3. The method according to claim 1, characterized in that, The circular parameter prediction branch includes several lightweight convolutional layers, each of which includes sequentially connected 3×3 convolutions, batch normalization, and linear units; The output of the circular parameter prediction branch is a three-dimensional tensor, denoted as: ,in, They are the centers of the circles. , coordinate, It is the radius.

4. The method according to claim 1, characterized in that, The geometric consistency loss includes: circular IoU loss; The circular IoU loss is obtained by the following steps: first, calculate the distance between the center of the prediction circle and the truth circle, determine the relative position of the two circles based on the distance, find the intersection of the two circles, calculate the circular IoU according to the definition of intersection-union ratio, and then calculate the circular IoU loss.

5. The method according to claim 4, characterized in that, The geometric consistency loss also includes: a circular-rectangular consistency constraint, which further includes a center consistency constraint and an inclusion constraint. The calculation steps for the center consistency constraint are as follows: First, obtain the center, width, and height of the predicted rectangle and the center of the predicted circle. Then, calculate the L2 distance between the center of the predicted rectangle and the center of the predicted circle as the center consistency constraint. The inclusion constraint is used to determine whether the center of the circle is inside the predicted rectangle; Multiply the inclusion constraint by the corresponding weight, and then add it to the center consistency constraint to obtain the circle-rectangle consistency constraint.

6. The method according to claim 1, characterized in that, The ring texture enhancement module includes a main branch and a ring texture branch. The main branch maintains the same structure as the existing C3k2 module of the YOLOv11 network. The ring texture branch contains two sets of depthwise separable convolutions with different dilation rates, which are used to extract inner ring features and outer ring features to obtain the feature map of the ring texture branch. The main branch and the circular texture branch perform feature extraction in parallel, and output their respective feature maps.

7. The method according to claim 6, characterized in that, The inner circle features and outer ring features correspond to the outputs of depth-separable convolutions with the first dilation rate and the second dilation rate, respectively, and the first dilation rate is less than the second dilation rate. After obtaining the feature map of the annular texture branch, the process also includes: normalizing the inner ring features and outer ring features to construct the annular response features, as shown in the following expression: , In the formula, It exhibits ring-shaped response characteristics. Features of the outer ring Features of the inner circle For batch normalization, This is the balance coefficient.

8. The method according to claim 7, characterized in that, After constructing the annular response features, the process also includes: building a channel attention mechanism and feature fusion on the annular response features, specifically: Global average pooling is performed on the ring response features to obtain the channel description vector; Two fully connected layers are used to generate channel weights, and the channel weights are used to recalibrate the feature maps output by the backbone branch to obtain the calibrated backbone features. The calibrated backbone features and the annular response features are concatenated along the channel dimension, and then fused and compressed using a 1×1 convolution to obtain the output of the annular texture enhancement module.

9. The method according to any one of claims 1 to 8, characterized in that, When training the hole detection model using the labeled dataset, a phased training strategy is adopted. In the early stage of training, weak supervision is mainly based on bounding box regression loss and circle-rectangle consistency constraints to achieve coarse alignment of circle parameters. In the later stage of training, the weight of circle IoU loss in geometric consistency loss is gradually increased to explicitly strengthen the constraints based on circle geometry.

10. A system for detecting external wall holes based on circular hole geometry and annular texture enhancement, the system being used to perform the steps of the method as described in any one of claims 1 to 9, comprising: The annotation unit is configured to obtain the annotation dataset of prefabricated exterior wall openings; The model building unit is configured to use YOLOv11 as a baseline model and improve upon it to build a hole detection model. The training and prediction unit is configured to train the hole detection model using the labeled dataset, input the image to be detected into the trained hole detection model, and obtain the hole detection result. Among them, the improvements of the hole detection model to YOLOv11 include: designing a circular parameter prediction branch and geometric consistency loss in the decoupled detection head to explicitly predict the center coordinates and radius of the target hole; and designing a ring texture enhancement module RT-C3k2 in the shallow feature extraction part of the YOLOv11 network to simulate the response difference between the hole center and the outer ring pit through separable convolution with different receptive fields.