Concrete test block water seepage detection method based on computer vision

By improving the Backbone layer of the YOLOv8 model and adding the C2f_IC module to perform deformable convolution, the problem of insufficient perception and characterization of different size shape targets is solved, and the accuracy and efficiency of water seepage detection of concrete test blocks is significantly improved.

CN119850575APending Publication Date: 2025-04-18JIANGSU ZHONGJI ENG & TECH RES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411966189.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

When the existing YOLOv8 model deals with targets of different sizes and shapes, the perception and characterization capabilities are weak, resulting in an increase in the probability of false detection and missed detection of concrete test block seepage detection and a decrease in the detection effect.

Method used

Improve the Backbone layer of the YOLOv8 model, add the C2f_IC module, form an offset field through the bypass convolution kernel, and perform deformable convolution on the feature map, improving the model's perception and characterization ability of the shape targets of different sizes.

Benefits of technology

Through the improved YOLOv8 model, the accuracy of water seepage detection of concrete test blocks is significantly improved, the probability of false detection and missed detection is reduced, and the detection efficiency and effect are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119850575A_ABST
    Figure CN119850575A_ABST
Patent Text Reader

Abstract

The invention relates to a concrete test block water seepage detection method based on computer vision. S1, acquiring a picture of a concrete test block to be detected through a camera; and S2, detecting the to-be-detected concrete test block picture output in the step S1 through a target detection model based on a YOLOv8 network, and outputting a water seepage detection result. According to the concrete test block water seepage detection method based on computer vision, an IC module is introduced into a Bottleneck module of an existing YOLOv8 network, so that the variable convolution function of an input feature map is achieved, the capacity of sensing and representing detected targets of different sizes and shapes of the model is improved, and the precision and effect of water seepage detection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a concrete test block water seepage detection method, in particular to a concrete test block water seepage detection method based on computer vision. Background Art

[0002] At present, the level of digitization of equipment in the testing and inspection industry is relatively low, which is mainly reflected in the low level of intelligence of instruments and equipment. The test and inspection results are greatly affected by human judgment, resulting in inaccurate judgment of test results and unreliable test conclusions, which has a negative impact on the social credibility of the testing and inspection industry.

[0003] In the past 20 years, with the rapid development of deep learning technology and the widespread popularity of hardware computing devices such as graphics processors, deep learning technology has been applied to almost all fields of computer vision, such as target detection, image segmentation, super-resolution reconstruction and face recognition, and has immeasurable commercial value and broad application prospects in products such as image search, autonomous driving, user behavior analysis, text recognition, virtual reality and lidar. Computer vision based on deep learning technology can also have a profound impact on the field of concrete testing and detection, realizing automatic recognition and automatic judgment in the process of concrete testing and detection, and improving the accuracy of detection results.

[0004] The YOLOv8 model is mainly used in the concrete experimental detection based on deep learning technology to realize the automatic screening and processing of the inspected images. The existing YOLOv8 model has relatively weak perception and representation capabilities for targets of different sizes and shapes, which greatly increases the probability of false detection and missed detection when processing targets, thereby reducing the effect of concrete block water seepage detection. Summary of the invention

[0005] In order to solve the above technical problems, the present invention provides a computer vision-based concrete test block water seepage detection method based on an improved YOLOv8 model to improve the perception and characterization capabilities of inspected targets of different sizes and shapes.

