A steel bar binding point detection method based on improved YOLOv8

By improving the local feature enhancement module, bidirectional multi-scale fusion network, and task decoupling detection module of YOLOv8, the problem of insufficient accuracy of YOLOv8 in rebar binding point detection was solved, achieving high accuracy, improved recall rate for small targets, and real-time detection capability.

CN120726296BActive Publication Date: 2026-04-21HEBEI ZHUCHENG DIGITAL TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Traditional YOLOv8 suffers from insufficient local detail modeling capabilities, inefficient multi-scale feature fusion, and high coupling between the detection head and the task in rebar tying point detection, resulting in poor detection accuracy.

Method used

YOLOv8 is improved by adopting a local feature enhancement module, a bidirectional multi-scale fusion network, and a task decoupling detection module. Through local spatial attention calculation, depthwise separable convolution, and channel attention weighting operations, dynamic weight fusion of features is achieved, and classification and regression tasks are processed independently to generate detection results for tethering point locations and categories.

Benefits of technology

It improves the recall rate of small target detection, reduces the false detection rate, improves the detection accuracy of cross-scale targets, reduces the bounding box localization error, and meets the needs of real-time detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120726296B_ABST
    Figure CN120726296B_ABST
Patent Text Reader

Abstract

This application provides a rebar tying point detection method based on improved YOLOv8, comprising the following steps: acquiring and preprocessing construction site images; inputting the images to be detected into an improved target detection model; sequentially performing local spatial attention calculation, depthwise separable convolution, and channel attention weighting operations to enhance the detailed feature representation of rebar intersections; dynamically fusing the first feature path from top to bottom and the second feature path from bottom to top, and embedding lightweight residual units at the fusion node; employing classification and regression branches to handle classification and regression tasks respectively, with the classification branch outputting class confidence and the regression branch outputting coordinate positioning through depthwise separable convolution and probability distribution prediction layers; and decoding the output data of the target detection model to generate detection results containing the location and category of the tying points. This method can improve the accuracy of rebar tying point detection while meeting the requirements of real-time detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of single-layer rebar joint detection technology, specifically to a rebar tying point detection method based on an improved YOLOv8. Background Technology

[0002] In the field of building construction, the quality inspection of rebar tying points is a crucial step in concrete structure construction, directly affecting the safety and durability of buildings. Traditional inspection methods rely on manual visual inspection, which suffers from low efficiency, high missed detection rates, and strong subjectivity.

[0003] In recent years, deep learning-based object detection technologies (such as the YOLO series algorithms) have been introduced into this field due to their efficiency. Among them, YOLOv8, as the latest version, performs excellently in general object detection tasks. However, in the specific scenario of rebar tying points, YOLOv8 has the following limitations:

[0004] Insufficient ability to model local details: Rebar intersections are typically small-scale targets (approximately 5-10 pixels in diameter) and have textures similar to the background (such as wooden formwork or concrete residue). The feature extraction method of YOLOv8's native C2f module is unable to effectively distinguish such subtle differences, resulting in a high false negative rate for small targets.

[0005] Multi-scale feature fusion is inefficient: Traditional unidirectional feature pyramid network (PAN) fuses features only through a top-down path. In scenarios with dense steel reinforcement, the cross-scale target detection accuracy decreases significantly.

[0006] High coupling between detection head and tasks: The classification and regression tasks share a symmetrical detection head, which leads to mutual interference between the feature representations of the two tasks, increasing the bounding box localization error;

[0007] In summary, these limitations of the traditional YOLOv8 result in low accuracy in detecting rebar tying points. Summary of the Invention

[0008] In view of the above-mentioned defects or deficiencies in the prior art, this application aims to provide a method for detecting rebar tying points based on an improved YOLOv8, so as to improve the detection accuracy of rebar tying points; the detection method includes the following steps:

[0009] Acquire images of the construction site, and preprocess the images to obtain the image to be detected;

[0010] The image to be detected is input into the improved target detection model, and the ligation point detection is performed through the following collaborative improvement structure:

[0011] The local feature enhancement module sequentially performs local spatial attention calculation, depthwise separable convolution, and channel attention weighting operations to enhance the detailed feature representation of the rebar intersections;

[0012] The bidirectional multi-scale fusion network dynamically weights and fuses the first feature path from top to bottom and the second feature path from bottom to top, and embeds lightweight residual units at the fusion nodes; wherein, the first feature path corresponds to high-level semantic features and the second feature path corresponds to low-level detail features.

