Rebar binding point detection method based on improved CF-DETR model
By improving the CF-DETR model and introducing a texture suppression feature enhancement module and a geometric structure perception refinement module, the problems of background interference and inaccurate positioning in rebar tying point detection were solved, and high-precision rebar tying point detection was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JINZHONG KEHUI ENGINEERING QUALITY INSPECTION CO LTD
- Filing Date
- 2026-03-06
- Publication Date
- 2026-06-05
AI Technical Summary
Existing rebar tying point detection algorithms suffer from high false detection rates and inaccurate positioning in complex construction sites, especially for small and dense targets.
The texture suppression feature enhancement module (TS-FEM) and the geometric structure awareness refinement module (GSA-RM) are introduced. The multi-branch architecture suppresses background interference, enhances the edge features of the rebar, and uses deformable convolution to extract the cross-shaped geometric structure of the rebar intersection for fine adjustment.
It significantly reduces the false detection rate in complex backgrounds, improves the positioning accuracy and robustness of rebar tying points, achieves sub-pixel-level positioning accuracy, and meets the automated operation requirements of rebar tying robots.
Smart Images

Figure CN122156907A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer vision and artificial intelligence, and in particular to a method for detecting rebar tying points based on an improved CF-DETR model. Background Technology
[0002] Rebar tying is a core process in building construction, and its quality directly affects the load-bearing capacity and overall safety of the building structure. Currently, traditional rebar tying operations mainly rely on manual labor, which suffers from low efficiency, high subjectivity, and worker fatigue. With the accelerating industrialization of the construction industry, rebar tying robots are gradually being applied due to their automation advantages, effectively improving tying efficiency and reducing the risks of manual operation. These robots typically rely on vision systems to identify, mark, and locate untied intersections in the rebar mesh, then transmit the coordinate information to the tying module to complete the task. Therefore, achieving the detection and precise positioning of tying points based on visual recognition technology has become an important research direction in this field.
[0003] However, in actual construction sites, the detection of rebar tying points faces many unique challenges. Rebar tying points typically appear as tiny, densely distributed grids, occupying a very small pixel area in the image, and are often obstructed by upper rebar, construction tools, or personnel. Furthermore, changes in ambient lighting, equipment shadows, and other background clutter further increase the difficulty of detection.
[0004] Currently, algorithms commonly used for rebar tying point detection can be mainly divided into three categories: two-stage object detection algorithms, single-stage object detection algorithms, and Transformer-based detection algorithms. Two-stage algorithms, represented by Fast R-CNN, Faster R-CNN, and Cascade R-CNN, require generating candidate boxes through a region proposal network before classification and regression, often resulting in a trade-off between detection speed and accuracy. Single-stage algorithms, such as the YOLO series, SSD, and RetinaNet, can complete detection in a single forward propagation, offering speed advantages, but their detection accuracy is often lower than that of two-stage methods. Transformer-based detection models, such as DETR and its variants, while achieving end-to-end detection through global attention mechanisms, still suffer from inaccurate target geometric center capture and drifting in localization, particularly in small target detection and multi-scale feature modeling.
[0005] When facing complex construction sites, existing detection algorithms generally suffer from the following two limitations: First, the background of construction sites is often cluttered, including intersecting rebar networks, equipment shadows, and other obstructions, which can easily lead to misdetecting non-tying points as targets. Second, rebar tying points are characterized by their small size and dense distribution. Traditional algorithms, limited by a fixed receptive field, struggle to accurately capture their geometric center position in dense scenes, resulting in location coordinate drift. Therefore, it is necessary to specifically improve existing detection models to address the characteristics of rebar tying point detection tasks, thereby enhancing their detection accuracy and robustness in complex environments. Summary of the Invention
[0006] The purpose of this invention is to provide a rebar tying point detection method based on an improved CF-DETR model. By improving the CF-DETR model, a texture suppression feature enhancement module and a geometric structure perception refinement mechanism are introduced, which effectively suppresses background interference at the construction site and improves the positioning accuracy of rebar tying points. This solves the problems of low detection accuracy and positioning drift caused by small targets, dense distribution, and complex environment.
[0007] To address the aforementioned technical problems, a first aspect of this invention provides a method for detecting rebar tying points based on an improved CF-DETR model, comprising the following steps: Acquire a digital image containing several rebar tying points to be identified in the rebar network; Based on the improved CF-DETR model, the digital image is processed to detect and locate the rebar tying points, and the coordinate data of the rebar tying points are obtained. The improved CF-DETR model includes a backbone network, a texture suppression enhancement module, a Transformer encoder, a multi-scale feature fusion module, and a decoder connected in sequence. The input of the multi-scale feature fusion module is also connected to the output of the backbone network. The decoder includes multiple cascaded decoding layers. Each decoding layer includes a coarse layer and a fine layer. The coarse layer is used to generate initial candidate regions, and the fine layer is used to perform geometrically aware fine-tuning and localization of the initial candidate regions.
[0008] Furthermore, the step of detecting and locating rebar tying points in the digital image based on the improved CF-DETR model to obtain the coordinate data of the rebar tying points includes: Based on the backbone network, basic features are extracted from the digital image to obtain basic features; Based on the texture suppression feature enhancement module, the basic features are subjected to texture suppression and structural enhancement processing to obtain enhanced features; Based on the Transformer encoder, global context modeling is performed on the enhanced features to obtain encoded features; The encoded features are processed by multi-scale feature fusion based on the multi-scale feature fusion module to obtain multi-scale fused features. Based on the decoder, the multi-scale fusion features are detected and located, and the coordinate data of the rebar binding points are output.
[0009] Further, the step of performing detection and localization processing on the multi-scale fused features based on the decoder to output the coordinate data of the rebar binding point includes: Based on the coarse layer of the decoding layer, the multi-scale fusion features are initially localized to generate the initial candidate region of the rebar binding point. Based on the geometric structure perception and refinement module in the fine layer of the decoding layer, the initial candidate region is subjected to geometric structure perception and refinement positioning processing, and the precise coordinate data of the rebar binding point is output.
[0010] Furthermore, the geometrically structure-aware fine-tuning localization process for the initial candidate region includes: Extract image features from the initial candidate regions; Based on the deformable convolution in the geometric structure perception and refinement module, cross-shaped geometric structure features corresponding to the intersection of steel bars are extracted from the image features. Based on the cross-shaped geometric structure features, the initial candidate region is finely adjusted.
[0011] Furthermore, the extraction of cross-shaped geometric structure features corresponding to the intersection points of the reinforcing bars from the image features based on the deformable convolution in the geometric structure perception refinement module includes: Deformable convolution is applied to the image features in both the horizontal and vertical directions to extract structural information in orthogonal directions.
[0012] Furthermore, the refinement of the initial candidate region based on the cross-shaped geometric structure features includes: The object query vector is mapped to the query vector in the attention mechanism, and the cross-shaped geometric structure features are mapped to the key vector and value vector in the attention mechanism; Cross-attention calculation is performed based on the query vector, key vector, and value vector, so that the object query vector interacts with the cross-shaped geometric structure features to obtain a feature representation focused on the central region of the cross. Based on the feature representation, the center coordinates and bounding box size of the initial candidate region are corrected to obtain accurate coordinate data.
[0013] Further, the extraction of image features from the initial candidate region includes: Adaptive scale fusion is performed on the multi-scale region features corresponding to the initial candidate region to obtain the fused region features; Based on the fused regional features, the image features are extracted.
[0014] Furthermore, the texture suppression feature enhancement module includes a high-frequency texture suppression branch, a low-frequency structure enhancement branch, and a global context modeling branch that are configured in parallel; The high-frequency texture suppression branch is used to calculate the gradient magnitude of the input features and generate an edge attention map to enhance high-frequency edge features; The low-frequency structure enhancement branch is used to capture macroscopic structural features through downsampling and upsampling operations; The global context modeling branch is used to recalibrate the input features channel by channel through a channel attention mechanism; The outputs of the high-frequency texture suppression branch, the low-frequency structure enhancement branch, and the global context modeling branch are concatenated and fused in the channel dimension, and then added to the module input through residual connection to obtain the enhanced feature.
[0015] Furthermore, the high-frequency texture suppression branch calculates the gradient magnitude using the Sobel operator.
[0016] Further, the step of performing multi-scale feature fusion processing on the encoded features based on the multi-scale feature fusion module to obtain multi-scale fused features includes: The encoded features are considered as high-level semantic features; Obtain low-level high-resolution features extracted from the backbone network; The high-level semantic features are fused with the low-level high-resolution features across scales to enhance the semantic information of the low-level high-resolution features. Based on the fused features, the multi-scale fused features are generated.
[0017] Accordingly, a second aspect of the present invention provides a rebar tying point detection system based on an improved CF-DETR model, which detects rebar tying points using the aforementioned rebar tying point detection method based on the improved CF-DETR model, including: The image acquisition module is used to acquire digital images containing several rebar tying points to be identified in the rebar network; The coordinate calculation module is used to detect and locate the rebar tying points in the digital image based on the improved CF-DETR model, and obtain the coordinate data of the rebar tying points. The improved CF-DETR model includes a backbone network, a texture suppression enhancement module, a Transformer encoder, a multi-scale feature fusion module, and a decoder connected in sequence. The input of the multi-scale feature fusion module is also connected to the output of the backbone network. The decoder includes multiple cascaded decoding layers. Each decoding layer includes a coarse layer and a fine layer. The coarse layer is used to generate initial candidate regions, and the fine layer is used to perform geometrically aware fine-tuning and localization of the initial candidate regions.
[0018] Accordingly, a third aspect of the present invention provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the above-described rebar tying point detection method based on the improved CF-DETR model.
[0019] Accordingly, a fourth aspect of the present invention provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the above-described method for detecting rebar tying points based on the improved CF-DETR model.
[0020] The above-described technical solutions of the embodiments of the present invention have the following beneficial technical effects: 1. By introducing the Texture Suppression Feature Enhancement Module (TS-FEM), which adopts a parallel multi-branch architecture and combines gradient magnitude calculation, downsampling-upsampling structure enhancement and channel attention mechanism, redundant texture interference such as templates, scaffolding and shadows in construction site images is effectively suppressed, and the edge and structural feature expression of steel reinforcement targets is significantly enhanced. This greatly reduces the false detection rate caused by complex backgrounds and improves the robustness and environmental adaptability of the detection system. 2. By designing a fine-tuning localization mechanism with geometric structure awareness, deformable convolution is used in the fine layer of the decoder to extract the cross-shaped geometric features of the steel bar intersections, and this is used to guide the attention mechanism for fine-tuning. This enables the model to explicitly perceive and focus on the central structure of the binding point, fundamentally improving the localization coordinate drift problem caused by the small size and dense distribution of the target, and achieving sub-pixel level localization accuracy. 3. By constructing a complete model architecture that includes texture suppression, global encoding, multi-scale fusion, and two-stage decoding, end-to-end optimization from feature preprocessing and semantic enhancement to localization refinement is achieved while keeping the model parameter increment to a minimum. This enables the model to balance detection accuracy, localization accuracy, and computational efficiency when dealing with the specific task of rebar tying points, providing reliable technical support for the real-time automated operation of rebar tying robots. Attached Figure Description
[0021] Figure 1 This is a schematic diagram of the existing CF-DETR model structure; Figure 2 This is a flowchart of the rebar tying point detection method based on the improved CF-DETR model provided in this embodiment of the invention; Figure 3 This is a schematic diagram of the improved CF-DETR model structure provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the TS-FEM module structure provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the GSA-RM module structure provided in an embodiment of the present invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments and the accompanying drawings. It should be understood that these descriptions are merely exemplary and not intended to limit the scope of the invention. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.
[0023] The Coarse-to-Fine Transformers for End-to-End Object Detection (CF-DETR) model is an end-to-end object detection model based on Transformers. Existing CF-DETR models follow the DETR's "encoder-decoder" architecture but introduce two novel modules: the Transformer Enhanced FPN module (TEF) and the Coarse-to-Fine Decoder layer (CF). Features from the Transformer encoder and TEF modules are used as input to the CF decoding layer; that is, features extracted by the Transformer encoder and TEF modules are fed into the cascaded CF decoder layer. Each CF decoding layer contains a coarse block and a fine block. The coarse block follows the traditional Transformer decoding layer structure. The fine block utilizes multi-scale Region of Interest (RoI) features and refines the coarse bounding boxes generated by the coarse block through an Adaptive Scale Fusion (ASF) module and a Local Cross-Attention (LCA) module. Each decoder layer improves detection accuracy through steps of extracting global features in the coarse block and refining local features in the fine block. The algorithm model structure is as follows: Figure 1 As shown.
[0024] The backbone network of the CF-DETR algorithm is used for feature extraction. CF-DETR typically uses the classic ResNet network as its backbone, extracting feature maps at three different resolution stages (denoted as C3, C4, and C5), where C5 has the strongest semantics but the lowest spatial resolution. The basic features of the rebar image extracted by the backbone network are input into the Transformer-enhanced TEF module to extract rich multi-scale features. The features from the TEF module are input into the coarse layer (Coarseblock) of the decoder. This module uses self-attention and cross-attention mechanisms to extract coarse features related to the object from the global feature map, quickly identifying and outputting candidate regions (Coarse Boxes) containing rebar tying points. The candidate region features output from the coarse localization stage are input into the fine layer (Fineblock) of the decoder. Inside the fine block, the attention is first focused on the coarse candidate regions through the Local Cross-Attention (LCA) module, using local information for fine analysis. Within the finer layers, the adaptive scale fusion (ASF) module first guides the multi-scale local features extracted from the TEF feature map via ROI Align through adaptive weighted fusion, guided by the target query features, to fully integrate spatial and semantic information at different scale levels. Subsequently, the fused features are input into the Local Cross-Attention (LCA) module, which refines and enhances the query features by establishing a spatially aware cross-attention interaction between the target query features and local RoI features. Finally, the refined target query features are passed through a three-layer MLP regression head to output high-precision bounding box predictions. However, if the aforementioned CF-DETR algorithm is directly applied to rebar tying point detection, the following problems exist: First, the feature extraction lacks specificity: redundant texture information such as formwork, scaffolding, and shadows in the construction site background are mixed with rebar features, making it difficult for the original backbone network to effectively distinguish them, resulting in a low signal-to-noise ratio for feature extraction; second, geometric structure perception is lacking: rebar tying points are essentially "cross-shaped" structures formed by rebar intersections, and the original LCA module only relies on local feature interactions, failing to fully utilize this geometric prior information, leading to center drift during localization; third, the ability to capture small target features is limited: tying point targets are small, and feature information is scarce, making it difficult for existing feature fusion mechanisms to aggregate sufficient effective features, affecting detection accuracy. To solve these problems, this invention proposes a rebar tying point detection method based on an improved CF-DETR model. Please refer to Figure 2 and Figure 3 The first aspect of this invention provides a method for detecting rebar tying points based on an improved CF-DETR model, comprising the following steps: Step S100: Obtain a digital image containing several rebar tying points to be identified in the rebar network.
[0025] In practice, digital images of the rebar mesh at the construction site are typically acquired using industrial cameras deployed on rebar tying robots or fixed monitoring points. Due to the complexity of the actual construction environment, image acquisition must consider various working conditions: rebar specifications (e.g., diameter 6mm to 12mm), localized occlusion caused by mesh layer overlap, light and shadow variations under natural and auxiliary lighting, and potential dust interference. To construct a representative dataset, the camera height (e.g., 100-500mm from the rebar mesh surface), tilt angle (30° to 90°), and coverage of different lighting conditions must be systematically adjusted during the acquisition phase to ensure the subsequent model can adapt to the diversity of real-world scenarios. Images that are partially blurred or severely occluded must be manually filtered and removed to ensure the quality of the input data. Furthermore, to further improve the model's generalization ability, data augmentation processing can be performed on the original images before training. This includes random horizontal flipping, rotation, adding Gaussian or salt-and-pepper noise to simulate dust, and adjusting hue, saturation, and brightness. This effectively expands the training samples and simulates a wider range of on-site variations without increasing the actual acquisition cost.
[0026] Step S200: Based on the improved CF-DETR model, the digital image is processed to detect and locate the rebar tying points, and the coordinate data of the rebar tying points are obtained.
[0027] The improved CF-DETR model comprises a backbone network, a texture suppression enhancement module, a Transformer encoder, a multi-scale feature fusion module, and a decoder connected in sequence. The input of the multi-scale feature fusion module is also connected to the output of the backbone network. The decoder includes multiple cascaded decoding layers, each consisting of a coarse layer and a fine layer. The coarse layer generates initial candidate regions, while the fine layer performs geometrically aware fine-tuning of the initial candidate regions. The aforementioned detection process is implemented through a systematic multi-stage processing pipeline. Processing begins with the backbone network, which acts as a feature extractor, performing convolution operations on the input digital image to output a set of basic feature maps with different spatial resolutions and semantic levels, providing a multi-scale visual foundation for subsequent processing. Subsequently, the basic feature maps are input to the texture suppression and feature enhancement module. This module preprocesses the received features, suppressing background texture interference unrelated to the rebar binding points, while enhancing edge and structural features related to the rebar skeleton and intersections, thereby improving the quality and specificity of feature representation in subsequent steps. The enhanced features are then processed by the Transformer encoder, which models the long-range dependencies between all locations in the feature map through its built-in self-attention mechanism, thereby integrating global contextual information and generating encoded features rich in scene semantics. Next, the multi-scale feature fusion module integrates high-level semantic features from the encoder with low-level detail features from the backbone network. Through cross-scale fusion operations, a set of multi-scale fused features with rich semantics and accurate spatial information is constructed, laying the foundation for accurate target localization. Finally, the decoder performs detection and localization tasks based on the aforementioned multi-scale fusion features. Internally, through an attention-driven mechanism, it transforms the feature mapping into spatial location predictions for the rebar tying points and outputs the final coordinate data. The entire process constitutes an end-to-end optimization framework, enabling the mapping from the original image to the target coordinates to be completed through a single forward propagation.
[0028] The improved CF-DETR model, based on CF-DETR, incorporates a Texture Suppression Feature Enhancement Module (TS-FEM) before entering the Transformer encoder. This module suppresses redundant texture interference from the construction site through a multi-branch feature fusion mechanism, enhancing the edge and structural features of the rebar skeleton. Furthermore, a Geometric Structure Awareness Refinement Module (GSA-RM) is proposed to replace the original Local Cross Attention (LCA) module, strengthening the perception of the "cross-shaped" geometric structure at rebar intersections and improving the accuracy of tying point center positioning. The improved algorithm model structure is as follows: Figure 3 As shown in the figure. Experimental results show that the improved algorithm has higher detection accuracy in the rebar tying point detection scenario, effectively solving the core problems of redundant texture interference and inaccurate positioning of the geometric center of the tying point. The design principles and implementation details of each module are explained in detail below.
[0029] 1. Texture Suppression Feature Enhancement Module (TS-FEM) like Figure 4As shown, in complex construction site environments, the image background contains a large amount of redundant texture information such as templates, scaffolding, and shadows, which affects the extraction of key structural features. To address this issue, this paper proposes that after the acquired rebar images are input into the backbone network to extract basic features, a Texture Suppression-Feature Enhancement Module (TS-FEM) is introduced before entering the Transformer encoder. This module utilizes the linear edge characteristics of the rebar and suppresses flat texture regions on non-edges by calculating the gradient magnitude of the feature map, thereby enhancing the high-frequency features of the rebar skeleton. Subsequently, the image enters the multi-scale feature fusion module, which uses the high-level non-local foreground information (E5) output by the encoder to enhance the low-level features, generating semantically rich multi-scale features. The TS-FEM module uses feature maps. As input, a parallel three-branch architecture is used to capture and optimize feature representations at different scales respectively.
[0030] (1) The high-frequency texture suppression branch focuses on highlighting edge details: the gradient magnitude of the input features is calculated using the Sobel operator, followed by successive convolution processing and 1×1 convolution to generate an edge attention map, and then compared with the original input. F Element-wise multiplication is performed to enhance high-frequency edge features while suppressing flat texture regions. .
[0031] (2) The low-frequency structure enhancement branch aims to capture macroscopic structural information: This branch first performs downsampling through average pooling to expand the receptive field. After convolutional feature extraction, it uses bilinear interpolation upsampling to restore the spatial resolution and obtain low-frequency structural features. .
[0032] (3) The global context modeling branch uses a channel attention mechanism to capture global semantics: it compresses the spatial dimension through global average pooling and uses a multilayer perceptron (MLP) with sigmoid activation to generate channel weights for the input. F Perform channel-wise multiply recalibration to obtain global contextual features. .
[0033] (4) Output characteristics from the three branches , and The features are concatenated along the channel dimension and then fused and reduced in dimensionality using a 1×1 convolutional layer. The fused features are then processed through a residual structure and combined with the original input. FThe features are added together to generate the final enhanced output features. .
[0034] 2. A geometry-aware precision refinement module (GSA-RM) is introduced at the precision calibration level. like Figure 5 As shown, to significantly improve the feature representation capability of Regions of Interest (ROIs), this invention proposes a Geometry-aware Structural Refinement Module (GSA-RM), which inputs the candidate region features output from the coarse localization stage into the fine block of the decoder. Within the fine block, an Adaptive Scale Fusion (ASF) module, guided by the target query features, adaptively weights and fuses the multi-scale local features of the initial candidate regions extracted from the multi-scale fusion features. This fully integrates spatial and semantic information at different scale levels, providing high-quality fused features for subsequent geometry-aware processing. Subsequently, the fused features are input into the Geometry-aware Structural Refinement Module (GSA-RM) for refinement. This module replaces the Local Cross Attention (LCA) module in the original fine block. Based on the extracted ROI features, it applies two orthogonal directions (horizontal and vertical) of deformable convolutions to specifically extract "cross-shaped" features and locally interacts the object query with these "cross-shaped" structural features, ensuring the model focuses on the center point of the cross structure. The Geometric Structure Aware Refinement (GSA-RM) module employs a multi-branch parallel architecture. ROI features first enter the geometric prior generation unit within the GSA module. This unit captures potential geometric structure cues through parallel anisotropic deformable convolutional branches, generating "geometric prior features." Subsequently, these prior features are combined with the object query vector, which serves as the external input. q They enter the geometric perception cross-attention unit together. At this stage, the object query vector... q Serving as instance-level semantic anchors, these features are mapped to query vectors within the attention mechanism, while geometric prior features are mapped to key and value vectors. This design allows object queries to interact deeply with local ROI features under the explicit guidance of geometric priors, focusing on the "cross-shaped" central region formed by intersecting rebars, thereby achieving precise adjustment of the geometric location and structural representation of potential tying points. Finally, the attention-enhanced features are fed into a "local structure enhancement module" with residual connections, where further nonlinear mapping refines the local features, resulting in high-precision output features that significantly improve the model's ability to perceive rebar tying points.
[0035] Further, in step S200, based on the improved CF-DETR model, the digital image is processed to detect and locate the rebar tying points, obtaining the coordinate data of the rebar tying points, including: Step S210: Extract basic features from the digital image based on the backbone network to obtain basic features.
[0036] In the specific implementation process, the acquired images of rebar at the construction site are first input into the backbone network, which serves as the basis for model feature extraction. This backbone network is typically a deep convolutional neural network, which performs layered and progressive abstraction of the input image through a series of convolution and pooling operations. In the specific application scenario of rebar tying point detection, the backbone network extracts basic visual features that can characterize the image content from the raw pixel data, which may contain complex backgrounds (such as templates, scaffolding, tools, shadows, and uneven lighting). These features are formed at different network depths, manifesting as feature maps at multiple resolution scales. Shallow feature maps have higher spatial resolution and contain rich details such as edges and corners, which helps to perceive the direction of the rebar lines; while deep feature maps have stronger semantic information and a larger receptive field, which helps to understand the overall layout and contextual relationships of the rebar network.
[0037] Step S220: Based on the texture suppression feature enhancement module, perform texture suppression and structure enhancement processing on the basic features to obtain enhanced features.
[0038] By performing targeted preprocessing on the basic features extracted from the backbone network, this approach adapts to the specific needs of rebar tying point detection. In construction site images, background textures unrelated to the tying points (such as wooden formwork textures, metallic reflections, and cluttered shadows) constitute strong interference noise. A texture suppression and feature enhancement module addresses this issue by receiving multi-scale basic features from the backbone network and performing feature-level filtering and enhancement operations. This module suppresses feature responses corresponding to flat or cluttered background areas in the feature map, while enhancing feature responses related to the linear edges and intersections of the rebar. Through this processing, the signal-to-noise ratio of the feature map is improved, the structural clues of the rebar become more prominent, and background interference is effectively suppressed, thus creating more favorable conditions for subsequent accurate identification and localization.
[0039] Step S230: Perform global context modeling on the enhanced features based on the Transformer encoder to obtain the encoded features.
[0040] Features, after local texture suppression and enhancement, are input into the Transformer encoder to establish global semantic relationships. In dense rebar mesh scenes, the existence and precise location of a binding point depend not only on its local appearance but also on the orientation of surrounding rebars, their intersection relationships, and even the overall mesh layout. The Transformer encoder, through its core self-attention mechanism, can compute the interrelationships between all spatial locations in the feature map. In this process, the model can learn, for example, the relative positional patterns of a rebar intersection within the global mesh, or distinguish between "pseudo-intersections" caused by occlusion and true binding points. By performing this global contextual modeling on the entire feature map, the encoder's output features contain long-distance dependency information, ensuring that each feature incorporates the semantics of the global perspective, significantly improving the model's ability to understand dense, structured scenes.
[0041] Step S240: Perform multi-scale feature fusion processing on the encoded features based on the multi-scale feature fusion module to obtain multi-scale fused features.
[0042] To simultaneously meet the dual requirements of object detection tasks for semantic information (for category identification) and spatial details (for precise localization), this step introduces multi-scale feature fusion processing. This process uses the encoded features output by the Transformer encoder, which are rich in global semantics but have low spatial resolution, as high-level input. Simultaneously, low-level features extracted from the backbone network, which are rich in spatial details but have weak semantics, also participate in the fusion. The multi-scale feature fusion module uses a structure combining top-down and lateral connections to transfer and fuse strong semantic information from high-level layers into high-resolution features from lower layers. The resulting multi-scale fused features are a set of new feature maps with different scales, where each layer possesses both good semantic representativeness and appropriate spatial resolution. This provides ideal feature input for the next step, enabling the decoder to accurately detect tiny and densely distributed rebar tying points at different scales.
[0043] Step S250: Based on the decoder, the multi-scale fusion features are detected and located, and the coordinate data of the rebar binding points are output.
[0044] The decoder uses the multi-scale fusion features generated in the preceding steps as its foundation and employs a query-based detection mechanism. It interacts with the multi-scale fusion features through a set of learnable object query vectors. Internally, the decoder uses attention operations to adaptively focus each query vector on the region in the feature map most relevant to the potential binding point. Based on this interaction, the decoder can simultaneously predict a series of bounding boxes and their corresponding class confidence scores. When processing rebar binding point detection, the decoder is trained to map each valid query output to a binding point location. Its output directly includes the coordinate information of each detected binding point in the image (usually represented by the coordinates of the bounding box center point), thus completing an end-to-end mapping from image to spatial coordinate data and providing a direct execution basis for subsequent robotic binding actions.
[0045] This invention presents an improved solution for rebar tying point detection by constructing a coherent processing flow from feature extraction, texture suppression, global context modeling, multi-scale fusion to final detection and localization. This solution systematically addresses the core challenges of complex construction site environments and densely packed, small targets. The collaboration between the backbone network and the texture suppression module significantly enhances the model's ability to capture key structural features of rebar in cluttered backgrounds, reducing the impact of background interference. The introduction of the Transformer encoder empowers the model to understand the global layout and relationships of the rebar mesh, facilitating more accurate judgments in dense scenes. The multi-scale feature fusion mechanism ensures that the features used for detection retain rich semantics and precise details, providing a guarantee for the localization of small targets. Finally, an attention-based decoder achieves efficient and parallel target localization. While improving the accuracy of rebar tying point detection and localization, this solution maintains the integrity of the model structure and the efficiency of end-to-end processing.
[0046] Further, in step S250, the multi-scale fusion features are detected and located based on the decoder, and the coordinate data of the rebar binding points are output, including: Step S251: Based on the coarse layer in the decoding layer, perform initial localization processing on the multi-scale fusion features to generate initial candidate regions for rebar tying points.
[0047] The coarse layer receives multi-scale fused features from the preceding steps as input. In the specific application scenario of rebar tying point detection, due to the small size of the tying point targets and their high-density grid distribution in the image, direct pixel-level precise localization computation is costly and susceptible to noise interference. Therefore, the coarse layer is used to perform efficient initial screening. Based on the standard architecture of the Transformer decoder, it interacts globally with the multi-scale fused features through a set of learnable object queries. This mechanism allows each query vector to adaptively focus on regions in the feature map that may contain the target. After multiple layers of such interactions and transformations, the coarse layer can output a series of preliminary prediction results in parallel, namely initial candidate regions (usually represented as bounding boxes). These candidate regions cover all possible locations of tying points in the image, but the position and size of the boxes are not yet precise enough. While ensuring a high recall rate, it provides a reliable set of regions to be processed in a focused manner for subsequent refinement steps, thereby avoiding indiscriminate fine-tuning computation across the entire image.
[0048] Step S252: Based on the geometric structure perception and refinement module in the decoding layer, the initial candidate region is subjected to geometric structure perception and refinement positioning processing, and the precise coordinate data of the rebar binding points are output.
[0049] By refining the initial candidate regions provided by the coarse layer, the coordinate accuracy required for the robot's binding operation is obtained. The geometric structure perception and refinement module is a processing stage specifically designed for the "cross-shaped" geometric characteristics of rebar binding points, using the initial candidate regions generated in the previous stage as the processing object. The fine layer perceives and utilizes the inherent geometric structure prior knowledge of the rebar intersections. In specific operations, it focuses on the features within each initial candidate region, analyzing and evaluating whether the features of the region conform to the morphological pattern of the rebar intersection through a specific structural perception mechanism. Based on this geometric structure perception, the fine layer can determine whether the center of the initial candidate box is accurately aligned with the intersection point and calculate subtle positional offsets and dimensional errors. Subsequently, the fine layer performs frame-by-frame adaptive compensation and correction for these deviations, adjusting the coarse candidate boxes to precisely align with the actual rebar binding points. The refinement process significantly improves the sub-pixel accuracy of the positioning results, and its output is the final, accurate spatial coordinate data of each identified binding point, thereby directly driving the actuator to complete the subsequent automated binding operation.
[0050] By explicitly dividing the localization task of the decoder into two stages—a "coarse layer" and a "geometric structure perception refinement module"—a progressive localization strategy from coarse to fine is constructed. The coarse layer utilizes a global attention mechanism to achieve efficient and parallel initial discovery of dense small targets, ensuring a high target recall rate and laying a solid foundation for the entire detection process. Subsequently, the geometric structure perception refinement module focuses on in-depth analysis of a limited candidate region. By explicitly utilizing the inherent cross-shaped geometric prior knowledge of the binding points, it achieves micron-level calibration of the initial localization results, fundamentally solving the problem of localization center drift caused by the small size and weak features of the targets. This two-stage localization architecture achieves accuracy far exceeding that of single-stage localization methods while ensuring processing efficiency. This ensures that the coordinate data output by the model can effectively meet the stringent accuracy requirements of the rebar binding robot, effectively supporting the reliable operation of automated construction.
[0051] Furthermore, the geometrically-aware fine-tuning localization process for the initial candidate region in step S252 includes: Step S2521: Extract image features of the initial candidate region.
[0052] In practice, the initial candidate regions (usually represented as bounding boxes) output from the coarse layer are used as input guides to extract local feature blocks corresponding to the spatial location of each candidate region from the multi-scale fusion feature map generated earlier by the model. Since the rebar tying points are tiny and initial positioning may have errors, the extracted feature regions need to cover a context slightly larger than the candidate box range to ensure complete cross-shaped structural information is included. In dense rebar mesh scenarios, multiple adjacent candidate regions may correspond to different predictions of the same intersection point or overlap, requiring the feature extraction process to independently and accurately serve the analysis of each candidate region. The extracted image features are the direct input for subsequent geometric structure perception and fine-tuning, and their quality directly depends on the effectiveness of the previous multi-scale feature fusion.
[0053] Step S2522: Based on deformable convolution, extract the cross-shaped geometric structure features corresponding to the intersection of the steel bars from the image features.
[0054] The rebar tying point is essentially a "cross-shaped" structure formed by the orthogonal intersection of two rebars. Standard convolution operations have a fixed, regular sampling grid, which is inefficient for learning such directional local structures. Therefore, deformable convolution is used as a feature extraction tool. Deformable convolution learns additional offset parameters, allowing its kernel sampling points to adaptively adjust their spatial position based on the input content. When processing image features extracted from candidate regions, deformable convolution is guided or trained to distribute its sampling points more along the two main horizontal and vertical directions, thereby more effectively capturing and enhancing the linear response of the corresponding rebar orientation in the feature map and suppressing interfering responses from other directions. In this way, geometric structural features that clearly characterize the "cross-shaped" intersection pattern are extracted from the raw, potentially noisy image features.
[0055] Step S2523: Based on the cross-shaped geometric structure features, the initial candidate region is finely adjusted.
[0056] The geometric features representing the "cross-shaped" pattern extracted in the previous step are used as precise guiding information to fine-tune the parameters of the initial candidate region (i.e., the coarse positioning box), calculating the deviation between the center point of the current initial candidate box and the center point of the cross-shaped structure indicated by the geometric feature. By analyzing the response distribution of the geometric feature, the model can infer a more accurate intersection center position; based on this inference, the center coordinates (x, y) of the initial candidate box are corrected at the sub-pixel level. Simultaneously, the size of the bounding box (width w and height h) may be adaptively scaled according to the apparent width of the rebar reflected by the structural features, making the final output bounding box fit the binding point target more closely. Finally, the center coordinates of each finely adjusted bounding box are output as the precise coordinate data of that rebar binding point. This step directly transforms geometric prior knowledge into correction values for positioning parameters, significantly improving the final positioning accuracy in dense, small target scenes.
[0057] Furthermore, step S2522, which involves extracting cross-shaped geometric structural features corresponding to the intersection of steel bars from image features based on deformable convolution, further includes: applying deformable convolution to process the image features in the horizontal and vertical directions respectively to extract structural information in orthogonal directions.
[0058] In images of rebar mesh at construction sites, the "cross" shape at the tying points is visualized as the superposition of two rebar lines extending approximately horizontally and vertically, respectively. To effectively decouple and enhance these two orthogonal structural cues, a directional processing strategy is employed. Specifically, two independently configured deformable convolutional layers are used, one constrained or optimized to primarily respond to spatial feature variations in the horizontal direction, and the other primarily responding to variations in the vertical direction. When processing input image features, the sampling points of each deformable convolutional layer's kernel can adaptively deviate from the regular grid through learned offset parameters, thus more flexibly aligning and sampling and aggregating features along the target direction (such as the direction of the rebar edges). Through this divide-and-conquer strategy, image features are mapped to two orthogonal feature subspaces. The feature map in one subspace highlights the linear structure, edge gradients, and continuity in the horizontal direction, while the other highlights similar features in the vertical direction. The extracted structural information from these two sets of orthogonal directions together constitutes a decomposed representation of the potential "cross" geometric pattern, providing clear and complementary geometric evidence for subsequent comprehensive judgment of the precise center of the intersection point.
[0059] Furthermore, in step S2523, the initial candidate region is finely adjusted based on the cross-shaped geometric structure features, including: Step S2523a: Map the object query vector to the query vector in the attention mechanism, and map the cross-shaped geometric structure features to the key vector and value vector in the attention mechanism.
[0060] In this specific application scenario, the object query vector is an instance-level semantic representation carried by the decoder when processing each initial candidate region, encoding information about whether the target exists in the candidate region and its coarse state. The cross-shaped geometric structure feature is a low-level visual feature extracted from the preceding step (S2522), representing the orthogonal structure within the region. To effectively fuse these two types of information with different properties, a role allocation strategy is adopted: the high-level, abstract semantic carrier (object query vector) is projected into a query vector in the attention mechanism through a linear transformation, its role being to actively initiate an "inquiry"; simultaneously, the low-level, concrete geometric structure feature (cross-shaped geometric structure feature) is projected into a key vector and a value vector in the attention mechanism through different linear transformations, its role being to provide the queried content and its corresponding information. Through this mapping, semantic queries can perform targeted retrieval and filtering of geometric content in a structured feature space.
[0061] Step S2523b involves performing cross-attention calculation based on the query vector, key vector, and value vector, enabling the object query vector to interact with the cross-shaped geometric structure features to obtain a feature representation focused on the central region of the cross.
[0062] In the scenario of locating rebar tying points, the center of the initial candidate bounding box often has a slight offset from the actual center of the cross-shaped intersection. Based on the query, key, and value vectors generated in the previous step, a standard cross-attention operation is performed; specifically, the similarity between the query vector and all key vectors is calculated to generate an attention weight distribution map. The key characteristic of this weight distribution map is that, since the key vectors originate from geometric features representing orthogonal structures, high weights will naturally concentrate on those local features that best represent the cross-shaped intersection pattern, especially near the central region where the two rebar lines intersect. Subsequently, the value vectors are weighted and summed using this weight distribution. This process allows the object query vector, carrying semantic information, to selectively aggregate information from geometric features based on its degree of matching with local geometric features. Through this interaction, the object query vector is updated into a new feature representation that incorporates specific geometric context information. This feature representation not only preserves the original instance semantics but is also significantly guided and focused on the potential central region of the cross-shaped structure, thus providing a highly concentrated and strongly relevant basis for the next coordinate correction at the feature level.
[0063] Step S2523c: Based on feature representation, the center position coordinates and bounding box size of the initial candidate region are corrected to obtain accurate coordinate data.
[0064] The feature representation obtained in the previous step, enhanced by geometric perception interaction, is decoded into specific corrections to the parameters of the initial candidate region. The feature representation includes information about the deviation between the current predicted location and the ideal geometric center. This step is implemented through a lightweight feedforward network. This network takes the feature representation as input, processes it through several fully connected layers and non-linear activation functions, and regresses to output a set of values. This set of values typically includes four key parameters: fine-tuning offsets (Δx, Δy) for the x-coordinate and y-coordinate of the bounding box center point, and fine-tuning scaling factors (Δw, Δh) for the width w and height h of the bounding box. In practice, the original coordinates (x0, y0, w0, h0) of the initial candidate region are combined with the network-predicted corrections according to a preset rule (such as addition or multiplication) to calculate the final precise coordinates (x0+Δx, y0+Δy, w0). Δw, h 0 (Δh). This correction process is performed independently for each candidate region, and the final output of precise coordinate data constitutes the model's final detection and location results for all rebar tying points in the image.
[0065] By structurally decomposing the fine-tuning steps into three sub-operations—"mapping," "interaction," and "correction"—this invention constructs an end-to-end, learnable, geometry-guided localization fine-tuner. This mechanism creates an efficient closed loop: semantically driven object queries actively retrieve localization cues from explicitly extracted geometry through cross-attention, generating a fused feature that concentrates information about the central region. Finally, a regression network directly transforms this feature into sub-pixel-level coordinate corrections. This process enables the model to reason based on strong geometric priors, rather than simply relying on data-driven appearance feature regression, thus exhibiting strong robustness against initial localization noise, partial occlusion, or complex backgrounds. Ultimately, this mechanism systematically solves the drift problem in the localization of small target centers, stably and accurately calibrating coarse localization results to the true geometric center of rebar intersections, providing highly reliable spatial coordinate input for automated tying operations.
[0066] Further, the extraction of image features of the initial candidate region in step S2521 includes: Step S2521a: Adaptive scale fusion is performed on the multi-scale regional features corresponding to the initial candidate region to obtain the fused regional features.
[0067] In the scenario of rebar tying point detection, the same tying point may appear at different scales in the image due to variations in shooting height, angle, and the thickness of the rebar itself. The initial candidate region is a feature block extracted from the corresponding position in a multi-scale fused feature map. These feature blocks have different scale (resolution) versions, each carrying detailed and semantic information. Directly using features at a single scale may lose key clues: high-resolution features are rich in detail but have high noise and a small receptive field; low-resolution features have clear semantics but coarse localization. The adaptive scale fusion operation dynamically weighs and integrates features from different scales for each candidate region, i.e., it performs adaptive scale fusion on the multi-scale region features corresponding to the initial candidate region. Specifically, this operation learns the contribution weights of features at different scales to the current candidate region and performs weighted fusion, or selectively aggregates them using a more complex spatial / channel attention mechanism. The result is a fused region feature that achieves an optimal balance between spatial detail and semantic discriminative power for the content of the current candidate region.
[0068] Step S2521b: Based on the fused regional features, perform image feature extraction.
[0069] The region features obtained after adaptive scale fusion, while integrating multi-scale information, may still contain redundant information unrelated to locating the center of the "cross" shape, such as residual background texture or interference from adjacent rebars. It is necessary to further extract key image features from this fused feature set to help determine the geometric center of the rebar intersection. This process can be achieved using a lightweight feature extraction network (e.g., composed of a few convolutional layers). This network performs nonlinear transformations and feature mapping on the fused region features, aiming to enhance feature responses related to geometric properties such as rebar edge directionality and intersection continuity, while suppressing irrelevant responses. The final output image features are a more compact and discriminative feature tensor, centrally expressing the visual information most relevant to the location of the binding points within the candidate region. This provides direct and high-quality input for the subsequent geometric analysis step (S2522) specifically targeting the "cross" structure.
[0070] Specifically, the texture suppression feature enhancement module includes a high-frequency texture suppression branch, a low-frequency structure enhancement branch, and a global context modeling branch, all set in parallel.
[0071] The high-frequency texture suppression branch is used to calculate the gradient magnitude of the input features and generate an edge attention map to enhance high-frequency edge features. The high-frequency texture suppression branch focuses on processing high-frequency detail components in the image. It first significantly highlights regions where pixel values change drastically by calculating the gradient magnitude of the input feature map; these regions typically correspond to object edges or contours. Based on the calculated gradient information, the high-frequency texture suppression branch further generates an edge attention map, which indicates which locations in the image belong to structural edges that need enhancement. Subsequently, by performing operations such as element-wise multiplication of this attention map with the original input features, targeted enhancement of high-frequency edge features is achieved, while suppressing flat or cluttered texture responses in non-edge regions.
[0072] The low-frequency structure enhancement branch is used to capture macroscopic structural features through downsampling and upsampling operations. To capture and enhance macroscopic structural information over a larger area of an image, and to expand the receptive field of feature extraction for understanding the overall layout, the low-frequency structure enhancement branch first performs downsampling operations (such as average pooling) on the input feature map to compress its spatial size and aggregate contextual information from a larger region. Subsequently, after necessary feature transformations, upsampling operations (such as bilinear interpolation) are used to restore the feature map to its original spatial resolution. This "downsampling then upsampling" process allows the output features to effectively encode the macroscopic structural information of the input features, aiding in the understanding of large-scale patterns such as the overall arrangement of steel reinforcement meshes.
[0073] The global context modeling branch is used to recalibrate the input features channel-by-channel using a channel attention mechanism. This branch focuses on re-evaluating and calibrating the importance of each feature channel from a global perspective. Typically, it employs a channel attention mechanism, first compressing the feature map of each channel into a scalar using global average pooling to obtain a descriptor representing the global response of each channel. These descriptors are then processed by a lightweight network consisting of fully connected layers and activation functions such as sigmoid, generating a set of channel weights. These weights reflect the relative importance of different feature channels in the current task. Finally, by scaling (multiplying) these weights with the original input features channel-by-channel, the feature channels are recalibrated, increasing the contribution of key channels and suppressing the influence of minor or interfering channels.
[0074] The outputs of the high-frequency texture suppression branch, the low-frequency structure enhancement branch, and the global context modeling branch are concatenated and fused along the channel dimension, and then added to the module input through a residual connection to obtain the enhanced feature. These three branches process the same input features in parallel and output processed feature maps respectively. To integrate complementary information from different branches, the output feature maps of these three branches are concatenated along the channel dimension to form a fused feature containing multi-view information. Subsequently, this concatenated feature is fused and the number of channels is adjusted through operations such as a 1×1 convolutional layer. To preserve the integrity of the original input information and facilitate gradient flow, the final output fused feature is added to the original input feature of the module through a residual connection, thus obtaining the final "enhanced feature" that retains the basic information while undergoing targeted texture suppression and structure enhancement.
[0075] Furthermore, the high-frequency texture suppression branch calculates the gradient magnitude using the Sobel operator.
[0076] In the specific implementation, the high-frequency texture suppression branch calculates the gradient magnitude of the input feature map, which is accomplished using the Sobel operator. The Sobel operator is a widely used discrete differential operator in image processing, primarily for edge detection. It contains two sets of 3x3 convolution kernels, used to calculate the approximate gradients of the image in the horizontal (x-direction) and vertical (y-direction) directions, respectively. When applied to the feature map, the gradient components of each pixel in these two orthogonal directions can be quickly obtained through convolution operations. Subsequently, the gradient magnitude of the pixel is obtained by calculating the square root of the sum of the squares of these two components (or by taking the sum of their absolute values as an approximation). In the context of rebar tie point detection, the linear edges of the rebar cause significant gradient changes in the feature map in that region, resulting in a higher gradient magnitude; while flat or slowly textured areas in the background have lower gradient magnitudes. Therefore, the calculated gradient magnitude map can effectively distinguish between rebar edge regions and non-edge regions, providing a direct, quantifiable basis based on local structural changes for the subsequent generation of the attention map used for enhancement. Using the Sobel operator for computation has the advantages of high computational efficiency and a certain ability to suppress noise, making it suitable for integration into the feature layers of deep learning models that require real-time or high-efficiency processing.
[0077] Further, in step S240, the multi-scale feature fusion module performs multi-scale feature fusion processing on the encoded features to obtain multi-scale fused features, including: Step S241: Treat the encoded features as high-level semantic features.
[0078] Encoded features are the result of initial extraction from the input image via a backbone network, enhancement by a texture suppression module, and then full modeling through a global self-attention mechanism of the Transformer encoder. In the scenario of rebar tying point detection, the encoded features have deeply encoded the overall layout of the rebar network in the image, the long-range dependencies between different regions, and the potential contextual semantic information of the tying points (e.g., the relationship between an intersection and the orientation of surrounding rebars). Because it originates from a deep layer of the network and undergoes global aggregation, this feature has rich semantic information and can effectively determine whether a region belongs to the category of tying points. However, its spatial resolution is relatively low, and its ability to perceive subtle positional changes is limited.
[0079] Step S242: Obtain the low-level high-resolution features extracted from the backbone network.
[0080] Low-level high-resolution features refer to feature maps extracted from shallower layers (e.g., C3 or C4 stages) of the backbone network (such as ResNet). In contrast to high-level semantic features, these features originate from the network's early convolutional layers, preserving finer spatial details and higher resolution in the input image. In construction site images, the edges, textures, and minute intersections of rebar are clearly represented in these feature maps. Obtaining these features prepares the ground for the next step of fusion, complementing the high-precision spatial information with the rich semantics of the high-level features.
[0081] Step S243: Cross-scale fusion of high-level semantic features and low-level high-resolution features to enhance the semantic information of the low-level high-resolution features.
[0082] The specific fusion process is typically implemented using a feature pyramid network-like structure. First, high-level semantic features (low resolution) are upsampled to the same spatial size as the low-level high-resolution features through upsampling operations (such as bilinear interpolation or transposed convolution). Then, the upsampled high-level features are element-wise added or concatenated with the corresponding low-level features, and fused using convolution operations. In the application of rebar tying point detection, strong semantic judgments from the Transformer encoder regarding "this is very likely a tying point" or "this is part of the rebar mesh" are directly injected into low-level features containing precise edge and line details of that location. For example, a location that only appears as two weak intersecting lines in low-level features will have its feature response significantly enhanced after fusing high-level semantic information, making it easier for subsequent detectors to recognize. This process essentially uses high-level semantic information as guidance to selectively enhance the semantics and suppress noise in low-level features.
[0083] Step S244: Generate multi-scale fused features based on the fused features.
[0084] The fusion operation is not performed at a single scale, but rather recursively unfolds across multiple low-level feature maps of different resolutions provided by the backbone network. That is, after a high-level feature enhances a lower-level feature, the enhanced feature can then be used as a "new high-level semantic feature" for further fusion at higher resolutions. Ultimately, through this series of continuous top-down fusions and lateral connections, a completely new set of feature maps is generated. This set of feature maps constitutes a multi-scale fusion feature set, preserving the spatial resolution gradients of each layer of the original backbone network while incorporating the richest global semantic information from the deepest layers into each layer. For rebar tying point detection, whether for small tying points occupying few pixels in the image or for tying points appearing larger, clear detailed contours and strong semantic support can be simultaneously obtained in the fusion features at the corresponding scale, providing the optimal feature representation for the decoder to accurately locate targets at different scales.
[0085] The above detection method will be further explained below with a specific embodiment.
[0086] 1. Data collection method A rebar tying network was constructed and a dataset was created in the laboratory. Four rebar diameters (6mm, 8mm, 10mm, and 12mm) were used to build the network. By adjusting the shooting height (100-500mm), angle (30°-90°), and lighting conditions (switching between natural light and supplementary lighting), photos of rebar tying points were collected under different shooting backgrounds, distances, and angles. After manually filtering out blurry and severely occluded images, a total of 500 valid images were obtained. To address the issues of the limited morphology of the rebar tying points and the small dataset size, and to prevent overfitting of the target recognition algorithm during training while improving the network model's training effect, data augmentation strategies were employed to expand the dataset: first, geometric transformations (flipping and rotation) were used to increase spatial diversity; second, noise interference (Gaussian noise and salt-and-pepper noise) was added to simulate dust interference present in rebar tying recognition at construction sites; and third, the color space of the images was adjusted (changing hue and brightness) to increase the model's adaptability to different lighting conditions.
[0087] Data augmentation was performed by flipping and rotating the original images of the rebar tying points, adding noise, and changing the image's hue, saturation, and brightness. The dataset samples were divided into bound (tying points) and Ubound (untying points) based on whether the tying points were tying, and then divided into training (train), validation (val), and test (test) sets in a 7:2:1 ratio to improve the network's generalization ability.
[0088] 2. Experimental Environment and Evaluation Indicators The experimental environment consisted of a Windows 10 operating system, an Intel(R) Xeon(R) Gold 6244 CPU @3.60GHz (16 Cores), ~3.6GHz, an NVIDIA Quadro RTX 4000 GPU with 8GB of GPU RAM, a Python 3.7 development environment, PyTorch 1.13.1 as the deep learning framework, CUDA version 11.7 as the unified computing device architecture, and cuDNN version 8.9.26 as the cuDNN.
[0089] The training parameters were set as follows: 250 epochs, 4 batch sizes, and 4 workers. The AdamW optimizer was used with a base learning rate of 0.0001, a weight decay of 0.0001, and an input image size of 640×640.
[0090] To comprehensively evaluate the effectiveness of the proposed algorithm in rebar tying point detection, this paper selects the following main evaluation metrics: precision (P), recall (R), mean average precision (mAP), model weights, and number of parameters.
[0091] Precision indicates how many of the samples predicted as positive are actually positive; it represents the proportion of true positive examples in the prediction results. Precision is as follows: ; Recall represents the percentage of positive examples correctly predicted in a sample; it is the proportion of all positive examples that are correctly predicted. The recall rates are as follows: ; The mean precision is the average of the mean precision (AP) across all categories. The mean precision is as follows: ; The number of parameters is the sum of the parameters in a model, used to evaluate the size of the model, and is usually measured in millions (M).
[0092] 3. Experimental Results and Analysis (1) Ablation test To quantify the impact of each improved module on the performance of the CF-DETR model, four ablation experiments were designed to verify the effects of the texture suppression feature enhancement module (TS-FEM) and the geometry-aware refinement module (GSA-RM). The experimental results are shown in Table 1.
[0093] Table 1 Ablation Experiment Results As can be seen from Table 1: When the TS-FEM module was added alone (Experiment 2), mAP improved by 2.4 percentage points, P improved by 2.4 percentage points, and R improved by 1.6 percentage points. This indicates that the texture suppression mechanism effectively enhanced the edge features of the reinforcing bars and reduced false detections caused by background interference.
[0094] Adding the GSA-RM module alone (Experiment 3) improved mAP by 4.1 percentage points, P by 3.8 percentage points, and R by 3.3 percentage points. This indicates that the geometric structure perception module significantly improves the localization accuracy of dense small targets, verifying the effectiveness of the "cross-shaped" feature extraction for locating the center of the binding point.
[0095] When both modules are used simultaneously (Experiment 4), mAP improves by 6.7 percentage points, P by 6.2 percentage points, and R by 5.7 percentage points. The performance improvement is greater than the simple sum of the individual modules, indicating that the two modules have a good synergistic effect and can effectively solve the two core problems of background interference and inaccurate positioning at the same time.
[0096] (2) Comparative experiment To verify the overall performance advantage of the improved algorithm, it was compared with the current mainstream object detection algorithms (YOLOv8, Faster R-CNN, DETR, and the original CF-DETR) on the test set. The experimental results are shown in Table 2.
[0097] Table 2 Comparison of experimental results As shown in Table 2, in terms of detection accuracy, the improved CF-DETR algorithm outperforms other comparative algorithms in mAP50, P, and R. Compared to the YOLOv8 algorithm, mAP is improved by 7.5 percentage points, P by 7.6 percentage points, and R by 8.2 percentage points. Compared to the Faster R-CNN algorithm, mAP is improved by 12.6 percentage points, P by 12.4 percentage points, and R by 12.8 percentage points. Compared to the CF-DETR algorithm, mAP is improved by 6.7 percentage points, P by 6.2 percentage points, and R by 5.7 percentage points, which fully demonstrates the detection accuracy advantage of the proposed method in complex rebar tying scenarios. Regarding model complexity, the improved CF-DETR algorithm has 44.1M parameters, only 2.9M more than CF-DETR, and the difference is not significant compared to other algorithms, indicating that the proposed module maintains model compactness while improving performance.
[0098] Accordingly, a second aspect of the present invention provides a rebar tying point detection system based on an improved CF-DETR model, which detects rebar tying points using the aforementioned rebar tying point detection method based on the improved CF-DETR model, including: The image acquisition module is used to acquire digital images containing several rebar tying points to be identified in the rebar network; The coordinate calculation module is used to detect and locate rebar tying points in digital images based on the improved CF-DETR model, and obtain the coordinate data of the rebar tying points. The improved CF-DETR model includes a backbone network, a texture suppression enhancement module, a Transformer encoder, a multi-scale feature fusion module, and a decoder connected in sequence. The input of the multi-scale feature fusion module is also connected to the output of the backbone network. The decoder includes multiple cascaded decoding layers. Each decoding layer includes a coarse layer and a fine layer. The coarse layer is used to generate initial candidate regions, and the fine layer is used to perform geometric structure-aware fine-tuning and localization of the initial candidate regions.
[0099] Accordingly, a third aspect of the present invention provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the above-described rebar tying point detection method based on the improved CF-DETR model.
[0100] Accordingly, a fourth aspect of the present invention provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the above-described method for detecting rebar tying points based on the improved CF-DETR model.
[0101] The embodiments of this invention aim to protect a method for detecting rebar tying points based on an improved CF-DETR model, which has the following effects: 1. By introducing the Texture Suppression Feature Enhancement Module (TS-FEM), which adopts a parallel multi-branch architecture and combines gradient magnitude calculation, downsampling-upsampling structure enhancement and channel attention mechanism, redundant texture interference such as templates, scaffolding and shadows in construction site images is effectively suppressed, and the edge and structural feature expression of steel reinforcement targets is significantly enhanced. This greatly reduces the false detection rate caused by complex backgrounds and improves the robustness and environmental adaptability of the detection system. 2. By designing a fine-tuning localization mechanism with geometric structure awareness, deformable convolution is used in the fine layer of the decoder to extract the cross-shaped geometric features of the steel bar intersections, and this is used to guide the attention mechanism for fine-tuning. This enables the model to explicitly perceive and focus on the central structure of the binding point, fundamentally improving the localization coordinate drift problem caused by the small size and dense distribution of the target, and achieving sub-pixel level localization accuracy. 3. By constructing a complete model architecture that includes texture suppression, global encoding, multi-scale fusion, and two-stage decoding, end-to-end optimization from feature preprocessing and semantic enhancement to localization refinement is achieved while keeping the model parameter increment to a minimum. This enables the model to balance detection accuracy, localization accuracy, and computational efficiency when dealing with the specific task of rebar tying points, providing reliable technical support for the real-time automated operation of rebar tying robots.
[0102] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0103] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0104] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0105] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0106] 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 it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for detecting rebar tying points based on an improved CF-DETR model, characterized in that, Includes the following steps: Acquire a digital image containing several rebar tying points to be identified in the rebar network; Based on the improved CF-DETR model, the digital image is processed to detect and locate the rebar tying points, and the coordinate data of the rebar tying points are obtained. The improved CF-DETR model includes a backbone network, a texture suppression enhancement module, a Transformer encoder, a multi-scale feature fusion module, and a decoder connected in sequence. The input of the multi-scale feature fusion module is also connected to the output of the backbone network. The decoder includes multiple cascaded decoding layers. Each decoding layer includes a coarse layer and a fine layer. The coarse layer is used to generate initial candidate regions, and the fine layer is used to perform geometrically aware fine-tuning and localization of the initial candidate regions.
2. The method for detecting rebar tying points based on the improved CF-DETR model according to claim 1, characterized in that, The process of detecting and locating rebar tying points in the digital image based on the improved CF-DETR model, to obtain the coordinate data of the rebar tying points, includes: Based on the backbone network, basic features are extracted from the digital image to obtain basic features; Based on the texture suppression feature enhancement module, the basic features are subjected to texture suppression and structural enhancement processing to obtain enhanced features; Based on the Transformer encoder, global context modeling is performed on the enhanced features to obtain encoded features; The encoded features are processed by multi-scale feature fusion based on the multi-scale feature fusion module to obtain multi-scale fused features. Based on the decoder, the multi-scale fusion features are detected and located, and the coordinate data of the rebar binding points are output.
3. The method for detecting rebar tying points based on the improved CF-DETR model according to claim 2, characterized in that, The step of detecting and locating the multi-scale fused features based on the decoder, and outputting the coordinate data of the rebar binding points, includes: Based on the coarse layer of the decoding layer, the multi-scale fusion features are initially localized to generate the initial candidate region of the rebar binding point. Based on the geometric structure perception and refinement module in the fine layer of the decoding layer, the initial candidate region is subjected to geometric structure perception and refinement positioning processing, and the precise coordinate data of the rebar binding point is output.
4. The method for detecting rebar tying points based on the improved CF-DETR model according to claim 3, characterized in that, The geometric structure-aware fine-tuning localization process for the initial candidate region includes: Extract image features from the initial candidate regions; Based on the deformable convolution in the geometric structure perception and refinement module, cross-shaped geometric structure features corresponding to the intersection of steel bars are extracted from the image features. Based on the cross-shaped geometric structure features, the initial candidate region is finely adjusted.
5. The method for detecting rebar tying points based on the improved CF-DETR model according to claim 4, characterized in that, The deformable convolution in the geometric structure perception refinement module extracts cross-shaped geometric structure features corresponding to the intersections of steel bars from the image features, including: Deformable convolution is applied to the image features in both the horizontal and vertical directions to extract structural information in orthogonal directions.
6. The method for detecting rebar tying points based on the improved CF-DETR model according to claim 4, characterized in that, The refinement of the initial candidate region based on the cross-shaped geometric structure features includes: The object query vector is mapped to the query vector in the attention mechanism, and the cross-shaped geometric structure features are mapped to the key vector and value vector in the attention mechanism; Cross-attention calculation is performed based on the query vector, key vector, and value vector, so that the object query vector interacts with the cross-shaped geometric structure features to obtain a feature representation focused on the central region of the cross. Based on the feature representation, the center coordinates and bounding box size of the initial candidate region are corrected to obtain accurate coordinate data.
7. The method for detecting rebar tying points based on the improved CF-DETR model according to claim 4, characterized in that, The step of extracting image features from the initial candidate region includes: Adaptive scale fusion is performed on the multi-scale region features corresponding to the initial candidate region to obtain the fused region features; Based on the fused regional features, the image features are extracted.
8. The method for detecting rebar tying points based on the improved CF-DETR model according to claim 2, characterized in that, The texture suppression feature enhancement module includes a high-frequency texture suppression branch, a low-frequency structure enhancement branch, and a global context modeling branch that are set in parallel. The high-frequency texture suppression branch is used to calculate the gradient magnitude of the input features and generate an edge attention map to enhance high-frequency edge features; The low-frequency structure enhancement branch is used to capture macroscopic structural features through downsampling and upsampling operations; The global context modeling branch is used to recalibrate the input features channel by channel through a channel attention mechanism; The outputs of the high-frequency texture suppression branch, the low-frequency structure enhancement branch, and the global context modeling branch are concatenated and fused in the channel dimension, and then added to the module input through residual connection to obtain the enhanced feature.
9. The method for detecting rebar tying points based on the improved CF-DETR model according to claim 8, characterized in that, The high-frequency texture suppression branch calculates the gradient magnitude using the Sobel operator.
10. The method for detecting rebar tying points based on the improved CF-DETR model according to claim 2, characterized in that, The process of performing multi-scale feature fusion processing on the encoded features based on the multi-scale feature fusion module to obtain multi-scale fused features includes: The encoded features are considered as high-level semantic features; Obtain low-level high-resolution features extracted from the backbone network; The high-level semantic features are fused with the low-level high-resolution features across scales to enhance the semantic information of the low-level high-resolution features. Based on the fused features, the multi-scale fused features are generated.