[0006] The computer vision-based concrete test block water seepage detection method of the present invention comprises the following steps: S1: Collect the image of the concrete block to be inspected through the camera; S2: Detect the concrete test block image to be inspected outputted in step S1 through the target detection model based on the YOLOv8 network, and output the water seepage detection result; The YOLOv8 network includes a Backbone layer, a Neck layer and a Head layer; The Backbone layer includes a CBS module at the head, three groups of CBS and C2f modules arranged in sequence, and an SPPF module at the tail, wherein the CBS and C2f modules include CBS modules and C2f modules connected in sequence; The C2f module is an improved C2f module, namely, a C2f_IC module; The C2f_IC module includes a CBS module. The feature map output by the CBS module is split into a first feature map group and a second feature map group by a Split module. The first feature map group is processed by several improved BottleNeck modules, namely, the BottleNeck_IC module, and then output to a Concat module with the second feature map group, and fused by the Concat module. The Concat module outputs to the CBS module at the end of the module. The BottleNeck_IC module includes at least two groups of deformation modules connected in sequence, and the deformation module includes a Conv module, an IC module, a BN module and a SiLu module connected in sequence; The IC module includes a bypass convolution kernel of N*N*2C, where N is the size of the bypass convolution kernel, and C is the number of channels of the input feature map. The IC module performs bypass convolution on the input feature map through the bypass convolution kernel to obtain a W*H*2C offset field, which is a three-dimensional matrix, where the values ​​of W and H are the width and height of the input feature map, respectively, and 2C is the depth of the offset field; The target detection model performs coordinate shifting on the original feature map through the offset field to obtain the offset feature map. The offset method is described as follows; For each channel feature map, two sets of plane matrices corresponding to the channel feature map are sequentially obtained along the offset field depth direction; For a certain coordinate point in the channel feature map, the values ​​at the corresponding positions in the two plane matrices are obtained and used as the X offset value and the Y offset value respectively; Sequentially add the X offset value and the Y offset value to the X coordinate value and the Y coordinate value of the corresponding pixel in the feature map to obtain the position of the original pixel after the offset in the feature map; The pixel value at the offset position in the feature map is obtained as the pixel value at the offset feature map position, thereby forming a new offset feature map.

[0007] The advantage of the concrete block water seepage detection method based on computer vision is that it automatically detects the inspected image collected by the camera through the target detection model based on the YOLOv8 network, thereby greatly improving the efficiency and effect of water seepage detection. Compared with the conventional YOLOv8 network, the Banckbone layer of the target detection model has an IC module containing a bypass convolution kernel in its C2f module to offset the input feature map, thereby realizing deformable convolution of the feature map, improving the model's adaptability to the deformation of the inspected object, and thus greatly improving the accuracy of detection.

[0008] Furthermore, in the concrete test block water seepage detection method based on computer vision of the present invention, the Neck layer includes several PWM modules, namely weight perception modules, which include a Step1 module and a Step2 module, the Step1 module includes a multilayer perceptron MLP, the input feature map is respectively input into the multilayer perceptron through maximum pooling and average pooling, the two result maps output by the multilayer perceptron are spliced ​​through the Concat module, and the activated feature map is output through the activation function, and the activated feature map is multiplied by the original input feature map to obtain the feature map M1; The Step2 module includes a Concat module and a Conv module connected in sequence. The feature map M1 is input into the Concat module for splicing after passing through the maximum pooling and the average pooling, and then convolved through the Conv module and activated by the activation function, and finally outputs the feature map M2; The characteristic graph M1 is multiplied by the characteristic graph M2 to obtain an output characteristic graph of the PWM module.

[0009] In this design, a PWM module is introduced in the Neck layer, which enables the model to assign different weights to different positions or channels, so as to pay more attention to the key areas and features in the image, thereby improving the model's perception ability.

[0010] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention and implement it in accordance with the contents of the specification, the embodiments of the present invention are described in detail below. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 This is the network structure diagram of the target detection model based on the YOLOv8 network.

[0012] Figure 2 This is the network structure diagram of the C2f module.

[0013] Figure 3 This is the network structure diagram of the Bottleneck_IC module.

[0014] Figure 4This is the network structure diagram of the PWM module.

[0015] Figure 5 This is the network structure diagram of the Step1 module.

[0016] Figure 6 This is the network structure diagram of the Step2 module.

[0017] Figure 7 It is the training flow chart of the target detection model. DETAILED DESCRIPTION