[0013] The task decoupling detection module uses classification branches and regression branches to handle classification tasks and regression tasks respectively. The classification branch outputs class confidence through continuous 1×1 convolutions, and the regression branch outputs coordinate positioning through depthwise separable convolutions and probability distribution prediction layers.

[0014] The output data of the target detection model is decoded to generate detection results that include the location and category of the binding points.

[0015] According to the technical solution provided in the embodiments of this application, the preprocessing of the construction site image includes the following steps:

[0016] The construction site image is subjected to random rotation, scaling, mosaic enhancement, and HSV color space perturbation in sequence.

[0017] According to the technical solution provided in the embodiments of this application, the local spatial attention calculation includes the following steps:

[0018] The image to be detected is divided into multiple local windows. Within each local window, the attention weights of the query matrix, key matrix, and value matrix are calculated using the following formula:

[0019] ;

[0020] Where Q is the query matrix, K is the key matrix, V is the value matrix, and d k For the key vector dimension, the window partitioning adopts a sliding window strategy, and the window size is a configurable parameter ranging from 5×5 to 7×7.

[0021] According to the technical solution provided in the embodiments of this application, the regression branch is located by outputting coordinates through depthwise separable convolution and probability distribution prediction layer, including the following steps:

[0022] The first feature map output by the bidirectional multi-scale fusion network is input into a three-layer cascaded depthwise separable convolutional layer to obtain the second feature map; each convolutional kernel has a size of 3×3 and a stride of 1, and batch normalization and SiLU activation functions are inserted.

[0023] The probability distribution prediction layer models the bounding box coordinates in the second feature map as a discrete probability distribution, and the bounding box coordinates include the horizontal and vertical coordinates of the center point of the target binding point and the width and height.

[0024] The discrete probability distribution is converted into continuous spatial coordinates through integration to obtain coordinate positioning.

[0025] According to the technical solution provided in the embodiments of this application, the step of modeling the bounding box coordinates in the second feature map as a discrete probability distribution through the probability distribution prediction layer includes the following steps:

[0026] The second feature map is input into the fully connected layer to generate a vector with a dimension of 4×reg_max, where 4 represents the four coordinate parameters of the center point (horizontal, vertical, width, and height), and reg_max is the preset number of discrete distribution interval segmentation points, with a value range of 8 to 16.

[0027] Perform a Softmax operation on the reg_max dimension vector of each coordinate parameter to obtain a discrete probability distribution.

[0028] According to the technical solution provided in the embodiments of this application, the lightweight residual unit includes two cascaded 1×1 convolutional layers, with a batch normalization layer and SiLU activation function inserted in between, and residual connections are established between the input and output. A DropPath random depth drop mechanism is set on the residual path, with a drop probability of 0.1 to 0.3.

[0029] According to the technical solution provided in the embodiments of this application, the classification branch sequentially includes two 1×1 convolutional layers, each followed by batch normalization and SiLU activation function, and the number of output channels is equal to the total number of categories.

[0030] According to the technical solution provided in the embodiments of this application, the formula for dynamic weight fusion is: ,in, , For trainable scalar parameters, F1 represents high-level semantic features, and F2 represents low-level detailed features.

[0031] According to the technical solution provided in the embodiments of this application, the training loss function of the task decoupling detection module includes: the classification loss corresponding to the classification branch adopts the binary cross-entropy loss, and the regression loss corresponding to the regression branch adopts the distribution focus loss.

[0032] According to the technical solution provided in the embodiments of this application, the improved target detection model includes the following lightweight deployment:

[0033] Channel pruning: Remove redundant channels in the feature map with a weight sparsity greater than 0.8;

[0034] Parameter quantization: Convert 32-bit floating-point weights to 8-bit fixed-point numbers and use symmetrical uniform quantization;

[0035] Operator fusion: Combines convolutional layers, batch normalization layers, and activation functions into a single computation node.

[0036] In summary, this application proposes a rebar tying point detection method based on improved YOLOv8, comprising the following steps: acquiring and preprocessing images of the construction site; inputting the images to be detected into the improved target detection model; sequentially performing local spatial attention calculation, depthwise separable convolution, and channel attention weighting operations to enhance the detailed feature representation of rebar intersections; dynamically fusing the first feature path from top to bottom and the second feature path from bottom to top, and embedding lightweight residual units at the fusion node; using classification and regression branches to handle classification and regression tasks respectively, with the classification branch outputting class confidence and the regression branch outputting coordinate positioning through depthwise separable convolution and probability distribution prediction layers; and decoding the output data of the target detection model to generate detection results containing the location and category of the tying points.

