Method and device for measuring diameter of RC structural steel bar based on deep learning
Through the HA-TransUNet model, the accuracy and efficiency of steel bar detection in RC structure are solved, and high-precision non-destructive detection is achieved, which is suitable for RC structure health testing.
Patent Information
- Application Number
- CN202510962316.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-14
- Publication Date
- 2025-08-08
AI Technical Summary
The existing non-destructive detection methods cannot quickly and accurately present the defect location and specific forms of steel bars in RC structures. Traditional deep learning algorithms have bottlenecks in accuracy and efficiency in X-ray image segmentation, lack of adaptation data sets and large noise interference.
Using the HA-TransUNet model, combined with CNN and Transformer's U-shaped encoder-decoder network, the adaptive hybrid attention (AHA) module and hybrid detail enhancement (HDE) module are used to optimize feature expression and image segmentation, obtain global and local information of steel bars, and combine data set expansion technology to improve model training effect.
The precise segmentation and diameter measurement of steel bars in X-ray images is realized, which improves the accuracy and robustness of detection, with a detection accuracy of 96.5% and an error of less than 0.6mm, providing an effective method for non-destructive detection of steel bars in RC structures.
Smart Images

Figure CN120451250A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method and device for measuring the diameter of RC structure steel bars based on deep learning, and belongs to the field of steel bar diameter detection. Background Art
[0002] In the field of RC (reinforced concrete) structural health monitoring, reinforced concrete (RC) structures are widely used in my country's modern infrastructure construction. Rebar in concrete structures plays a role in strengthening and enhancing structural function. However, during the service life of RC structures, due to environmental erosion, the steel bars within the concrete will rust, resulting in a reduction in the cross-sectional dimensions of the steel bars, meaning that the actual dimensions are smaller than the designed dimensions. This significantly reduces the RC structure's bearing capacity, including compression, crack resistance, and impact resistance, seriously affecting its service life and structural safety. Traditional destructive testing methods for rebar diameter require crushing the reinforced concrete to measure the diameter. However, this method inevitably damages the RC concrete structure, affecting its aesthetic appearance and, in some cases, accelerating the degradation of its bearing capacity. Therefore, developing a nondestructive testing method that can intuitively and in real time obtain the actual morphological characteristics and dimensions of the rebar diameter within the concrete is of great significance to enriching and improving the existing health monitoring system for RC concrete structures.
[0003] The existing non-destructive testing solutions for steel bar diameter, such as the effective diameter detection method of steel bars in concrete based on magnetic induction, the steel bar diameter judgment method based on radar images, and the steel bar diameter assessment method based on ultrasonic guided waves, can achieve certain detection functions, but they have common shortcomings - they cannot intuitively and quickly present the defect location and specific form of the steel bars.
[0004] With the expansion of deep learning technology in image recognition, the idea of using X-ray images combined with deep learning algorithms to detect rebar diameters and defects has gradually emerged. However, the implementation of this technology faces multiple key obstacles: First, there is a lack of specially adapted datasets for deep learning model training, and there are no mature algorithms to support accurate segmentation and rebar detection in X-ray images. Second, X-ray images themselves suffer from poor quality and high noise interference, making it difficult for traditional algorithms to accurately segment and process them. This further restricts the advancement of this technology and prevents breakthroughs in the accuracy and efficiency of rebar detection. Summary of the Invention
[0005] In response to the problems in the prior art, the present invention provides a method and device for measuring the diameter of RC structural steel bars based on deep learning.
[0006] The technical solution adopted by the present invention to solve the technical problem is: a method for measuring the diameter of RC structural steel bars based on deep learning, comprising: Obtain X-ray images of reinforced concrete, annotate the locations of the steel bars in the images, prepare a dataset for deep learning model training, and perform image preprocessing on the dataset images; The dataset is input into the HA-TransUNet model, which includes an encoder, a decoder, an Adaptive Hybrid Attention (AHA) module, and a Hybrid Detail Enhancement (HDE) module. A CNN-Transformer hybrid encoder is used for processing, using CNN to extract local detail features and Transformer to extract global context information of the steel bars; By adding an adaptive hybrid attention (AHA) module in the jump connection between the encoder and decoder to optimize feature expression, the features are correlated and transformed to obtain the correlation between global and local information; Enhanced image details are obtained by adding a hybrid detail enhancement (HDE) module between the high-level features and low-level features of the encoder and decoder; The decoder decodes the features of the hybrid encoder to produce a segmentation result, preserving the morphological information of the steel bar part in the X-ray image; The image is input into the trained design model for segmentation, and a semantic segmentation image of the steel bar is output. The steel bar part of the segmented image is analyzed, and the steel bar boundary is fitted through image processing to calculate the corrected steel bar diameter.
[0007] Furthermore, the dataset is divided into a training set, a validation set, and a test set, and the dataset includes a label image and an original image; The image preprocessing of the dataset images includes expanding the dataset by randomly adjusting contrast, randomly adjusting brightness, adding noise, and performing blurring operations.
[0008] Furthermore, the HA-TransUNet model is a U-shaped encoder-decoder network based on the TransUNet model and combines the advantages of convolutional neural networks (CNNs) and Transformers. Its encoder adopts the R50-ViT-B / 16 model, integrating the Vision Transformer (ViT) and ResNet50. Furthermore, extracting local detail features and global context information of an image by a hybrid encoder includes: The images in the training set are input into the encoder to extract image features. The input images with a resolution of C×H×W are first subjected to local feature extraction by a deep CNN. The obtained local features are converted into a two-dimensional sequence C×N of size P×P, {N=(HW) / P²}, and input into the 12-layer VIT module. The VIT module includes multi-head self-attention (MSA) and multi-layer perceptron (MLP). These layers process the input sequence and extract the global context information of the steel bars.
[0009] Furthermore, the optimization of feature expression through the adaptive hybrid attention (AHA) module and the correlation transformation of features to obtain the correlation between global and local information include: The adaptive hybrid attention (AHA) module effectively captures detailed features in the skip-connected feature maps of different stages, and promotes the interaction between them by obtaining the correlation between the global and local information of the features.
[0010] Furthermore, a learnable factor α is introduced into the adaptive hybrid attention (AHA) module to capture global channel information through a diagonal matrix and local channel information through a banded matrix, dynamically adjusting the weights of global and local information. Furthermore, the adaptive hybrid attention (AHA) module accumulates the feature map after channel attention processing and the initial feature map, and after 1×1 convolution and activation function, redistributes the feature position weights through the spatial attention mechanism to enhance the edge and position information of the steel bars.
[0011] Furthermore, the HDE module includes a hybrid differential convolution, which consists of angular differential convolution (ADconv), central differential convolution (CDConv), horizontal differential convolution (VDConv), vertical differential convolution (HDConv), ordinary convolution, and radial differential convolution (RDconv) in parallel. The parallel convolution layers are simplified into a single standard convolution. The obtained differential enhancement features are input into a 3×3 convolution, added to the initial input feature map, and then input into the serial channel and spatial attention mechanism module. The attention feature map is then element-wise multiplied with the input feature map to refine the features, and finally added to the initial input feature map.
[0012] Furthermore, the decoder part is a cascade upsampler, and the hybrid encoder reshapes the output hidden feature sequence (H×W) / P² into (H / P)×W / P), and then passes through the cascade upsampler to restore the feature map from (H / P)X(W / P) to the original size H×W.
[0013] A device for measuring the diameter of RC structural steel bars based on deep learning, comprising: Image acquisition module, acquiring X-ray images of reinforced concrete; The preprocessing module performs data enhancement on the dataset images and expands the dataset by randomly adjusting various parameters; The model inference module deploys the HA-TransUNet model, which includes an encoder, decoder, hybrid detail enhancement (HDE) module, and adaptive hybrid attention (AHA) module. It accurately segments the edges of the steel bar image based on the X-ray image and outputs the segmented image. The analysis and calculation module analyzes the steel bar portion of the segmented image and calculates the calculated value of the steel bar.
[0014] Beneficial effects of the present invention: The self-made data set of the present invention adopts a method that combines deep learning and image processing to improve the deep learning model algorithm and accurately calculate the diameter of steel bars in concrete. Compared with the traditional Sobel edge detection operator method, this method can accurately segment the edges of steel bar images based on X-ray images of different qualities, realize the visualization study of steel bar morphology, show higher accuracy and robustness, and realize steel bar diameter measurement, providing an effective method for observing steel bars in concrete and measuring steel bar diameters. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Other features, objects and advantages of the present invention will become more apparent upon reading the detailed description of non-limiting embodiments with reference to the following drawings: Figure 1 This is a flow chart of a method and device for measuring the diameter of RC structural steel bars based on deep learning in the present invention; Figure 2 This is a diagram of the HA-TransUNet model architecture in a method and device for measuring the diameter of RC structural steel bars based on deep learning in the present invention; Figure 3 Schematic diagram of an adaptive hybrid attention (AHA) module in a method and device for measuring the diameter of RC structural steel bars based on deep learning of the present invention; Figure 4 Schematic diagram of a hybrid detail enhancement (HDE) module in a method and device for measuring the diameter of RC structural steel bars based on deep learning according to the present invention; Figure 5 This figure shows the derivation process of vertical differential convolution in a method and device for measuring the diameter of RC structural steel bars based on deep learning of the present invention; Figure 6 This is a binary image after steel bar segmentation in a method and device for measuring the diameter of RC structure steel bars based on deep learning of the present invention; Figure 7 The present invention provides a method and device for measuring the diameter of RC structural steel bars based on deep learning, and visualization of the steel bar fitting diameter. Figure 8 A schematic diagram of a steel bar diameter measurement method and device for measuring steel bar diameter in an RC structure based on deep learning according to the present invention; Figure 9 A schematic diagram of X-ray technology in a method and device for measuring the diameter of RC structural steel bars based on deep learning according to the present invention; DETAILED DESCRIPTION
[0016] In order to make the technical means, creative features, objectives and effects achieved by the present invention easier to understand, the present invention is further described below in conjunction with specific implementation methods.
[0017] See also Figures 1-9 , a method for measuring the diameter of RC structural steel bars based on deep learning, comprising: Step S1: Obtain an X-ray image of reinforced concrete and mark the location of the steel bars in the image to prepare a dataset for deep learning model training. The dataset is divided into a training set, a validation set, and a test set. The dataset contains a label image and an original image. Data augmentation is performed on the dataset images. The dataset is expanded by randomly adjusting the contrast, randomly adjusting the brightness, adding noise, and blurring operations. The dataset is then input into the designed HA-TransUNet model for training. Among them, the HA-TransUNet model includes an encoder and a decoder. It is a U-shaped encoder-decoder network that combines the advantages of convolutional neural networks (CNN) and Transformer. Its encoder adopts the R50-ViT-B / 16 model, integrating Vision Transformer (ViT) and ResNet50. This combined model can extract fine structure and texture information from images, thereby enhancing feature extraction capabilities.
[0018] Step S2: The images in the training set are input into the encoder to extract local detail features and global context information from the images.
[0019] like Figure 2As shown in the figure, the encoder portion of the HA-TransUNet model architecture uses a CNN-Transformer hybrid encoder. This architecture enables the CNN to effectively extract high-resolution features, such as the shape and boundaries of rebars, while the VIT module more effectively encodes global contextual information. The HA-TransUNet model first extracts local features from an input image of resolution C×H×W using a deep CNN. This image is then converted into a two-dimensional sequence of size P×P, C×N, where N = (HW) / P². This sequence is then fed into the 12-layer VIT module to extract global contextual information about the rebars. The VIT module incorporates multi-head self-attention (MSA) and a multi-layer perceptron (MLP) to enhance image detail and improve the network's ability to resist interference.
[0020] In S3, the adaptive hybrid attention (AHA) module is added to the jump connection part of the encoder and decoder to enhance the fine-grained expression of the jump connection features, effectively capture the detailed features in the jump connection feature maps at different stages, and promote the interaction between global and local information by obtaining the correlation between the global and local information of the features. It is then cascaded with the upsampled features to achieve fine segmentation of X-ray steel bar images.
[0021] The channel attention mechanism focuses on feature categories and has achieved good results in the field of image segmentation. However, the disadvantage of the channel attention mechanism is that it only extracts global information and ignores local information. In order to improve the channel attention mechanism, the AHA module of the present invention introduces a learnable factor to effectively interact global information with local information, dynamically adjust global and local information, and realize adaptive weight distribution to obtain more effective features and improve segmentation performance. In order to further improve the network's ability to acquire features, a spatial attention mechanism that focuses on feature position information is also integrated. The extracted initial feature map and the feature map obtained by channel attention are used as the input of spatial attention, so that the learned feature information is fully combined to improve the expressiveness of the features.
[0022] like Figure 3As shown in the figure, to extract more detailed features and improve computational efficiency, the feature map is first fed into a 3×3 convolution and then into a 1×1 convolution, where the feature maps are summed. Global average pooling is then used to obtain channel information within the feature map. A diagonal matrix is used to capture global channel information, enhancing global information representation; a banded matrix is used to capture local information, enhancing local information representation. To promote full interaction between global and local information, global and local information are cross-multiplied to obtain information of varying granularity. To accurately assign feature weights and reduce computational complexity, a learnable factor α is used to adaptively adjust the weights of global and local information, dynamically merging relevant features and multiplying them with the initial input feature map. To refine the positional information of the rebars, the feature map output by the channel attention is first accumulated with the extracted initial feature map, then fed into a 1×1 normal convolution. An activation function is then applied to re-assign spatial importance weights to the extracted initial and channel attention feature maps. Finally, the feature maps are summed and output.
[0023] The specific calculation process expression is as follows: ; ; ; ; ; ; ; ; ; in, is the global information matrix, is a normal convolution with a kernel size of n, GAP(·) is the global average pooling, is the initial input feature map, is the local information matrix, is a one-dimensional convolution with a kernel size of 5, and are the global interaction information matrix and the local interaction information matrix, is the number of channels, Assign weights to channel attention, δ(·) is the Sigmod activation function, Output feature map for channel attention, is the initial feature map after extraction, is the spatial attention output feature map, δ r (·) is the ReLU activation function, is the final output feature map.
[0024] S4, adds a hybrid detail enhancement (HDE) module at the connection between the high-level features and low-level features of the encoder and decoder, which improves the model's anti-interference ability by obtaining enhanced image details; X-ray images of reinforced concrete are subject to interference from objective factors such as uneven contrast and various noise factors, which can hinder the detection of target rebar. From a grayscale perspective, according to the principles of X-ray imaging, the grayscale values of other materials within the concrete appear relatively similar to those of the rebar, making subtle differences difficult to discern. Furthermore, due to the varying thickness of the concrete when acquiring the X-ray image, high-frequency information (edges and contours) is lost, significantly impacting the calculation of the rebar diameter. Conventional convolution tends to emphasize low-frequency information in X-ray images while ignoring high-frequency information. To obtain clearer contour edges and focus on the main diameter of the rebar, the model trained in this invention incorporates a hybrid detail enhancement (HDE) module. This module improves upon conventional convolution by introducing differential convolution, enhancing its representation and generalization capabilities, capturing enhanced high-frequency information. Furthermore, a channel-wise spatial attention mechanism is incorporated using a residual structure. By adaptively learning channel and spatial attention weights, the model achieves clearer rebar edge contours.
[0025] like Figure 4 As shown in the figure, the HDE module contains hybrid differential convolution, which is composed of angular differential convolution (ADconv), central differential convolution (CDConv), horizontal differential convolution (VDConv), vertical differential convolution (HDConv), ordinary convolution and radial differential convolution (RDconv) in parallel to obtain high-frequency information and integrate more detailed reinforcement edge feature information. Based on the additivity of convolutional layers, the parallel convolutional layers are simplified into a single standard convolution. The obtained differential enhancement feature is input into a 3×3 convolution, added to the initial input feature map, and then input into the serial channel and spatial attention mechanism module. The integration of channel and spatial information is conducive to the refinement of image edge information. The attention feature map is then element-wise multiplied with the input feature map to refine the features. Finally, it is added to the initial input feature map.
[0026] like Figure 5 As shown in the figure, taking vertical difference as an example, the derivation process of vertical differential convolution is demonstrated. The vertical difference is achieved by rearranging the convolution kernels learned during training to implement gradient calculation in the convolution operation, producing an effect similar to traditional vertical edge detection. The other four types of convolution can be described similarly and will not be repeated here. In order to deploy parallel convolution layers for feature extraction without increasing parameters and inference time, radial differential convolution is introduced in parallel to differentiate the outer ring and inner ring within the obtained receptive field neighborhood, enhance information output, and obtain a larger receptive field. The calculation process of the hybrid differential convolution in the HDE module is shown in the following formula: ; in, represents the mixed differential convolution output feature map, is the initial input feature map, Represents the kernel addition of ADConv, CDConv, VDConv, HDConv, and Conv3×3 respectively, is a normal convolution with a kernel size of n, Represents the feature map of RDConv.
[0027] S5, through the decoder, decodes the features of the hybrid encoder to produce a segmentation result, preserving the morphological information of the steel bar part in the X-ray image.
[0028] The decoder consists of a cascaded upsampler. It decodes the features of the hybrid encoder to produce rebar segmentation results. The hybrid encoder reshapes the output hidden feature sequence (H×W) / P² into (H / P)×(W / P). The cascaded upsampler then restores the feature map from (H / P)×(W / P) to its original size of H×W. The cascaded upsampler, combined with the CNN-Transformer hybrid encoder, forms a U-shaped architecture. By using skip connections, it aggregates features at multiple scales, preserving detailed information about rebar in X-ray images.
[0029] S6, input the image into the trained design model for segmentation, output the semantic segmentation image of the steel bar, analyze the steel bar part of the segmented image, fit the steel bar boundary through image processing and calculate the corrected steel bar diameter.
[0030] The steel bars used in this experiment are 12mm diameter rebars. The method for detecting the steel bar diameter is to calculate the product of the number of pixels between the left and right boundaries of the steel bar contour image and the actual length represented by the unit pixel. In order to accurately obtain the number of pixels contained in the steel bar diameter, this paper analyzes the binary image after steel bar segmentation and uses the Canny edge detection algorithm to extract the edge contour of the steel bar. Since the steel bar is collected at different angles, the images obtained are displayed as ribbed surfaces and non-ribbed surfaces, such as Figure 6 As shown in the figure, since the steel bars of RC components have different degrees of inclination during casting, in order to eliminate the influence of steel bar inclination on diameter detection, the central axis skeleton of the steel bar is extracted, and the central axis skeleton points are linearly fitted and updated. In order to eliminate the influence of the ribbed part of the steel bar on the diameter measurement, the left and right boundary points of the steel bar are linearly fitted according to the inclination angle of the central axis skeleton, and the steel bar diameter is corrected to obtain the inner diameter of the steel bar boundary, as shown in the figure. Figure 8As shown, N1 is the number of pixels within the steel bar boundary, N is the number of pixels within the corrected steel bar boundary, α1 is the inclination angle of the steel bar, and α2 is the inclination angle of the corrected steel bar diameter. The calculation process is shown in the following formula: ; After obtaining the number of pixels on the steel bar boundary, the actual diameter of the steel bar can be calculated using the formula; ; ; ; in is the geometric magnification, is the ratio of the distance from the focus of the ray source to the flat-panel detector to the distance from the focus of the ray source to the RC specimen, and converts the unit size of the flat-panel detector into the real length represented by the unit pixel. Figure 9 As shown, the geometric magnification used in this study is 2.667. is the distance between the focus of the ray source and the object, in cm; is the distance from the focus of the ray source to the flat-panel detector, in cm; is the actual length of the unit pixel, in μm; a is the detector unit size, in μm; is the number of valid unit pixels between the inner edges of the steel bars; is the actual diameter of the steel bar, in μm.
[0031] This paper uses the HA-TransUNet model to segment X-ray images of RC component rebar, obtaining accurate rebar diameter segmentation images. Using the previously described calculation method, the diameter of the rebar segment can be calculated. Figure 7 This is a visualization of the fitted diameter of RC specimens. Using the factory label value of 12mm as the actual rebar diameter, four specimens were tested. The results show that the rebar diameter detection accuracy of each specimen reached 95.25%, 96.42%, 96.5%, and 95.67%, respectively. To further verify the accuracy of the method of the present invention, the method was compared with the Sobel edge detection operator. Traditional edge detection operators may fail to detect rebar edges when the image contrast difference is small or when the image is noisy. However, the method of the present invention, based on deep learning, can maintain high accuracy when facing different image conditions. It performs multiple diameter calculations on multiple segments of the image and selects the average value as the rebar diameter. Experiments show that the method of the present invention can achieve high-precision measurement, with an error of less than 5% from the actual diameter.
[0032] This paper proposes a HA-TransUNet segmentation network. This network enhances the TransUNet network by introducing the HDE module and the AHA module. First, the HDE module acquires high-frequency information from the image and integrates more detailed information about the edge features of the rebar. Then, the AHA module dynamically adjusts global and local information to achieve adaptive weight distribution, improving the model's rebar segmentation accuracy in reinforced concrete X-ray images. Experimental results show that the proposed network outperforms other networks and demonstrates excellent performance on the dataset, achieving 98.79% accuracy, 97.03% mIoU, 98.55% recall, and 98.19% F1 score.
[0033] To accurately fit the steel bar boundaries and precisely calculate the diameter of steel bars in RC components, this method combines deep learning and image processing. By fitting the steel bar boundaries and correcting the steel bar diameter, it demonstrates higher accuracy and robustness, achieving a steel bar diameter detection error of less than 0.6 mm and an accuracy of up to 96.5%, providing an effective method for observing steel bars inside reinforced concrete and detecting steel bar diameters.
[0034] A device for measuring the diameter of RC structural steel bars based on deep learning, comprising: Image acquisition module, acquiring X-ray images of reinforced concrete; The preprocessing module performs data enhancement on the dataset images and expands the dataset by randomly adjusting various parameters; The model inference module deploys the HA-TransUNet model, which includes an encoder, decoder, hybrid detail enhancement (HDE) module, and adaptive hybrid attention (AHA) module. It accurately segments the edges of the rebar image based on the X-ray image and outputs the segmented image. The analysis and calculation module analyzes the steel bar portion of the segmented image and calculates the calculated value of the steel bar.
[0035] Although this specification is described according to implementation methods, not every implementation method contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.
Claims
1. A method for measuring the diameter of RC structural steel bars based on deep learning, characterized in that: include: Obtain X-ray images of reinforced concrete, annotate the locations of the steel bars in the images, prepare a dataset for deep learning model training, and perform image preprocessing on the dataset images; The dataset is input into the HA-TransUNet model, which includes an encoder, a decoder, an adaptive hybrid attention module, and a hybrid detail enhancement module. Extract local detail features and global context information of the image through a hybrid encoder; By adding an adaptive hybrid attention module in the jump connection between the encoder and decoder, the feature representation is optimized to obtain the correlation between the global and local information of the feature; Enhanced image details are obtained by adding a hybrid detail enhancement module between the high-level features and low-level features of the encoder and decoder; The decoder decodes the features of the hybrid encoder to produce a segmentation result, preserving the morphological information of the steel bar part in the X-ray image; The image is input into the trained design model for segmentation, and a semantic segmentation image of the steel bar is output. The steel bar part of the segmented image is analyzed, and the steel bar boundary is fitted through image processing to calculate the corrected steel bar diameter.
2. The RC structure steel bar diameter measurement method based on deep learning according to claim 1 is characterized in that: The dataset is divided into a training set, a validation set, and a test set, and the dataset contains label images and original images; The image preprocessing of the dataset images includes expanding the dataset by randomly adjusting contrast, randomly adjusting brightness, adding noise, and performing blurring operations.
3. The RC structure steel bar diameter measurement method based on deep learning according to claim 2 is characterized in that: The HA-TransUNet model is a U-shaped encoder-decoder network based on the TransUNet model and combines the advantages of convolutional neural networks (CNNs) and Transformers. Its encoder adopts the R50-ViT-B / 16 model, integrating VisionTransformer (ViT) and ResNet50.
4. The RC structure steel bar diameter measurement method based on deep learning according to claim 3 is characterized in that: The extracting of local detail features and global context information of an image by a hybrid encoder includes: The images in the training set are input into the encoder to extract image features. The input images with a resolution of C×H×W are first subjected to local feature extraction by a deep CNN. The obtained local features are converted into a two-dimensional sequence C×N of size P×P, {N=(HW) / P²}, and input into the 12-layer VIT module. The VIT module includes multi-head self-attention and multi-layer perceptrons. These layers process the input sequence and extract the global context information of the steel bars.
5. The RC structure steel bar diameter measurement method based on deep learning according to claim 1 is characterized in that: Optimizing feature expression through the adaptive hybrid attention module to obtain the correlation between global and local feature information includes: The adaptive hybrid attention module effectively captures the detailed features in the jump connection feature maps of different stages, and promotes the interaction between them by obtaining the correlation between the global and local information of the features.
6. The RC structure steel bar diameter measurement method based on deep learning according to claim 1 is characterized in that: The adaptive hybrid attention module introduces a learnable factor α, captures global channel information through a diagonal matrix, obtains local channel information through a band matrix, and dynamically adjusts the weights of global and local information.
7. The RC structure steel bar diameter measurement method based on deep learning according to claim 6, characterized in that: In the adaptive hybrid attention module, the feature map after channel attention processing is accumulated with the initial feature map. After 1×1 convolution and activation function, the feature position weights are redistributed through the spatial attention mechanism to enhance the edge and position information of the steel bars.
8. The RC structure steel bar diameter measurement method based on deep learning according to claim 1, characterized in that: The hybrid detail enhancement module includes a hybrid differential convolution, which is composed of angular differential convolution, center differential convolution, horizontal differential convolution, vertical differential convolution, ordinary convolution and radial differential convolution in parallel. The parallel convolution layer is simplified into a single standard convolution, and the obtained differential enhanced feature is input into a 3×3 convolution, added to the initial input feature map, and then input into the serial channel and spatial attention mechanism module; then the attention feature map is multiplied element by element with the input feature map to refine the feature, and finally, it is added to the initial input feature map.
9. The method for measuring the diameter of RC structural steel bars based on deep learning according to claim 4, characterized in that: The decoder part is a cascade upsampler. The hybrid encoder reshapes the output hidden feature sequence (H×W) / P² into (H / P)×(W / P), and then passes through the cascade upsampler to restore the feature map from (H / P)×(W / P) to the original size H×W.
10. The device for measuring the diameter of RC structural steel bars based on deep learning according to any one of claims 1 to 9, characterized in that: include: Image acquisition module, acquiring X-ray images of reinforced concrete; The preprocessing module performs data enhancement on the dataset images and expands the dataset by randomly adjusting various parameters; The model inference module deploys the HA-TransUNet model, which includes an encoder, decoder, hybrid detail enhancement module, and adaptive hybrid attention module. It accurately segments the edges of the steel bar image based on the X-ray image and outputs the segmented image. The analysis and calculation module analyzes the steel bar portion of the segmented image and calculates the steel bar value.
Citation Information
Patent Citations
Method for testing corrosion of reinforcing steel bar inside concrete sample
CN104502379A
X-ray detection method for double-sided superimposed shear wall interlayer vertical steel bar connection quality
CN111189858A
InSAR interference image phase unwrapping method based on U-net
CN112381172A
Reinforcing steel bar distance detection method based on depth estimation model
CN115222788A
Radar intelligent identification method for bridge reinforcing steel bars
CN115310482A