[0018] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0019] Example 1: See Figures 1 to 7 , the concrete test block water seepage detection method based on computer vision of this embodiment includes the following steps; S1: Collect the image of the concrete block to be inspected through the camera; S2: Detect the concrete test block image to be inspected outputted in step S1 through the target detection model based on the YOLOv8 network, and output the water seepage detection result; The YOLOv8 network includes a Backbone layer, a Neck layer and a Head layer; The Backbone layer includes a CBS module at the head, three groups of CBS and C2f modules arranged in sequence, and an SPPF module at the tail, wherein the CBS and C2f modules include CBS modules and C2f modules connected in sequence; The C2f module is an improved C2f module, namely, a C2f_IC module; The C2f_IC module includes a CBS module. The feature map output by the CBS module is split into a first feature map group and a second feature map group by a Split module. The first feature map group is processed by several improved BottleNeck modules, namely, the BottleNeck_IC module, and then output to a Concat module with the second feature map group, and fused by the Concat module. The Concat module outputs to the CBS module at the end of the module. The BottleNeck_IC module includes at least two groups of deformation modules connected in sequence, and the deformation module includes a Conv module, an IC module, a BN module and a SiLu module connected in sequence; The IC module includes a bypass convolution kernel of N*N*2C, where N is the size of the bypass convolution kernel, and C is the number of channels of the input feature map. The IC module performs bypass convolution on the input feature map through the bypass convolution kernel to obtain a W*H*2C offset field, which is a three-dimensional matrix, where the values ​​of W and H are the width and height of the input feature map, respectively, and 2C is the depth of the offset field; The target detection model performs coordinate shifting on the original feature map through the offset field to obtain the offset feature map. The offset method is described as follows; For each channel feature map, two sets of plane matrices corresponding to the channel feature map are sequentially obtained along the offset field depth direction; For a coordinate point X, Y in the channel feature map, the values ​​at the corresponding positions in the two plane matrices are obtained and used as the X offset value and the Y offset value respectively; Sequentially add the X offset value and the Y offset value to the X coordinate value and the Y coordinate value of the corresponding pixel in the feature map to obtain the position of the original pixel after the offset in the feature map; The pixel value at the offset position in the feature map is obtained as the pixel value at the X, Y position of the offset feature map, thereby forming a new offset feature map.

[0020] The advantage of the concrete block water seepage detection method based on computer vision is that it automatically detects the inspected image collected by the camera through the target detection model based on the YOLOv8 network, thereby greatly improving the efficiency and effect of water seepage detection. Compared with the conventional YOLOv8 network, the Banckbone layer of the target detection model has an IC module containing a bypass convolution kernel in its C2f module to offset the input feature map, thereby realizing deformable convolution of the feature map, improving the model's adaptability to the deformation of the inspected object, and thus greatly improving the accuracy of detection.

[0021] Among them, the Backbone layer contains several CBS modules (convolution blocks), C2f_IC modules and the SPPF module (fast spatial pyramid pooling module) at the output end. The C2f_IC module is used to realize the functions of feature extraction, enhancement and fusion, so as to provide rich feature representation for the subsequent detection and classification of the Bottleneck and head modules.

[0022] The C2f_IC module includes a CBS module, a Split module (segmentation module), several Bottleneck_IC modules, a Concat module (fusion / splicing module) and a CBS module at the output end, which are connected in sequence.

[0023] The Split module is used to split the original feature map into a first feature map group and a second feature map group, and the sum of the number of channels of the first feature map group and the second feature map group is the sum of the number of channels of the original feature map.

[0024] Bottleneck_IC is used to reduce the computational complexity and number of parameters while retaining the performance of the model. Compared with the existing model, it adds an IC module to form a shifted feature map, thereby realizing deformable convolution of the original feature map and improving the model's perception of the target shape. During the shift, it convolves the input feature map through the bypass convolution kernel to form a W*H*2C offset field. The model applies the offset field to the original feature map to offset each coordinate of the original feature map, thereby forming a shifted feature map. Specifically, each two values ​​of the offset field corresponding to the feature map are used as offset values, and are added to the X-coordinate value and Y-coordinate value of the corresponding pixel in the feature map, respectively, to obtain the position of the original pixel after the shift in the feature map. Since the offset value may be a decimal, the model can obtain the pixel value through the corresponding method, such as obtaining the nearest pixel value, bilinear difference, etc. The specific method is a conventional means and will not be repeated here. After obtaining the offset feature map, the subsequent convolution module convolves the offset feature map according to the original convolution method, thereby realizing the variable convolution function. Among them, the size of the bypass convolution kernel is the same as the size of the subsequent convolution kernel.