[0037] Compared with existing technologies, the beneficial effects of this application are as follows: This method employs a local feature enhancement module that uses a cascaded operation of "sliding window attention → depthwise separable convolution → channel weighting" to specifically enhance the spatial correlation and channel saliency of rebar intersections. In areas with dense rebar (intersection spacing < 20 pixels), the recall rate for small target detection is improved, while the false positive rate is reduced. Simultaneously, the Bidirectional Multi-Scale Fusion Network (BiFPN) introduces a dynamic weight fusion mechanism, balancing the feature contributions of top-down and bottom-up paths through learnable parameters. This improves the average detection accuracy of cross-scale targets (such as clear near-field binding points and blurred far-field nodes) and reduces the computation time for feature fusion. Furthermore, the task decoupling detection module uses independent branches to handle classification and regression tasks. The classification branch focuses on class confidence through 1×1 convolution, while the regression branch achieves sub-pixel-level localization through probability distribution prediction. The bounding box localization error is reduced from 6.8 pixels in the original YOLOv8 to 3.2 pixels, and the correlation coefficient between classification confidence and localization accuracy decreases. The application of lightweight residual units and depthwise separable convolutions also compresses the number of model parameters, improves inference speed on edge devices, and meets the needs of real-time detection. Attached Figure Description

[0038] Figure 1 A flowchart illustrating the steps of the rebar tying point detection method based on the improved YOLOv8 provided in this application embodiment. Detailed Implementation

[0039] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.

[0040] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0041] Example 1

[0042] As mentioned in the background section, to address the problems in the existing technology, this application proposes a method for detecting rebar tying points based on an improved YOLOv8, such as... Figure 1 As shown, it includes the following steps:

[0043] S1. Acquire images of the construction site, and preprocess the images of the construction site to obtain images to be detected;

[0044] Specifically, the construction site images were read using the OpenCV library, and the images were processed as follows: Brightness normalization: Histogram equalization (CLAHE algorithm) was used to balance lighting differences; Size normalization: The images were uniformly scaled to 640×640 pixels and padded to an aspect ratio of 1:1. This eliminated the interference of ambient lighting and shooting angle on the model input, ensured the consistency of input tensor size, improved the robustness of the model to low-light and backlight scenes, and controlled the preprocessing time to within 10ms (1080P image).

[0045] S2. Input the image to be detected into the improved target detection model, and perform tying point detection through the following collaborative improvement structure:

[0046] S2-1, Local Feature Enhancement Module, sequentially performs local spatial attention calculation, depthwise separable convolution, and channel attention weighting operations to enhance the detailed feature representation of the rebar intersections;

[0047] Furthermore, a direction-sensitive convolutional kernel group is introduced into the local feature enhancement module, using depth-separable convolution as a direction-sensitive depth-separable convolution. This direction-sensitive depth-separable convolution employs a multi-directional convolutional kernel group, including constrained convolutions in four directions: horizontal, vertical, and ±45°. Dynamic weights are used to fuse the feature responses of each direction. The output feature map of the direction-depth-separable convolution is adjusted for the number of channels using a 1×1 convolution before being input to the channel attention module to ensure compatibility of channel weighting operations. This further optimizes the "cross-shaped" geometric features specifically for rebar intersections, improving detection accuracy. Specific implementation methods include:

[0048] In the depthwise separable convolution stage, a multi-directional convolutional kernel group (horizontal, vertical, and ±45° directions) is used to generate multi-directional feature maps; each direction is configured with a 3×3 learnable convolutional kernel, as expressed by the formula:

[0049]

[0050] in, This represents a learnable convolutional kernel (3×3 size) corresponding to a direction θ, where θ takes four directions: 0° (horizontal), 45°, 90° (vertical), and 135°. Each direction is initialized independently, and the convolutional operation representing the direction is adaptively adjusted through training. dir This represents a direction-constrained convolution operation, which, based on regular convolution, uses a mask. Force the convolution kernel to respond only to features in a specific direction. For example, a 0° convolution kernel only retains the gradient response in the horizontal direction. The directional mask matrix (3×3) is used to suppress non-principal directional responses. X represents the input feature map, which is an enhanced feature from the output of the local spatial attention module. ⊙ represents the element-wise multiplication (Hadamard product), used to apply the directional mask.

