Waterproof roll low-temperature flexibility detection method based on image recognition
Through the low-temperature flexibility detection method of waterproof coil material based on image recognition, the bending detector and crack detection submodule combined with high-frequency and airspace feature extraction, the accuracy problem of crack recognition in the low-temperature flexibility detection of waterproof coil material in the prior art is solved. Achieve more efficient detection accuracy and resource conservation.
Patent Information
- Application Number
- CN202410958759.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-07-17
AI Technical Summary
The existing low-temperature flexibility detection methods for waterproof coils cannot accurately and quickly identify coil cracks. They are affected by light conditions and human factors, resulting in deviations in judging micro cracks.
Using the low-temperature flexibility detection method of waterproof coil based on image recognition, by obtaining the images after the low-temperature flexibility test, the trained waterproof coil crack detection model is used, including the bending detection submodule and the crack detection submodule, combined with high-frequency feature extraction, Airspace feature extraction and frequency domain airspace feature mixing to detect cracks at bending, reduce misdetection and improve detection accuracy.
The accuracy of crack detection at the bending of waterproof coils is improved, and false detection is reduced due to random texture or material inhomogeneity is reduced, computing resources and time is saved, the detection ability of small cracks is enhanced, and the detection effect is improved.
Smart Images

Figure CN118918075A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent image recognition, and in particular to a low-temperature flexibility detection method for waterproof coiled materials based on image recognition. Background Art
[0002] With the development of modern architecture, waterproofing membranes are increasingly used in building waterproofing fields such as roofs and basements. However, in some severely cold areas, low temperature environments will have a certain negative impact on the use of waterproofing membranes. In low temperature environments, the flexibility of waterproofing membranes will deteriorate, and they are prone to cracking and breaking, which will affect their service life and performance. In order to ensure the service life and performance of waterproofing membranes, low temperature flexibility tests must be performed on them. Low temperature flexibility tests mainly simulate the actual situation in low temperature environments, and perform bending, stretching and other tests on waterproofing membranes to evaluate their flexibility and toughness at low temperatures.
[0003] After the existing low-temperature flexibility testing equipment for waterproof membranes has completed the testing according to the standards, the testing personnel take out the samples of the waterproof membranes and use the naked eye to determine whether the membranes are cracked, thereby determining whether the inspection batch is qualified. Since the low-temperature flexibility of waterproof membranes is an important performance indicator of waterproof membranes, there is a large demand for laboratory and construction site testing during engineering construction. Due to the limitations of laboratory on-site light test conditions and the influence of human fatigue factors, the judgment of tiny cracks is often biased. Summary of the invention
[0004] In view of the above analysis, an embodiment of the present invention aims to provide a low-temperature flexibility detection method for waterproof membranes based on image recognition, so as to solve the problem that cracks in existing waterproof membranes cannot be accurately and quickly identified after low-temperature flexibility detection.
[0005] The purpose of the present invention is mainly achieved through the following technical solutions:
[0006] The present invention provides a method for detecting low-temperature flexibility of waterproof coiled materials based on image recognition, comprising the following steps:
[0007] Acquire images of multiple waterproofing membrane samples that have undergone low temperature flexibility testing;
[0008] Input each image into the trained waterproof coiled material crack detection model to perform crack detection at the bending part, and obtain crack information at the bending part of each sample; wherein the waterproof coiled material crack detection model includes a bending detection submodule and a crack detection submodule; the bending detection submodule is used to detect the bending part in the sample; and the crack detection submodule is used to detect crack information at the bending part;
[0009] When the number of samples with cracks exceeds a preset value, the low-temperature flexibility test is judged to be unqualified.
[0010] Furthermore, the crack detection submodule includes a high-frequency feature extraction module, a spatial feature extraction module, and a frequency-domain spatial feature mixing module;
[0011] The image of the bending part is respectively passed through the high-frequency feature extraction module and the spatial feature extraction module of the crack detection submodule to obtain high-frequency features and RGB features of different scales of the image of the bending part;
[0012] After the high-frequency features and the RGB features of the same scale are fused in the frequency domain and spatial domain feature mixing module of the crack detection submodule, the crack information in the image of the bending portion in the image is output through the crack detection head.
[0013] Furthermore, the high-frequency features and the RGB features are fused in a frequency domain and spatial domain feature mixing module of the crack detection submodule, including:
[0014] The high frequency feature and the RGB feature are matrix multiplied to obtain a mixed frequency domain feature;
[0015] The mixed frequency domain feature is matrix-multiplied with the high frequency feature and the RGB feature respectively to obtain a high frequency enhancement feature and an RGB enhancement feature;
[0016] Performing matrix addition on the high-frequency enhancement feature and the RGB feature to obtain a high-frequency enhancement-RGB fusion feature;
[0017] Performing matrix addition on the RGB enhancement feature and the high-frequency feature to obtain an RGB enhancement-high-frequency fusion feature;
[0018] The high-frequency enhancement-RGB fusion feature and the RGB enhancement-high-frequency fusion feature are fused through matrix channels to obtain a fusion feature.
[0019] Furthermore, the image of the curved part of the image is sequentially passed through the backbone network layer and the multi-scale feature fusion layer of the spatial feature extraction module to obtain RGB features of different scales; wherein the multi-scale feature fusion layer includes three target detection layers of different scales.
[0020] Furthermore, in the high-frequency feature extraction module, the image of the curved part of the image is converted from the spatial domain to the frequency domain through discrete cosine transformation, and then the high-frequency area weight of the image is increased through a filter to obtain a high-frequency enhanced image; the high-frequency enhanced image is restored to the spatial domain through inverse discrete cosine transformation and then passed through three convolution layers respectively to obtain high-frequency features of three different scales.
[0021] Furthermore, the waterproof membrane crack detection model is trained by the following method:
[0022] Constructing a bending detection training data set and a crack detection training data set respectively; wherein the bending detection training data set includes sample images and annotated bending detection frames; and the crack detection training data set includes annotated images in the bending detection frames and corresponding crack information;
[0023] Loading the bending detection training data set to train the bending detection submodule to obtain a trained bending detection submodule;
[0024] Pre-training the backbone network of the spatial feature extraction module of the crack detection submodule based on contrastive learning to obtain a pre-trained backbone network;
[0025] Loading the crack detection training data set to train the crack detection submodule including the pre-trained backbone network to obtain a trained crack detection submodule;
[0026] Based on the trained bending detection submodule and the trained crack detection submodule, a trained waterproof membrane crack detection model is obtained.
[0027] Furthermore, the backbone network of the spatial feature extraction module of the crack detection submodule is pre-trained based on contrastive learning to obtain a crack detection basic backbone network, including:
[0028] Constructing several training data groups, each training data group includes several training sample pairs; wherein the training sample pairs include a positive sample and a negative sample; the positive samples in each training data group are pictures of the same crack area, and the negative samples are different pictures of the crack-free area;
[0029] For each training data group, the training sample pairs are loaded, and the backbone network of the spatial feature extraction module of the crack detection submodule is trained using the contrast loss function. The backbone network parameters of the spatial feature extraction module are updated using gradient back propagation. After the training is completed, the backbone network parameters of the spatial feature extraction module are saved.
[0030] Furthermore, the negative samples in each training data set include a number of crack-free area images of the same size as the positive samples and two images of the same size as the positive samples extracted from both sides of the long side of the positive samples.
[0031] Further, the loading of the bend detection training data set to train the bend detection submodule to obtain a trained bend detection submodule includes: loading the bend detection training data set, using a combination of a bounding box intersection-over-union loss function, a classification loss function, and a distribution focal length loss function to train the bend detection submodule, and using a stochastic gradient descent method to perform back propagation to update parameters of the bend detection submodule to obtain a trained bend detection submodule;
[0032] The method of loading the crack detection training data set to train a crack detection submodule of a pre-trained backbone network to obtain a trained crack detection submodule includes: loading the crack detection training data set, using a combination of a bounding box small target detection loss function, a classification loss function, and a distribution focal length loss function to train the crack detection submodule, and using a stochastic gradient descent method to perform back propagation to update parameters of the crack detection submodule to obtain a trained crack detection submodule.
[0033] Furthermore, the structure of the bending detection submodule is a YOLOv9 model structure.
[0034] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:
[0035] 1. For waterproof roll materials, cracks usually appear at the bends of the waterproof roll materials. The waterproof roll material crack detection model of the present invention first uses the bend detection submodule to detect the bends of the waterproof roll materials, and then uses the crack detection submodule to further determine whether there are cracks. Compared with directly performing crack detection on the waterproof roll material image, it is more targeted and can improve the detection accuracy of these areas.
[0036] 2. The waterproof membrane crack detection model of the present invention uses a bending detection submodule to detect the bending parts of the waterproof membrane, which can reduce the detection in areas where no cracks appear, thereby reducing false detections due to random textures or material inhomogeneities, and reducing the image range that requires high-resolution detection, thereby saving computing resources and time.
[0037] 3. Since for industrial scenarios, samples of waterproof membranes are usually unbalanced, that is, the number of samples of normal waterproof membranes is much larger than the number of samples of cracks in waterproof membranes, the present invention performs a pre-training method based on comparative learning on the backbone network layer of the crack detection submodule of the waterproof membrane crack detection model when training the crack detection submodule of the waterproof membrane crack detection model, so that the backbone network layer of the crack detection submodule learns the intra-class consistency and extra-class difference feature representation of the waterproof membrane cracks, thereby improving the detection effect of the waterproof membrane crack detection model and reducing model overfitting.
[0038] 4. When the present invention constructs a pair of pre-trained training samples based on contrastive learning for the backbone network layer of the crack detection submodule of the waterproof membrane crack detection model, the negative samples include two pictures with the same size as the positive samples extracted from both sides of the long side of the positive sample in the same training data group. By selecting areas similar to the crack area but actually containing no cracks as negative samples, the model can learn the subtle differences between cracks and normal areas, enhance the difference in features, and more accurately identify crack areas.
[0039] 5. In the crack detection submodule of the waterproof roll material crack detection model of the present invention, high-frequency feature information that is difficult to detect in the RGB space in the roll material image is extracted, which can better identify the existence of cracks and enhance the characteristic expression of small cracks, thereby improving the model's detection ability for small cracks.
[0040] In the present invention, the above-mentioned technical solutions can also be combined with each other to achieve more preferred combination solutions. Other features and advantages of the present invention will be described in the subsequent description, and some advantages can become obvious from the description, or can be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained through the contents particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The drawings are only for the purpose of illustrating particular embodiments and are not to be considered limiting of the present invention. Like reference symbols denote like components throughout the drawings.
[0042] Figure 1 It is a schematic flow chart of a method for detecting low-temperature flexibility of waterproof coiled material based on image recognition in an embodiment of the present invention;
[0043] Figure 2 It is a structural schematic diagram of a waterproof membrane crack detection model in an embodiment of the present invention;
[0044] Figure 3 Schematic diagram of the structure of the bending detection submodule of the waterproof coiled material crack detection model in an embodiment of the present invention;
[0045] Figure 4 It is a structural schematic diagram of the backbone network of the bending detection submodule of the waterproof coiled material crack detection model in an embodiment of the present invention;
[0046] Figure 5 Schematic diagram of the structure of the multi-scale feature fusion layer of the bending detection submodule of the waterproof coiled material crack detection model in an embodiment of the present invention;
[0047] Figure 6 It is a structural schematic diagram of a bending detection head of a bending detection submodule of a waterproof coiled material crack detection model in an embodiment of the present invention;
[0048] Figure 7 Schematic diagram of the structure of the crack detection submodule of the waterproof membrane crack detection model in the embodiment of the present invention;
[0049] Figure 8 It is a flow chart of a frequency domain and spatial domain feature mixing module of a crack detection submodule of a waterproof coiled material crack detection model in an embodiment of the present invention;
[0050] Fig. 9Schematic diagram of the training process of the waterproof membrane crack detection model in an embodiment of the present invention;
[0051] Fig.10 It is a schematic structural diagram of a multi-level auxiliary information layer, an auxiliary reversible branch and an auxiliary detection head of a bending detection submodule of a waterproof coiled material crack detection model in an embodiment of the present invention. DETAILED DESCRIPTION
[0052] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.
[0053] A specific embodiment of the present invention discloses a method for detecting low temperature flexibility of waterproof coiled material based on image recognition function, such as Figure 1 As shown, the steps S1 to S3 are included:
[0054] Step S1, obtaining images of a plurality of waterproof membrane samples that have undergone a low-temperature flexibility test.
[0055] Specifically, after the low-temperature flexibility test of the waterproof membrane is performed, a plurality of samples of the waterproof membrane are photographed by an industrial camera to obtain images containing surface information of the waterproof membrane.
[0056] Step S2, input each image into the trained waterproof membrane crack detection model to perform crack detection on the bending part, and obtain crack information on the bending part of each sample; wherein the waterproof membrane crack detection model includes a bending detection submodule and a crack detection submodule; the bending detection submodule is used to detect the bending part in the sample; and the crack detection submodule is used to detect crack information on the bending part.
[0057] Specifically, the model structure of the waterproof membrane crack detection model is as follows: Figure 2 shown.
[0058] For waterproof membranes, cracks usually appear at the bends of the waterproof membranes. In this embodiment, the bends of the waterproof membranes are first detected, and then crack detection is performed on the image of the bends to further determine whether cracks exist. This makes crack detection more targeted, and focusing detection resources on the bends of the waterproof membranes can improve the detection accuracy of these areas. At the same time, detection in areas without cracks is reduced, thereby reducing false detections caused by random textures or material unevenness.
[0059] Furthermore, the structure of the bending detection submodule is a YOLOv9 model structure, such as Figure 3 As shown, it includes: input layer, backbone network, multi-scale feature fusion layer and bending detection head.
[0060] Specifically, the input layer is used to preprocess the image of the waterproof coiled material sample, and the preprocessing includes image denoising and image enhancement.
[0061] Among them, the image denoising uses the ZS-N2N denoising algorithm based on convolutional neural networks. Compared with traditional filtering denoising methods such as mean filtering algorithm and Gaussian filtering algorithm, traditional methods have great limitations in dealing with complex noise, retaining image details and adapting to noise of different scales. The filtering denoising algorithm based on convolutional neural networks can automatically learn noise characteristics, effectively model noise, maximize the retention of original image information, and improve image quality.
[0062] In order to solve the problem of low contrast between the crack area of waterproof coiled material and the background, this application adopts the image enhancement method of histogram equalization to improve the image contrast. This method redistributes the grayscale values of the original image, expands the grayscale values that account for a smaller proportion in the image, and compresses the grayscale values that account for a larger proportion, so that the image grayscale is evenly distributed. After histogram equalization, the contrast between the crack target area and the background is higher, the details of the image are clearer, and the entire image has more semantic information, which will help improve the accuracy of crack defect detection.
[0063] The backbone network, such as Figure 4 As shown in the figure, it is used to extract features from the preprocessed image and convert the image into a feature representation with rich semantic information. Among them, the Silence layer is used to pass the input information to the backbone network; the Conv layer is a convolutional layer, which is used to extract local features of the image; the GELAN layer is an efficient attention network layer, which is used to enhance the ability of feature extraction and improve the accuracy of target detection; the Adown layer is a downsampling layer, which is used to reduce the input vector by one half before passing it to the next layer.
[0064] The multi-scale feature fusion layer, such as Figure 5 As shown, it includes small target detection layer, medium target detection layer and large target detection layer. Each layer focuses on detail information of different sizes and is used to fuse the features from the backbone network.
[0065] The bending detection head, such as Figure 6 As shown, it includes a bounding box regressor (Box) and a classifier (Cls), which are used to output a prediction box and a prediction label for the target detection layer output by the multi-scale feature fusion layer. It should be noted that, in this embodiment, the multi-scale feature fusion layer of the bending detection submodule includes three target detection layers. Therefore, the bending detection submodule also has three bending detection heads, which respectively predict the features output by target detection layers of different scales.
[0066] It should be noted that, among the detection frames output by the bending detection submodule, after removing the prediction frames with confidence lower than 0.25, the detection frames with higher overlap are removed by non-maximum suppression, and finally the label with the highest category confidence is selected as the classification label of the prediction frame to obtain a picture of the bending part of the waterproof membrane.
[0067] Further, such as Figure 7 As shown, the crack detection submodule includes a high-frequency feature extraction module, a spatial domain feature extraction module and a frequency domain and spatial domain feature mixing module.
[0068] The image of the bending part is respectively passed through the high-frequency feature extraction module and the spatial feature extraction module of the crack detection submodule to obtain high-frequency features of different scales and RGB features of different scales of the image of the bending part.
[0069] After the high-frequency features and the RGB features of the same scale are fused in the frequency domain and spatial domain feature mixing module of the crack detection submodule, the crack information in the image of the bending portion in the image is output through the crack detection head.
[0070] Specifically, there are many feature information in the frequency domain information of the waterproof membrane crack image that are difficult to detect in the RGB space. It is far from enough for the model to rely solely on the RGB spatial domain information of the waterproof membrane image. For example, when a crack appears on the waterproof membrane, there will definitely be a frequency transformation from a low-frequency signal of a smooth image to a high-frequency signal of a sharp deformation in the vertical direction of the crack, and it is difficult to perceive this signal transformation in the RGB space.
[0071] Furthermore, the image of the curved part of the image is sequentially passed through the backbone network layer and the multi-scale feature fusion layer of the spatial feature extraction module to obtain RGB features of different scales; wherein the multi-scale feature fusion layer includes three target detection layers of different scales.
[0072] Specifically, the spatial feature extraction module uses the YOLOv9 model with the input layer and detection head removed, including the backbone network and the multi-scale feature fusion layer.
[0073] Furthermore, in the high-frequency feature extraction module, the image of the curved part of the image is converted from the spatial domain to the frequency domain through discrete cosine transformation, and then the high-frequency area weight of the image is increased through a filter to obtain a high-frequency enhanced image; the high-frequency enhanced image is restored to the spatial domain through inverse discrete cosine transformation and then passed through three convolution layers respectively to obtain high-frequency features of three different scales.
[0074] Specifically, the discrete cosine transform is a mathematical transformation used to convert signals from the spatial domain to the frequency domain, and can decompose the image into different frequency components. The filter is used to increase the weight of the high-frequency area of the image and reduce the weight of the low-frequency area of the image to highlight the detailed features such as cracks in the image. The inverse discrete cosine transform is the inverse process of the discrete cosine transform, and is used to convert the processed frequency domain data back to the spatial domain.
[0075] It should be noted that the three high-frequency features of different scales obtained by the three convolutional layers correspond one-to-one to the three-scale RGB features output by the spatial feature extraction module, and are used for feature fusion in the frequency domain and spatial domain feature mixing module. For example, the three scales are 160×160×128, 80×80×256, and 40×10×512, respectively.
[0076] Further, such as Figure 8 As shown, the high-frequency features and the RGB features are fused in the frequency domain and spatial domain feature mixing module of the crack detection submodule, including:
[0077] The high frequency feature and the RGB feature are matrix multiplied to obtain a mixed frequency domain feature;
[0078] The mixed frequency domain feature is matrix-multiplied with the high frequency feature and the RGB feature respectively to obtain a high frequency enhancement feature and an RGB enhancement feature;
[0079] Performing matrix addition on the high-frequency enhancement feature and the RGB feature to obtain a high-frequency enhancement-RGB fusion feature;
[0080] Performing matrix addition on the RGB enhancement feature and the high-frequency feature to obtain an RGB enhancement-high-frequency fusion feature;
[0081] The high-frequency enhancement-RGB fusion feature and the RGB enhancement-high-frequency fusion feature are fused through matrix channels to obtain a fusion feature.
[0082] Specifically, the frequency domain and spatial domain feature mixing module uses high-frequency features and RGB features to calculate the cross-attention weights, and then uses the cross-attention matrix to enhance the attention features of the spatial domain and frequency domain, and finally merges the attention features of the spatial domain and frequency domain together for output.
[0083] It should be noted that the model structure of the crack detection head of the crack detection submodule uses the detection head structure of the YOLOv9 model. In the detection frame output by it, the prediction frame with a confidence level lower than 0.25 is removed, and then the detection frame with a high degree of overlap is removed by non-maximum suppression. Finally, the label with the highest category confidence is selected as the classification label of the prediction frame to obtain the crack information of the waterproof membrane.
[0084] Further, such as Fig. 9 As shown, the waterproofing roll crack detection model is trained by the following method, including steps S201 to S205:
[0085] Step S201, constructing a bending detection training data set and a crack detection training data set respectively; wherein the bending detection training data set includes sample images and annotated bending detection frames; and the crack detection training data set includes annotated images in the bending detection frames and corresponding crack information.
[0086] Specifically, according to the size, position, shape and other characteristics of the cracks in the waterproof membrane, the LabelImg software is used to accurately mark the crack defects and the bends in the membrane, the most accurate rectangular frames are drawn for the cracks and bends in all the cracks and bends in the images to be marked, and the marked rectangular frames (true value frames) are named cracks and bends, and all the marked rectangular frames are saved in YOLO data format.
[0087] Step S202: Load the bend detection training data set to train the bend detection submodule to obtain a trained bend detection submodule.
[0088] Furthermore, the bend detection training data set is loaded, and a combination of a bounding box intersection-over-union loss function, a classification loss function, and a confidence loss function is used to train the bend detection submodule. The parameters of the bend detection submodule are updated by back propagation using the stochastic gradient descent method to obtain a trained bend detection submodule.
[0089] Specifically, Fig.10 As shown, the bending detection submodule also includes a multi-level auxiliary information layer and an auxiliary reversible branch during training; the multi-level auxiliary information layer is an integrated network inserted between the auxiliary reversible branch and the main network of the bending detection submodule, which is used to receive the gradient information of all target objects, aggregate the gradient information containing all target objects into multi-level auxiliary information, and pass it to the main network of the bending detection submodule for weight update; it should be noted that this module is only used in training mode because the gradient it returns is obtained from the auxiliary reversible branch.
[0090] The structure of the auxiliary reversible branch is consistent with the structure of the main network, and is used to help the main network of the bending detection submodule better obtain rich return gradient information during the training process. Discarding this branch during the reasoning process can improve the detection speed of the model without losing accuracy.
[0091] The output features of the auxiliary reversible branch output the prediction box and prediction label of the curved part through the auxiliary detection head, which are used to calculate the loss together with the prediction box and prediction label of the curved part output by the curved detection head. This can provide more gradient information during the training process and help accelerate the convergence of the model.
[0092] Furthermore, the bounding box intersection over union loss function uses the CIOU loss function, which is an improved version based on the original IOU (Intersection over Union) loss function. It takes into account the complete intersection between target boxes and introduces a correction factor to more accurately measure the similarity between target boxes.
[0093] The classification loss function uses a binary cross entropy loss function.
[0094] The distribution focal loss function is a DFL (Distribution Focal Loss) loss function.
[0095] Specifically, during the training process, the bounding box intersection-over-union loss, the classification loss, and the distribution focal length loss are added together to obtain a total loss, and the total loss is used to optimize the parameters of the bending detection submodule through back propagation.
[0096] Step S203: pre-training the backbone network of the spatial feature extraction module of the crack detection submodule based on contrastive learning to obtain a pre-trained backbone network.
[0097] Specifically, in order to avoid overfitting of the crack detection submodule, the data set should include a large number of images under various conditions. However, for industrial scenarios, the samples of waterproofing membranes are usually unbalanced, that is, the number of samples of normal waterproofing membranes is much larger than the number of samples of cracks in waterproofing membranes. Therefore, this embodiment uses a contrastive learning-based method to pre-train the backbone network of the spatial feature extraction module of the crack detection submodule, so that it learns the intra-class consistency and extra-class difference feature representation of cracks in waterproofing membranes, laying the foundation for the formal training of the model, improving the model detection effect, and reducing the occurrence of model overfitting.
[0098] Furthermore, the pre-training includes the following steps:
[0099] Construct several training data groups, each of which includes several training sample pairs; wherein the training sample pairs include a positive sample and a negative sample; the positive samples in each training data group are pictures of the same crack area, and the negative samples are different pictures of the crack-free area.
[0100] The negative samples in each training data set include several crack-free area images of the same size as the positive samples and two images of the same size as the positive samples extracted from both sides of the long side of the positive samples.
[0101] Specifically, cracks in waterproof membranes are usually transverse rectangular cracks. Therefore, when constructing the negative sample of the sample pair, images of the same size as the positive sample extracted from both sides of the long side of the positive sample are used. By selecting areas that are similar to the crack area but do not actually contain cracks as negative samples, the model can learn the subtle differences between cracks and normal areas and enhance the difference in features.
[0102] Furthermore, for each training data group, the training sample pairs are loaded, and the contrast loss function is used to train the backbone network of the spatial feature extraction module of the crack detection submodule, and the backbone network parameters of the spatial feature extraction module are updated using gradient back propagation. After the training is completed, the backbone network parameters of the spatial feature extraction module are saved.
[0103] Specifically, during training, the positive samples are input into the decoder (the backbone network structure of the spatial feature extraction module) to obtain the positive sample feature vector matrix, and the negative samples are input into the dynamic decoder (the backbone network structure used for training in the spatial feature extraction module) to obtain the negative sample feature vector matrix. After performing matrix multiplication on the positive sample feature vector matrix and the negative sample feature vector matrix and calculating the contrast loss, the gradient of the contrast loss is returned to the decoder, and after updating the decoder parameters, the dynamic decoder parameters are updated using the following formula:
[0104] Dynamic decoder parameters = decoder parameters * 0.001 + previous dynamic decoder parameters * 0.999
[0105] It should be noted that the dynamic decoder parameters are updated synchronously using the above formula. By following the decoder parameter update at a smaller ratio, the model can slowly adapt to new knowledge and avoid performance fluctuations caused by large updates. Allowing the dynamic decoder to learn from the decoder may help introduce feature diversity and improve the model's generalization ability for different categories.
[0106] Exemplarily, the contrast loss function may use a temperature-scaled cross entropy loss function.
[0107] Step S204: Load the crack detection training data set to train the crack detection submodule including the pre-trained backbone network to obtain a trained crack detection submodule.
[0108] Furthermore, the crack detection training data set is loaded, and the crack detection submodule is trained using a combination of a bounding box small target detection loss function, a classification loss function, and a distribution focal length loss function. The parameters of the crack detection submodule are updated by back propagation using the stochastic gradient descent method to obtain a trained crack detection submodule.
[0109] Specifically, there are many small crack images in the crack image of the waterproof membrane. When calculating the bounding box loss, the evaluation index based on the intersection-over-union ratio is very sensitive to the position deviation of tiny objects, which greatly reduces the detection performance of the model. Therefore, this embodiment uses the bounding box small target detection loss function, namely the normalized Wasserstein distance (NWD) function, as an evaluation index to measure the similarity between two bounding boxes.
[0110] When training the crack detection submodule, the classification loss function and the distribution focal loss function use the same loss function as the bending detection submodule, that is, a binary cross entropy loss function and a DFL (Distribution Focal Loss) loss function are used respectively.
[0111] During the training process, the bounding box small target detection loss, the classification loss, and the distribution focal length loss are added together to obtain the total loss, and the total loss is used to optimize the parameters of the crack detection submodule through back propagation.
[0112] Step S205: obtaining a trained waterproof membrane crack detection model based on the trained bending detection submodule and the trained crack detection submodule.
[0113] Step S3: When the number of samples with cracks exceeds a preset value, the low-temperature flexibility test is judged to be unqualified.
[0114] Exemplarily, 5 waterproof membrane samples produced in the same batch and subjected to the low-temperature flexibility test are selected. When cracks are detected in 2 or more samples, it is judged that the low-temperature flexibility test of the current batch of waterproof membranes has failed.
[0115] In summary, the low-temperature flexibility detection method of waterproof coiled material based on image recognition according to the embodiment of the present invention has the following beneficial effects:
[0116] 1. For waterproof roll materials, cracks usually appear at the bends of the waterproof roll materials. The waterproof roll material crack detection model of the present invention first uses the bend detection sub-model to detect the bends of the waterproof roll materials, and then uses the crack detection sub-model to further determine whether there are cracks. Compared with directly performing crack detection on the waterproof roll material image, it is more targeted and can improve the detection accuracy of these areas.
[0117] 2. The crack detection model for waterproof membranes of the present invention uses a bending detection sub-model to detect the bending parts of the waterproof membranes, which can reduce the detection in areas where no cracks appear, thereby reducing false detections due to random textures or material inhomogeneities, and reducing the image range that requires high-resolution detection, thereby saving computing resources and time.
[0118] 3. For industrial scenarios, samples of waterproof membranes are usually unbalanced, that is, the number of samples of normal waterproof membranes is much larger than the number of samples of cracks in waterproof membranes. Therefore, when training the crack detection sub-model of the waterproof membrane crack detection model, the present invention performs a pre-training method based on comparative learning on its backbone network layer, so that the backbone network layer of the crack detection sub-model can learn the intra-class consistency and extra-class difference feature representation of the waterproof membrane cracks, thereby improving the detection effect of the waterproof membrane crack detection model and reducing model overfitting.
[0119] 4. When the present invention constructs a pair of pre-trained training samples based on contrastive learning for the backbone network layer of the crack detection sub-model of the waterproof membrane crack detection model, the negative samples include two pictures with the same size as the positive samples extracted from both sides of the long side of the positive sample in the same training data group. By selecting areas similar to the crack area but actually containing no cracks as negative samples, the model can learn the subtle differences between cracks and normal areas, enhance the difference in features, and more accurately identify crack areas.
[0120] 5. In the crack detection sub-model of the waterproof roll material crack detection model of the present invention, high-frequency feature information that is difficult to detect in the RGB space in the roll material image is extracted, which can better identify the existence of cracks and enhance the characteristic expression of small cracks, thereby improving the model's detection ability for small cracks.
[0121] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
Claims
1. A method for detecting low-temperature flexibility of waterproof coiled materials based on image recognition, characterized in that: The steps include: Acquire images of multiple waterproofing membrane samples that have undergone low temperature flexibility testing; Input each image into the trained waterproof coiled material crack detection model to perform crack detection at the bending part, and obtain crack information at the bending part of each sample; wherein the waterproof coiled material crack detection model includes a bending detection submodule and a crack detection submodule; the bending detection submodule is used to detect the bending part in the sample; and the crack detection submodule is used to detect crack information at the bending part; When the number of samples with cracks exceeds a preset value, the low-temperature flexibility test is judged to be unqualified.
2. The method according to claim 1, characterized in that: The crack detection submodule includes a high-frequency feature extraction module, a spatial feature extraction module, and a frequency-domain and spatial-domain feature mixing module; The image of the bending part is respectively passed through the high-frequency feature extraction module and the spatial feature extraction module of the crack detection submodule to obtain high-frequency features and RGB features of different scales of the image of the bending part; After the high-frequency features and the RGB features of the same scale are fused in the frequency domain and spatial domain feature mixing module of the crack detection submodule, the crack information in the image of the bending portion in the image is output through the crack detection head.
3. The method according to claim 2, characterized in that: The high frequency features and the RGB features are fused in the frequency domain and spatial domain feature mixing module of the crack detection submodule, including: The high frequency feature and the RGB feature are matrix multiplied to obtain a mixed frequency domain feature; The mixed frequency domain feature is matrix-multiplied with the high frequency feature and the RGB feature respectively to obtain a high frequency enhancement feature and an RGB enhancement feature; Performing matrix addition on the high-frequency enhancement feature and the RGB feature to obtain a high-frequency enhancement-RGB fusion feature; Performing matrix addition on the RGB enhancement feature and the high-frequency feature to obtain an RGB enhancement-high-frequency fusion feature; The high-frequency enhancement-RGB fusion feature and the RGB enhancement-high-frequency fusion feature are fused through matrix channels to obtain a fusion feature.
4. The method according to claim 2, characterized in that: The image of the curved part of the image is sequentially passed through the backbone network layer and the multi-scale feature fusion layer of the spatial feature extraction module to obtain RGB features of different scales; wherein the multi-scale feature fusion layer includes three target detection layers of different scales.
5. The method according to claim 2, characterized in that: The image of the curved part of the image is converted from the spatial domain to the frequency domain through discrete cosine transformation in the high-frequency feature extraction module, and then the high-frequency area weight of the image is increased through a filter to obtain a high-frequency enhanced image; the high-frequency enhanced image is restored to the spatial domain through inverse discrete cosine transformation and then passed through three convolution layers respectively to obtain high-frequency features of three different scales.
6. The method according to claim 1, characterized in that: The waterproofing membrane crack detection model is trained by the following method: Constructing a bending detection training data set and a crack detection training data set respectively; wherein the bending detection training data set includes sample images and annotated bending detection frames; and the crack detection training data set includes annotated images in the bending detection frames and corresponding crack information; Loading the bending detection training data set to train the bending detection submodule to obtain a trained bending detection submodule; Pre-training the backbone network of the spatial feature extraction module of the crack detection submodule based on contrastive learning to obtain a pre-trained backbone network; Loading the crack detection training data set to train the crack detection submodule including the pre-trained backbone network to obtain a trained crack detection submodule; Based on the trained bending detection submodule and the trained crack detection submodule, a trained waterproof membrane crack detection model is obtained.
7. The method according to claim 6, characterized in that: The pre-training of the backbone network of the spatial feature extraction module of the crack detection submodule based on contrastive learning to obtain a crack detection basic backbone network includes: Constructing several training data groups, each training data group includes several training sample pairs; wherein the training sample pairs include a positive sample and a negative sample; the positive samples in each training data group are pictures of the same crack area, and the negative samples are different pictures of the crack-free area; For each training data group, the training sample pairs are loaded, and the backbone network of the spatial feature extraction module of the crack detection submodule is trained using the contrast loss function. The backbone network parameters of the spatial feature extraction module are updated using gradient back propagation. After the training is completed, the backbone network parameters of the spatial feature extraction module are saved.
8. The method according to claim 7, characterized in that: The negative samples in each training data set include several crack-free area images of the same size as the positive samples and two images of the same size as the positive samples extracted from both sides of the long side of the positive samples.
9. The method according to claim 6, characterized in that: The loading of the bending detection training data set to train the bending detection submodule to obtain a trained bending detection submodule includes: loading the bending detection training data set, using a combination of a bounding box intersection-over-union loss function, a classification loss function, and a distribution focal length loss function to train the bending detection submodule, and using a stochastic gradient descent method to perform back propagation to update parameters of the bending detection submodule to obtain a trained bending detection submodule; The method of loading the crack detection training data set to train a crack detection submodule of a pre-trained backbone network to obtain a trained crack detection submodule includes: loading the crack detection training data set, using a combination of a bounding box small target detection loss function, a classification loss function, and a distribution focal length loss function to train the crack detection submodule, and using a stochastic gradient descent method to perform back propagation to update parameters of the crack detection submodule to obtain a trained crack detection submodule.
10. The method according to any one of claims 1 to 9, characterized in that: The structure of the bending detection submodule is a YOLOv9 model structure.
Citation Information
Patent Citations
Multi-type material surface defect detection method based on machine vision
CN104458755A
Crankshaft surface crack monitoring method and system based on unsupervised learning
CN114897909A
Power transmission line strain clamp defect detection method based on multi-network fusion model
CN115018818A
Crack information identification method and computer equipment
CN117036298A
Tunnel crack image crack segmentation method, device and equipment and readable storage medium
CN118038056A
Cited By
Offshore wind turbine generator gearbox fault diagnosis method based on image recognition
CN120375093A