[0025] Preferably, the Neck layer includes several PWM modules, namely, weight perception modules, which include a Step1 module and a Step2 module. The Step1 module includes a multilayer perceptron MLP. The input feature map is input into the multilayer perceptron after maximum pooling and average pooling respectively. The two result maps output by the multilayer perceptron are spliced ​​through a Concat module, and the activated feature map is output through an activation function. The activated feature map is multiplied by the original input feature map to obtain a feature map M1. The Step2 module includes a Concat module and a Conv module connected in sequence. The feature map M1 is input into the Concat module for splicing after passing through the maximum pooling and the average pooling, and then convolved through the Conv module and activated by the activation function, and finally outputs the feature map M2; The characteristic graph M1 is multiplied by the characteristic graph M2 to obtain an output characteristic graph of the PWM module.

[0026] In the Neck layer, the PWM module is located at the input side of the Upsample module or the output side of the C2f module.

[0027] In this design, a PWM module is introduced in the Neck layer, which enables the model to assign different weights to different positions or channels, so as to pay more attention to the key areas and features in the image, thereby improving the model's perception ability.

[0028] The weight-aware module processes the input feature map through the following steps; Step 1: Perform maximum pooling and average pooling on the input feature map to obtain two feature maps. The two feature maps are input into the multi-layer perceptron MLP. The two result maps output by the multi-layer perceptron are added and activated by the activation function to obtain the activated feature map. The activated feature map is multiplied by the original feature map to obtain the feature map M1. The formula is as follows;

[0029]

[0030] Where F is the input feature map, AvgPool is the average pooling operation, MaxPool is the maximum pooling operation, σ is the activation function, which can be the Sigmod activation function, and W1 and W0 are the connection weights of the multilayer perceptron MLP respectively; Step 2: Perform maximum pooling and average pooling on the output of step 1 to obtain two feature maps of the same size. Connect the two feature maps, and then convert them into a 1-channel feature map through a 7*7 convolution. Then, pass the Sigmod activation function to generate the feature map M2 of the module. The formula is as follows; ; Where f is the convolution operation; Step 3: Multiply the result M1 of the first step by the result M2 of the second step to get the final output result M p .

[0031] The above-mentioned object detection model based on the YOLOv8 network is trained through the following steps; S1: Use a camera to collect and screen concrete test block images, select test block images containing water seepage to build a high-resolution concrete water seepage test block dataset.

[0032] S2: Import the dataset obtained in S1 into the YOLOv8 target detection model for training. First, enter the Backbone layer and improve the convolution of this layer so that the convolution can adapt to targets of different shapes and sizes, thereby improving the detection accuracy of the model.

[0033] S3: Enters the Neck layer of the model, which introduces a perceptual weight mechanism so that the model assigns different weights to different positions and channels, thereby paying more attention to the key areas and features of the image.

[0034] S4: Enter the Head layer of the model, where object segmentation is performed.