[0051] The process of generating multi-directional feature maps is described as follows: An initial convolution kernel is designed for each direction θ, for example, the initial weights in the 0° direction are biased towards horizontal edge detection (similar to the Sobel horizontal kernel). Convolutions are performed on the input feature map X in four directions, and after each convolution, the kernel is compared with the corresponding... Multiplying these results in feature maps for four directions. The weights for each direction are then calculated using the following formula. The feature maps of the four directions are added together according to their weights to obtain the multi-directional feature map.

[0052] Dynamic weight allocation: The weight coefficients of the convolutional kernels in each direction are obtained through online learning. The calculation formula is as follows:

[0053] ;

[0054] GAP is a global average pooling operation that enables adaptive directional weight adjustment. The expression represents the standard convolution result without applied directional masks, used to evaluate the activation strength of the convolution kernel in that direction; exp represents the exponential function used to amplify the weight differences in significant directions; the denominator is the Softmax normalization of the weights in the four directions to ensure... .

[0055] Multi-directional feature maps are concatenated with local attention features (i.e., enhancement features) through channels, and feature recombination is achieved through 1×1 convolution.

[0056] It should be noted that the orientation-sensitive depth-separable convolution is an improvement on the depth-separable convolution in the original YOLOv8. By introducing orientation constraints and dynamic weight fusion, it improves the geometric feature extraction capability without significantly increasing the number of parameters. According to actual tests, this design improves the distinction between intersections and linear rebars by 37.2%, and reduces the error rate of misidentifying ordinary intersections as binding points to 1.8%.

[0057] S2-2, a bidirectional multi-scale fusion network, dynamically weights and fuses the first feature path from top to bottom and the second feature path from bottom to top, and embeds lightweight residual units at the fusion nodes; wherein, the first feature path corresponds to high-level semantic features and the second feature path corresponds to low-level detail features.

[0058] S2-3, Task Decoupling Detection Module, uses classification branch and regression branch to process classification task and regression task respectively. The classification branch outputs class confidence through continuous 1×1 convolution, and the regression branch outputs coordinate positioning through depthwise separable convolution and probability distribution prediction layer.

[0059] In a preferred embodiment, the local spatial attention calculation includes the following steps:

[0060] The image to be detected is divided into multiple local windows. Within each local window, the attention weights of the query matrix, key matrix, and value matrix are calculated using the following formula:

[0061] ;

[0062] Where Q is the query matrix, K is the key matrix, V is the value matrix, and d k For the key vector dimension, the window partitioning adopts a sliding window strategy, and the window size is a configurable parameter ranging from 5×5 to 7×7.

[0063] Specifically, the input image to be detected (e.g., 80×80×256) is divided into 7×7 local windows (each window is 11×11 pixels). A sliding window strategy (step size of 7 pixels) is adopted to allow edge overlap. Within each window, a query matrix Q, a key matrix K, and a value matrix V are generated, and a weighted feature map (i.e., enhanced features) is output, while preserving window edge information.

[0064] Specifically, the local feature enhancement module: After the input image is processed by Backbone to extract initial features, it enters the C2f_iRMB_Cascaded module: Local spatial attention: The feature map is divided into 7×7 local windows, and the pixel association weights within the window (i.e., the attention weights of the query matrix, key matrix, and value matrix) are calculated using the above formula, and the enhanced features are output; Depthwise separable convolution: A 3×3 convolution kernel is used to extract spatial features channel by channel; Channel attention weighting: The channel weights are dynamically scaled through the SE module to suppress noisy channels. Through the "local-channel" dual attention mechanism, the texture details of the steel bar intersections are focused on to improve the recall rate of small target (<20×20 pixels). Bidirectional multi-scale fusion network: A BiFPN structure is constructed, including: Top-down path: Upsampling high-level features (P5) and fusing them with mid-level features (P4); Bottom-up path: Downsampling low-level features (P3) and fusing them with mid-level features (P4);

[0065] Furthermore, the formula for the dynamic weight fusion is: ,in, , For trainable scalar parameters, F1 represents high-level semantic features, and F2 represents low-level detailed features.

[0066] Specifically, bidirectional information flow enables cross-scale feature complementarity and dynamic weight optimization of fusion contribution, thereby improving the mAP of multi-scale target detection.

[0067] Specifically, the task decoupling detection module employs the following branches: Classification branch: using two 1×1 convolutional layers (channel count 256 → 128 → number of categories), outputting the category confidence score for each anchor point; Regression branch: using three depthwise separable convolutional layers (channel count 256 → 256 → 256 → 4×reg_max), outputting the coordinate probability distribution. Independent branches avoid task interference, and probability distribution prediction achieves sub-pixel-level localization, reducing localization error.

[0068] S3. Decode the output data of the target detection model to generate detection results including the location and category of the binding point.

[0069] Specifically, the decoding process includes integrating the 4×reg_max vector output by the regression branch and performing non-maximum suppression (NMS). The NMS IoU threshold is set to 0.6, and overlapping boxes are removed. The detection boxes are then mapped to the original image, generating an analysis report with a heatmap. The binding point location refers to the coordinates of the binding point, and the binding point categories can be: properly bound, not bound, partially bound, etc.

[0070] Furthermore, the detection box coordinates are mapped to the original image resolution, and the following strategy is adopted when overlaying the display: qualified binding points are marked with green rectangles (confidence ≥ 0.6); suspected defect points are marked with yellow rectangles (0.3 ≤ confidence < 0.6); and missed binding points are marked with red flashing boxes (confidence < 0.3), and a PDF report containing position deviation statistics is generated.

[0071] In a preferred embodiment, the preprocessing of the construction site image includes the following steps:

[0072] The construction site image is subjected to random rotation, scaling, mosaic enhancement, and HSV color space perturbation in sequence.

[0073] Specifically, during the model training phase, the following enhancement operations are performed on the original image (based on the Albumentations library):

[0074] Random rotation: Angle range ±45°, simulating different shooting angles, enhancing the model's ability to recognize tilted binding points;

[0075] Scale: Zoom ratio 0.5-1.5, covering close-up and panoramic scenes;

[0076] Mosaic enhancement: Randomly select four images and stitch them together to improve the generalization of small target dense scenes;

[0077] HSV color space perturbation:

[0078] Hue shift ±0.1, simulating different lighting color temperatures;

[0079] Saturation scaling of 0.5-1.5 enhances adaptability to corroded steel bars;

[0080] Brightness scaling of 0.5-1.5 simulates strong light / shadow environments.

[0081] This preprocessing method enhances data and reduces the model's generalization error in unlabeled scenarios.

[0082] In a preferred embodiment, the regression branch is located by outputting coordinates through depthwise separable convolution and probability distribution prediction layers, including the following steps:

[0083] The first feature map output by the bidirectional multi-scale fusion network is input into a three-layer cascaded depthwise separable convolutional layer to obtain the second feature map; each convolutional kernel has a size of 3×3 and a stride of 1, and batch normalization and SiLU activation functions are inserted.

[0084] The probability distribution prediction layer models the bounding box coordinates in the second feature map as a discrete probability distribution, and the bounding box coordinates include the horizontal and vertical coordinates of the center point of the target binding point and the width and height.

[0085] The discrete probability distribution is converted into continuous spatial coordinates through integration to obtain coordinate positioning.

[0086] Specifically, the depthwise separable convolutional layer: The input first feature map (e.g., 20×20×512) is processed by three convolutional layers: each layer contains a Depthwise Conv (3×3 kernels, number of groups = number of input channels) + a Pointwise Conv (1×1 kernel, number of channels remains 512); BN+SiLU activation is inserted to prevent gradient vanishing; the output second feature map size is 20×20×512.

[0087] Specifically, probability distribution prediction: The fully connected layer maps the 512 channels to 4×16 dimensions (reg_max=16), with each coordinate parameter (center point x-coordinate, y-coordinate, width, height) corresponding to 16 probability values; after Softmax normalization, the probability distribution is predicted by integration. Continuous coordinates were obtained. The coordinate prediction resolution was improved by 4 times, and the standard deviation of the positioning error was reduced to 1.2 pixels.

[0088] In a preferred embodiment, modeling the bounding box coordinates within the second feature map as a discrete probability distribution through the probability distribution prediction layer includes the following steps:

[0089] The second feature map is input into the fully connected layer to generate a vector with a dimension of 4×reg_max, where 4 represents the four coordinate parameters of the center point (horizontal, vertical, width, and height), and reg_max is the preset number of discrete distribution interval segmentation points, with a value range of 8 to 16.