[0035] Specifically, this layer generates three feature maps for predicting Box (1,64,80,80, (1,64,40,40, (1,64,20,20, and three feature maps for predicting CLs (1,nc,80,80, (1,nc,40,40 and (1,nc,20,20, and three feature maps used as Mask coefficients mask_coefficients (1,32,80,80, (1,32,40,40, (1,32,20,20, and a Prototype Mask feature map of size (1,32,80,80) is generated from the 80*80 scale feature map as the feature map of native segmentation.

[0036] S5: Calculate the classification loss function VFL, and determine whether the accuracy requirement is met based on the result of VFL. If so, retain the model, otherwise continue model training.

[0037] Specifically, VFL uses the cross entropy loss function to calculate the classification loss, and compares the difference between the category probability output by the model and the true label to measure the classification accuracy of the model. The specific principle is the existing technology in this field. For details, please refer to relevant literature and will not be repeated here.

[0038] The above is only a preferred embodiment of the present invention, which is used to assist those skilled in the art to implement the corresponding technical solution, and is not used to limit the scope of protection of the present invention. The scope of protection of the present invention is defined by the attached claims. It should be pointed out that for those of ordinary skill in the art, on the basis of the technical solution of the present invention, several equivalent improvements and variations can be made, and these improvements and variations should also be regarded as the scope of protection of the present invention. At the same time, it should be understood that although this specification is described in accordance with the above-mentioned embodiments, not every embodiment 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 of each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A method for detecting water seepage of a concrete test block based on computer vision, comprising the following steps; S1: Collect the image of the concrete block to be inspected through the camera; S2: Detect the concrete test block image to be inspected outputted in step S1 through the target detection model based on the YOLOv8 network, and output the water seepage detection result; The YOLOv8 network includes a Backbone layer, a Neck layer and a Head layer; The Backbone layer includes a CBS module at the head, three groups of CBS and C2f modules arranged in sequence, and an SPPF module at the tail, wherein the CBS and C2f modules include CBS modules and C2f modules connected in sequence; It is characterized in that: the C2f module is an improved C2f module, that is, a C2f_IC module; The C2f_IC module includes a CBS module. The feature map output by the CBS module is split into a first feature map group and a second feature map group by a Split module. The first feature map group is processed by several improved BottleNeck modules, namely, the BottleNeck_IC module, and then output to a Concat module with the second feature map group, and fused by the Concat module. The Concat module outputs to the CBS module at the end of the module. The BottleNeck_IC module includes at least two groups of deformation modules connected in sequence, and the deformation module includes a Conv module, an IC module, a BN module and a SiLu module connected in sequence; The IC module includes a bypass convolution kernel of N*N*2C, where N is the size of the bypass convolution kernel, and C is the number of channels of the input feature map. The IC module performs bypass convolution on the input feature map through the bypass convolution kernel to obtain a W*H*2C offset field, which is a three-dimensional matrix, where the values ​​of W and H are the width and height of the input feature map, respectively, and 2C is the depth of the offset field; The target detection model performs coordinate shifting on the original feature map through the offset field to obtain the offset feature map. The offset method is described as follows; For each channel feature map, two sets of plane matrices corresponding to the channel feature map are sequentially obtained along the offset field depth direction; For a coordinate point (X, Y) in the channel feature map, obtain the values ​​at the corresponding positions in the two plane matrices and use them as the X offset value and the Y offset value respectively; Sequentially add the X offset value and the Y offset value to the X coordinate value and the Y coordinate value of the corresponding pixel in the feature map to obtain the position of the original pixel after the offset in the feature map; The pixel value at the offset position in the feature map is obtained as the pixel value at the position (X, Y) of the offset feature map, thereby forming a new offset feature map.

2. The method for detecting water seepage of concrete test blocks based on computer vision according to claim 1, characterized in that: The Neck layer includes several PWM modules, namely, weight perception modules, which include a Step1 module and a Step2 module. The Step1 module includes a multilayer perceptron MLP. The input feature map is input into the multilayer perceptron after maximum pooling and average pooling respectively. The two result maps output by the multilayer perceptron are spliced ​​through a Concat module, and the activated feature map is output through an activation function. The activated feature map is multiplied with the original input feature map to obtain a feature map M1; The Step2 module includes a Concat module and a Conv module connected in sequence. The feature map M1 is input into the Concat module for splicing after passing through the maximum pooling and the average pooling, and then convolved through the Conv module and activated by the activation function, and finally outputs the feature map M2; The characteristic graph M1 is multiplied by the characteristic graph M2 to obtain an output characteristic graph of the PWM module.