[0090] Perform a Softmax operation on the reg_max dimension vector of each coordinate parameter to obtain a discrete probability distribution.

[0091] Specifically, the input second feature map is flattened to 20×20×512=204800 dimensions, then reduced to 4×16=64 dimensions through a fully connected layer, with a weight matrix size of 204800×64. Softmax calculation: the 16-dimensional vector for each coordinate parameter is independently normalized to ensure a sum of 1. Discrete interval partitioning: the coordinate range (0-640 pixels) is uniformly divided into 16 intervals (40 pixels apart), with probability values ​​representing the likelihood of the target center falling within each interval. End-to-end training is supported, the DFL loss function exhibits stable backpropagation, and convergence speed is improved.

[0092] In a preferred embodiment, the lightweight residual unit includes two cascaded 1×1 convolutional layers with a batch normalization layer and a SiLU activation function inserted in between, and a residual connection is established between the input and output. A DropPath random depth drop mechanism is set on the residual path with a drop probability of 0.1 to 0.3.

[0093] Specifically, the lightweight residual unit structure consists of: Main path: 1×1 Conv (256→256) → BN → SiLU → 1×1 Conv (256→256); Residual path: direct input connection, superimposed with DropPath (drop probability 0.2); Output: Main path output × 0.8 + input × 0.2 (training phase). 1×1 convolutions reduce computation, DropPath prevents overfitting, and residual connections alleviate gradient vanishing, resulting in a reduced number of module parameters and improved inference speed.

[0094] In a preferred embodiment, the classification branch sequentially comprises two 1×1 convolutional layers, each followed by batch normalization and SiLU activation function, with the number of output channels equal to the total number of categories.

[0095] Specifically, the first layer is: 1×1 Conv (256→128) + BN + SiLU; the second layer is: 1×1 Conv (128→number of categories) + Sigmoid activation; the output processing is: each anchor point outputs a category number vector, representing the independent confidence of each category (e.g., "bound" 0.92, "unbound" 0.08).

[0096] In a preferred embodiment, the training loss function of the task decoupling detection module includes: the classification loss corresponding to the classification branch adopts binary cross-entropy loss, and the regression loss corresponding to the regression branch adopts distribution focus loss.

[0097] In a preferred embodiment, the improved target detection model includes the following lightweight deployment:

[0098] Channel pruning: Remove redundant channels in the feature map with a weight sparsity greater than 0.8;

[0099] Parameter quantization: Convert 32-bit floating-point weights to 8-bit fixed-point numbers and use symmetrical uniform quantization;

[0100] Operator fusion: Combines convolutional layers, batch normalization layers, and activation functions into a single computation node.

[0101] Specifically, channel pruning involves calculating the L1 norm of each channel and removing channels with sparsity > 0.8 (e.g., 512 → 384); parameter quantization involves linearly mapping the FP32 weights to the INT8 range (-127~127) with a scaling factor s = 127 / max(|W|); and dequantization during inference restores floating-point values. Operator fusion combines Conv+BN+SiLU into a single operation, reducing memory access frequency. This lightweight deployment reduces model size and memory usage on edge devices.

[0102] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. The above descriptions are only preferred embodiments of this application. It should be noted that due to the limitations of written expression, while there are objectively infinite specific structures, those skilled in the art can make several improvements, modifications, or changes without departing from the principles of this invention, and can also combine the above technical features in an appropriate manner. These improvements, modifications, changes, or combinations, or the direct application of the inventive concept and technical solution to other situations without modification, should all be considered within the scope of protection of this application.

Claims

1. A method for detecting rebar tying points based on an improved YOLOv8, characterized in that, Includes the following steps: Acquire images of the construction site, and preprocess the images to obtain the image to be detected; The image to be detected is input into the improved target detection model, and the ligation point detection is performed through the following collaborative improvement structure: The local feature enhancement module sequentially performs local spatial attention calculation, orientation-sensitive depth-separable convolution with multi-directional convolution kernel groups, and channel attention weighting operation to enhance the cross-shaped geometric feature representation of the rebar intersection; wherein, the multi-directional feature map generated by the orientation-sensitive depth-separable convolution is channel-concatenated with the feature map output by the local spatial attention calculation, and feature recombination is achieved through 1×1 convolution; The bidirectional multi-scale fusion network dynamically weights and fuses the first feature path from top to bottom and the second feature path from bottom to top, and embeds lightweight residual units at the fusion nodes; wherein, the first feature path corresponds to high-level semantic features and the second feature path corresponds to low-level detail features. The task decoupling detection module uses classification branches and regression branches to handle classification tasks and regression tasks respectively. The classification branch outputs class confidence through continuous 1×1 convolutions, and the regression branch outputs coordinate positioning through depthwise separable convolutions and probability distribution prediction layers. The output data of the target detection model is decoded to generate detection results that include the location and category of the binding points.

2. The method for detecting rebar tying points based on improved YOLOv8 according to claim 1, characterized in that: The preprocessing of the construction site images includes the following steps: The construction site image is subjected to random rotation, scaling, mosaic enhancement, and HSV color space perturbation in sequence.

3. The method for detecting rebar tying points based on improved YOLOv8 according to claim 1, characterized in that: The local spatial attention calculation includes the following steps: The image to be detected is divided into multiple local windows. Within each local window, the attention weights of the query matrix, key matrix, and value matrix are calculated using the following formula: ; Where Q is the query matrix, K is the key matrix, V is the value matrix, and d k For the key vector dimension, the window partitioning adopts a sliding window strategy, and the window size is a configurable parameter ranging from 5×5 to 7×7.

4. The method for detecting rebar tying points based on improved YOLOv8 according to claim 1, characterized in that: The regression branch is located by outputting coordinates through depthwise separable convolution and probability distribution prediction layers, including the following steps: The first feature map output by the bidirectional multi-scale fusion network is input into a three-layer cascaded depthwise separable convolutional layer to obtain the second feature map; each convolutional kernel has a size of 3×3 and a stride of 1, and batch normalization and SiLU activation functions are inserted. The probability distribution prediction layer models the bounding box coordinates in the second feature map as a discrete probability distribution, and the bounding box coordinates include the horizontal and vertical coordinates of the center point of the target binding point and the width and height. The discrete probability distribution is converted into continuous spatial coordinates through integration to obtain coordinate positioning.

5. The rebar tying point detection method based on improved YOLOv8 according to claim 4, characterized in that: The step of modeling the bounding box coordinates within the second feature map as a discrete probability distribution through the probability distribution prediction layer includes the following steps: The second feature map is input into the fully connected layer to generate a vector with a dimension of 4×reg_max, where 4 represents the four coordinate parameters of the center point (horizontal, vertical, width, and height), and reg_max is the preset number of discrete distribution interval segmentation points, with a value range of 8 to 16. Perform a Softmax operation on the reg_max dimension vector of each coordinate parameter to obtain a discrete probability distribution.

6. The method for detecting rebar tying points based on improved YOLOv8 according to claim 1, characterized in that: The lightweight residual unit includes two cascaded 1×1 convolutional layers with a batch normalization layer and SiLU activation function inserted in between. Residual connections are established between the input and output, and a DropPath random depth drop mechanism is set on the residual path with a drop probability of 0.1 to 0.

3.

7. The method for detecting rebar tying points based on improved YOLOv8 according to claim 1, characterized in that: The classification branch consists of two 1×1 convolutional layers, each followed by batch normalization and SiLU activation function, with the number of output channels equal to the total number of categories.

8. The method for detecting rebar tying points based on improved YOLOv8 according to claim 1, characterized in that: The formula for dynamic weight fusion is: ,in, , For trainable scalar parameters, F1 represents high-level semantic features, and F2 represents low-level detailed features.

9. The method for detecting rebar tying points based on improved YOLOv8 according to claim 1, characterized in that: The training loss function of the task decoupling detection module includes: the classification loss corresponding to the classification branch adopts the binary cross-entropy loss, and the regression loss corresponding to the regression branch adopts the distribution focus loss.

10. The method for detecting rebar tying points based on improved YOLOv8 according to claim 1, characterized in that: The improved target detection model includes the following lightweight deployment: Channel pruning: Remove redundant channels in the feature map with a weight sparsity greater than 0.8; Parameter quantization: Convert 32-bit floating-point weights to 8-bit fixed-point numbers and use symmetrical uniform quantization; Operator fusion: Combines convolutional layers, batch normalization layers, and activation functions into a single computation node.

Citation Information

Patent Citations

  • Hidden forbidden article detection method based on lightweight millimeter wave radar

    CN118823311A

  • Small target detection method under view angle of unmanned aerial vehicle based on self-attention mechanism

    CN119992393A