A method and system for corrosion detection and sample expansion of hydraulic metal structures
The corrosion detection method for hydraulic metal structures using dual Transformer networks solves the problems of low efficiency and low accuracy in traditional detection methods. It realizes automatic segmentation of corrosion areas and intelligent determination of the degree of corrosion, improves detection accuracy, and expands the range of difficult samples for network iterative learning.
Patent Information
- Application Number
- CN202411768121.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-12-04
AI Technical Summary
Existing technologies suffer from low detection efficiency and accuracy in the detection of corrosion in hydraulic metal structures. Furthermore, manual detection is highly subjective and makes it difficult to achieve rapid and accurate segmentation of corrosion areas and determination of the degree of corrosion.
A detection method based on dual Transformer networks is adopted. Through data collection and annotation, data preprocessing, Transformer network optimization and training, the corrosion area segmentation and degree determination are realized, and the abnormal detection results are automatically identified and the sample is expanded.
It improves the accuracy and efficiency of rust detection, reduces the subjectivity of manual inspection, realizes automatic segmentation of rusted areas and intelligent determination of the degree of rust, and can automatically expand difficult samples for network learning.
Smart Images

Figure CN119672430B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of corrosion detection technology for metal structures in river basin hydropower stations, and in particular to a method and system for corrosion detection and sample expansion of hydraulic metal structures with high detection accuracy and high level of intelligence. Background Technology
[0002] Hydropower stations in river basins widely employ various hydraulic metal structures, such as gates, channel steel linings, and trash racks. During their service life, the anti-corrosion coatings on these structures may peel off due to various reasons, leading to varying degrees of corrosion. Therefore, regular comprehensive inspection and rust removal / anti-corrosion treatment of hydraulic metal structures are crucial for their safe operation. Traditional methods for detecting surface corrosion in metal structures mainly rely on manual inspection, determining the area and degree of corrosion by observation and according to relevant standards. However, this method suffers from drawbacks such as low detection efficiency, low accuracy, poor real-time performance, high labor intensity, and significant susceptibility to human experience and subjective factors. Therefore, how to quickly and accurately obtain information on the surface corrosion status and coating quality of metal structures has become a critical issue that urgently needs to be addressed.
[0003] Currently, some methods based on digital image processing are used for corrosion segmentation, but these often rely on pre-designed features and suffer from poor algorithm detection accuracy. Furthermore, the clear boundaries for determining the degree of corrosion are rather vague, making it difficult to classify using image processing methods.
[0004] With the increasing power of computer hardware, deep learning has experienced a resurgence and flourishing. It can learn high-dimensional features of data and exhibits greater robustness compared to traditional digital image processing methods. Recently, deep learning networks based on the Transformer architecture have been shown to achieve higher accuracy than those based on the CNN architecture. However, previous research has largely focused on achieving higher detection accuracy, neglecting the conditions under which detection may fail. Therefore, it is necessary to propose an improvement to overcome the shortcomings of existing technologies. Summary of the Invention
[0005] The problem this invention aims to solve is: how to accurately and automatically segment the corroded parts in images of hydraulic metal corrosion acquired at maintenance sites, and simultaneously determine the degree of corrosion of corroded components according to relevant national standards, thereby improving detection efficiency and reducing the subjectivity of manual inspection. To achieve automatic segmentation and identification of corroded areas in hydraulic metal structures and intelligent determination of corrosion degree, as well as automatic collection of abnormal detection results as "difficult samples," this invention proposes a method and system for corrosion detection and sample expansion of hydraulic metal structures based on a dual Transformer network.
[0006] The technical solution of this invention is:
[0007] A method for detecting and expanding the samples of corrosion in hydraulic metal structures includes the following steps: S1, Data collection and annotation: Collect typical corrosion images of hydraulic metal structures, and create a corrosion region segmentation dataset and a corrosion degree determination dataset through manual annotation; S2, Dataset preprocessing: Preprocess the corrosion region segmentation dataset and the corrosion degree determination dataset; S3, Transformer network optimization: Optimize the two Transformer networks by using two Transformer architectures for corrosion region segmentation and corrosion degree determination respectively; S4, Transformer network training: Train the corrosion region segmentation Transformer network using the preprocessed corrosion region segmentation dataset from step S2, employing the OHEM strategy during training; The preprocessed rust degree determination dataset in S2 is used to train the rust degree determination Transformer network; S5, rust detection: rust detection is divided into rust region segmentation and recognition and rust degree determination, that is, the trained rust region segmentation Transformer network is used to segment and recognize the image to be inspected, and the trained rust degree determination Transformer network is used to identify the rust degree of the image to be inspected; S6, rust detection result determination: after rust detection is completed, it is determined whether the rust detection result is normal or abnormal; S7, detection result processing: if the rust detection result is normal, the detection ends; if it is abnormal, a rust abnormality alarm is issued, and the corresponding image is marked as a "difficult sample" for secondary preprocessing as a sample for the Transformer network to learn and optimize.
[0008] As a preferred technical solution, the specific method for creating the rust region segmentation dataset in step S1 is as follows: first, the rust region is assisted in segmentation using a large segmentation model, and then fine-tuned manually to obtain a qualified segmented rust image dataset.
[0009] As a preferred technical solution, when creating the rust degree determination dataset in step S1, the rust images are classified into the following four rust degrees: A. Steel surface with a large area covered by adhered oxide scale and almost no rust; B. Steel surface that has begun to rust and the oxide scale has begun to peel off; C. Steel surface where the oxide scale has peeled off due to rust or can be scraped off, and slight pitting corrosion is visible under normal visual observation; D. Steel surface where the oxide scale has peeled off due to rust, and widespread pitting corrosion is visible under normal visual observation.
[0010] As a preferred technical solution, step S2 specifically includes the following processes: S201, Dataset processing: Convert the annotation results in the rust region segmentation dataset and the rust degree determination dataset into VOC semantic segmentation format, ensuring that the rust region pixels in the annotated rust label image are 1 and the background region pixels are 0; S202, Data augmentation: Perform data augmentation on the format-processed rust region segmentation dataset and the rust degree determination dataset, using random flipping, random mirroring, random contrast adjustment, random brightness adjustment, random color transformation, etc., to further expand the quantity and diversity of the data.
[0011] As a preferred technical solution, the rust region segmentation Transformer network in step S3 is the segmentation network AFFormer; the optimization of the rust region segmentation Transformer network in step S3 specifically involves: constructing a new downsampling module to optimize the segmentation network AFFormer; the new downsampling module is constructed using a wavelet downsampling module combined with an attention mechanism, and the new downsampling module is integrated into the input of the segmentation network AFFormer.
[0012] As a preferred technical solution, the corrosion degree determination Transformer network in step S3 is the classification network Vision Transformer; the optimization of the corrosion degree determination Transformer network in step S3 specifically involves: proposing a new Transformer Encoder and optimizing the classification network Vision Transformer; the new Transformer Encoder is obtained by optimizing the Transformer Encoder in the Vision Transformer network using the Re-attention mechanism in DeepViT and the Residualattention module in ReViT.
[0013] As a preferred technical solution, in step S5, the corrosion area segmentation and identification and the corrosion degree determination are performed in parallel, and the corrosion area segmentation and identification and the corrosion degree determination together constitute the corrosion detection task.
[0014] As a preferred technical solution, the criterion for determining whether the detection result in step S6 is normal or abnormal is whether the detection result of the corrosion region segmentation Transformer network matches the detection result of the corrosion degree determination Transformer network: the detection result of the corrosion region segmentation Transformer network is the segmented corrosion region map; the corrosion degree determination Transformer network uses the corrosion degree feature visualization result at the time of determination as the detection result, which is the heat map output by Grad-CAM; if the highlighted area of the heat map output by the corrosion degree determination Transformer network and the corrosion segmentation area output by the corrosion region segmentation Transformer network have an overlap of more than 50%, then the detection result of the corrosion region segmentation Transformer network is considered to match the detection result of the corrosion degree determination Transformer network and is determined to be a normal result; otherwise, it is determined to be an abnormal result.
[0015] As a preferred technical solution, the secondary preprocessing in step S7 specifically involves: archiving the difficult samples, using the segmentation model again for semi-automatic labeling, and repeating steps S1 and S2 for network relearning.
[0016] This invention also provides a system for detecting and expanding the samples of corrosion in hydraulic metal structures, comprising: a dataset construction module for constructing a corrosion detection dataset, including a corrosion segmentation dataset and a corrosion degree determination dataset; a network training module for training a corrosion degree determination network using a labeled classification dataset and a corrosion region segmentation network using a labeled segmentation dataset; a corrosion region segmentation module for segmenting and identifying corrosion regions in the image to be inspected using the trained corrosion region segmentation network; a corrosion degree determination module for identifying the corrosion degree in the image to be inspected using a trained corrosion degree classification network; a detection result determination module for determining whether the identification results of the corrosion degree determination module and the corrosion region segmentation module are abnormal; and a detection result processing module for archiving and alarming abnormal results if they are abnormal, then labeling them with the assistance of a large segmentation model, and finally using them for network learning.
[0017] This invention discloses a method and system for corrosion detection and sample expansion of hydraulic metal structures. It employs a Transformer-based deep learning network for corrosion detection, achieving higher accuracy than traditional digital image processing methods and CNN architectures. The corrosion segmentation network obtains information on the region and morphology of corrosion, while the corrosion classification network determines the degree of corrosion of the rusted components. Abnormal detection results can be automatically identified, and semi-automatic expansion of difficult corrosion training samples can be implemented. This invention's method and system for corrosion detection and sample expansion of hydraulic metal structures can perform both corrosion region segmentation and corrosion degree determination in parallel, improving the accuracy of corrosion detection compared to existing algorithms and acquiring more corrosion detection information. It also enables automatic expansion of difficult corrosion samples during the detection process for network iterative learning. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating a specific implementation method for a corrosion detection and sample expansion method for hydraulic metal structures according to the present invention.
[0019] Figure 2 This is a schematic diagram of a Transformer network for rust region segmentation in a specific embodiment of the method for rust detection and sample expansion of hydraulic metal structures according to the present invention.
[0020] Figure 3 This is a schematic diagram of the wavelet downsampling module in a specific embodiment of the method for detecting and expanding the samples of corrosion in hydraulic metal structures according to the present invention;
[0021] Figure 4 This is a schematic diagram of a Transformer network for determining the degree of corrosion in a specific embodiment of the method for detecting and expanding the sample of corrosion in hydraulic metal structures according to the present invention.
[0022] Figure 5 This is a schematic diagram of the Transformer Encoder in a specific embodiment of the method for detecting corrosion and expanding samples of hydraulic metal structures according to the present invention. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0024] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” used in the embodiments of this invention and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. “Multiple” generally includes at least two, but does not exclude the inclusion of at least one.
[0025] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0026] Depending on the context, the words “if” or “suppose” as used here can be interpreted as “when” or “in response to determination” or “in response to detection.” Similarly, depending on the context, the phrases “if determination” or “if detection (of the stated condition or event)” can be interpreted as “when determination” or “in response to determination” or “when detection (of the stated condition or event)” or “in response to detection (of the stated condition or event).”
[0027] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a product or system comprising a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a product or system. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the product or system that includes said element.
[0028] like Figure 1 The figure shows a specific embodiment of the method for detecting and expanding the samples of corrosion in hydraulic metal structures according to the present invention. The method for detecting and expanding the samples of corrosion in hydraulic metal structures in this embodiment includes the following steps:
[0029] S1. Data Collection and Labeling: Collect typical images of corrosion on hydraulic metal structures, and create corrosion region segmentation datasets and corrosion degree determination datasets through manual labeling. In practice, digital cameras or mobile phones can be used to collect typical corrosion datasets of hydraulic metal structures. For the corrosion region segmentation dataset, a large segmentation model is used for auxiliary segmentation and labeling. For the corrosion degree determination dataset, classification is performed according to relevant national standards and in combination with the corrosion situation of hydraulic metal structures.
[0030] S2. Dataset Preprocessing: The corrosion region segmentation dataset and corrosion degree determination dataset are preprocessed. Specifically, the preprocessing of the constructed corrosion region segmentation dataset and corrosion degree determination dataset mainly includes random flipping, random mirroring, random contrast adjustment, random brightness adjustment, and random color transformation, further expanding the quantity and diversity of the data.
[0031] S3. Transformer Network Optimization: Two Transformer-based networks are used to segment the rusted region and determine the degree of rust, respectively, and the two Transformer networks are optimized. In this embodiment, as shown... Figure 3 As shown, a new downsampling module (Haar waveletdownsampling module, HWDM) is proposed, which is constructed by combining a wavelet downsampling module with an attention mechanism. This new downsampling module is then integrated into the input of the AFFormer network. The optimized AFFormer network is the rust region segmentation Transformer network, and its network structure is as follows. Figure 2 As shown. The Transformer network used to determine the degree of corrosion is the Vision Transformer, a classification network. This embodiment optimizes the classification Transformer network, as follows: Figure 5 As shown, this embodiment proposes a new Transformer Encoder, which optimizes the Transformer Encoder in the Vision Transformer network using the Re-attention mechanism from DeepViT and the residual attention module from ReViT. The optimized corrosion degree determination Transformer network structure is as follows. Figure 4 .
[0032] S4. Transformer Network Training: The rust region segmentation Transformer network is trained using the rust region segmentation dataset preprocessed in step S2, employing the OHEM strategy during training. The rust degree determination Transformer network is trained using the rust degree determination dataset preprocessed in step S2. Specifically, in this embodiment, the segmentation Transformer network and the classification Transformer network are trained. The optimized AFFormer network is trained using the constructed rust segmentation dataset, and the optimized Vision Transformer network is trained using the constructed rust degree determination dataset.
[0033] S5. Rust Detection: Rust detection is divided into rust region segmentation and recognition and rust degree determination. That is, the trained rust region segmentation Transformer network is used to segment and recognize the image to be inspected, and the trained rust degree determination Transformer network is used to determine the degree of rust in the image to be inspected.
[0034] S6. Determination of rust detection results: After the rust detection is completed, determine whether the rust detection result is normal or abnormal.
[0035] S7. Detection result processing: If the corrosion detection result is normal, the detection ends. If the result is abnormal, a corrosion abnormality alarm is triggered, and the corresponding image is marked as a "difficult sample" for secondary preprocessing as a sample for Transformer network learning and optimization.
[0036] This embodiment describes a method for detecting and expanding samples of corrosion in hydraulic metal structures. The specific method for creating a corrosion region segmentation dataset in step S1 is as follows: First, a large segmentation model is used to assist in segmenting the corrosion region. Then, manual fine-tuning is performed to obtain a qualified segmented corrosion image dataset. When creating the corrosion degree determination dataset in step S1, the corrosion images are classified into the following four corrosion degrees: A) Steel surface with a large area covered by adhered oxide scale but almost no rust; B) Steel surface that has begun to rust, and the oxide scale has begun to peel off; C) Steel surface where the oxide scale has peeled off due to rust or can be scraped off, and slight pitting corrosion is visible under normal visual observation; D) Steel surface where the oxide scale has peeled off due to rust, and widespread pitting corrosion is visible under normal visual observation.
[0037] This embodiment provides a method for detecting corrosion and expanding samples in hydraulic metal structures. Step S2 specifically includes the following process:
[0038] S201. Dataset processing: Convert the annotation results in the rust region segmentation dataset and the rust degree determination dataset into VOC semantic segmentation format to ensure that the rust region pixel is 1 and the background region pixel is 0 in the labeled rust label image.
[0039] S202. Data Augmentation: Perform data augmentation on the format-processed rust region segmentation dataset and rust degree determination dataset, using random flipping, random mirroring, random contrast adjustment, random brightness adjustment, random color transformation, etc., to further expand the quantity and diversity of the data.
[0040] like Figure 2 and Figure 3As shown in this embodiment, a method for detecting and expanding the samples of corrosion in hydraulic metal structures includes a corrosion region segmentation Transformer network (AFFormer) in step S3. The optimization of the corrosion region segmentation Transformer network in step S3 specifically involves constructing a new downsampling module to optimize the AFFormer segmentation network. The new downsampling module is constructed using a wavelet downsampling module combined with an attention mechanism, and is integrated into the input of the AFFormer segmentation network.
[0041] like Figure 4 and Figure 5 As shown in this embodiment, a method for detecting and expanding the samples of corrosion in hydraulic metal structures includes a corrosion degree determination Transformer network (Vision Transformer) in step S3. The optimization of the corrosion degree determination Transformer network in step S3 specifically involves proposing a new Transformer Encoder and optimizing the Vision Transformer classification network. The new Transformer Encoder is obtained by optimizing the Transformer Encoder in the Vision Transformer network using the Re-attention mechanism in DeepViT and the Residual attention module in ReViT.
[0042] In this embodiment, a method for detecting and expanding the samples of corrosion in hydraulic metal structures is provided. In step S5, the corrosion region segmentation and identification and the corrosion degree determination are performed in parallel. The corrosion region segmentation and identification and the corrosion degree determination together constitute the corrosion detection task.
[0043] In this embodiment, a method for detecting and expanding the samples of corrosion in hydraulic metal structures is described. Step S6 determines whether the detection result is normal or abnormal based on whether the detection result of the corrosion region segmentation Transformer network matches the detection result of the corrosion degree determination Transformer network. The detection result of the corrosion region segmentation Transformer network is the segmented corrosion region map; the corrosion degree determination Transformer network uses the visualized corrosion degree feature at the time of determination as the detection result, which is a heatmap output by Grad-CAM. If the highlighted area of the heatmap output by the corrosion degree determination Transformer network overlaps with the corrosion segmentation area output by the corrosion region segmentation Transformer network by more than 50%, then the detection result of the corrosion region segmentation Transformer network matches the detection result of the corrosion degree determination Transformer network and is considered a normal result; otherwise, it is considered an abnormal result.
[0044] In this embodiment, a method for detecting corrosion and expanding samples of hydraulic metal structures includes a secondary preprocessing step S7, which involves archiving the difficult samples, using a segmentation model for semi-automatic annotation, and repeating steps S1 and S2 for network relearning.
[0045] This embodiment also proposes a system for detecting and expanding the corrosion samples of hydraulic metal structures, implementing the aforementioned method for detecting and expanding corrosion samples of hydraulic metal structures. The system includes: a dataset construction module for constructing a corrosion detection dataset, including a corrosion segmentation dataset and a corrosion degree determination dataset; a network training module for training a corrosion degree determination network using a labeled classification dataset and a corrosion region segmentation network using a labeled segmentation dataset; a corrosion region segmentation module for segmenting and identifying corrosion regions in the image to be inspected using the trained corrosion region segmentation network; a corrosion degree determination module for identifying the corrosion degree in the image to be inspected using a trained corrosion degree classification network; a detection result determination module for determining whether the identification results of the corrosion degree determination module and the corrosion region segmentation module are abnormal; and a detection result processing module for archiving and alarming abnormal results if they are abnormal, then labeling them with the assistance of a large segmentation model, and finally using them for network learning. It should be understood that, as a conventional solution in the field, the system for detecting and expanding corrosion samples of hydraulic metal structures of this invention may also include a control processing module for coordinating the various modules to ensure normal system operation. The various modules of the hydraulic metal structure corrosion detection and sample expansion system of the present invention cooperate with each other to perform electrical and data connections.
[0046] This invention discloses a method and system for corrosion detection and sample expansion of hydraulic metal structures, employing a dual Transformer network for corrosion detection and sample expansion. This invention utilizes a Transformer-based deep learning network for corrosion detection, achieving higher accuracy than traditional digital image processing methods and CNN architectures. The corrosion segmentation network obtains information on the region and morphology of corrosion, while the corrosion classification network determines the degree of corrosion of the rusted components. Abnormal detection results can be automatically identified, and semi-automatic expansion of difficult corrosion training samples can be implemented. This invention's method and system for corrosion detection and sample expansion of hydraulic metal structures can perform both corrosion region segmentation and corrosion degree determination in parallel, improving the accuracy of corrosion detection compared to existing algorithms and acquiring more corrosion detection information. It also enables automatic expansion of difficult corrosion samples during the detection process for network iterative learning.
[0047] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of the invention. All equivalent changes and modifications made in accordance with the scope of the claims of this invention should fall within the technical scope of this invention.
Claims
1. A method for detecting corrosion and expanding samples in hydraulic metal structures, characterized in that: Includes the following steps: S1. Data collection and annotation: Collect images of corrosion on hydraulic metal structures, and create a corrosion region segmentation dataset and a corrosion degree determination dataset through manual annotation; S2. Dataset preprocessing: Preprocess the corrosion region segmentation dataset and the corrosion degree determination dataset; S3. Transformer Network Optimization: Two Transformer-based networks are used to segment the rusted region and determine the degree of rust, respectively. The two Transformer networks are then optimized as follows: The rust region segmentation Transformer network is the segmentation network AFFormer; the optimization of the rust region segmentation Transformer network in step S3 is specifically as follows: a new downsampling module is constructed to optimize the segmentation network AFFormer; the new downsampling module is constructed using a wavelet downsampling module combined with an attention mechanism, and the new downsampling module is integrated into the input of the segmentation network AFFormer; The corrosion degree determination Transformer network is the classification network Vision Transformer; the optimization of the corrosion degree determination Transformer network in step S3 specifically involves: proposing a new Transformer Encoder and optimizing the classification network Vision Transformer; the new Transformer Encoder is obtained by optimizing the Transformer Encoder in the Vision Transformer network using the Re-attention mechanism in DeepViT and the Residual attention module in ReViT; S4. Transformer Network Training: The rust region segmentation Transformer network is trained using the rust region segmentation dataset preprocessed in step S2, and the OHEM strategy is used during the training process; the rust degree determination Transformer network is trained using the rust degree determination dataset preprocessed in step S2. S5. Corrosion Detection: Corrosion detection is divided into corrosion region segmentation and recognition and corrosion degree determination. That is, the trained corrosion region segmentation Transformer network is used to segment and recognize the image to be inspected, and the trained corrosion degree determination Transformer network is used to determine the degree of corrosion in the image to be inspected. S6. Determination of rust detection results: After the rust detection is completed, determine whether the rust detection result is normal or abnormal. S7. Detection result processing: If the corrosion detection result is normal, the detection ends. If the result is abnormal, a corrosion abnormality alarm is triggered, and the corresponding image is marked as a "difficult sample" for secondary preprocessing as a sample for Transformer network learning and optimization.
2. The method for detecting corrosion and expanding samples of hydraulic metal structures according to claim 1, characterized in that: The specific method for creating the rust region segmentation dataset in step S1 is as follows: First, the rust region is segmented using a large segmentation model, and then fine-tuned manually to obtain a qualified segmented rust image dataset.
3. The method for detecting corrosion and expanding samples of hydraulic metal structures according to claim 1, characterized in that: Step S2 details The process includes the following: S201. Dataset processing: Convert the annotation results in the rust region segmentation dataset and the rust degree determination dataset into VOC semantic segmentation format to ensure that the rust region pixel is 1 and the background region pixel is 0 in the labeled rust label image. S202. Data Augmentation: Perform data augmentation on the format-processed rust region segmentation dataset and rust degree determination dataset by using random flipping, random mirroring, random contrast adjustment, random brightness adjustment, and random color transformation to further expand the quantity and diversity of the data.
4. The method for detecting corrosion and expanding samples of hydraulic metal structures according to claim 1, characterized in that: In step S5, the rust region segmentation and identification and the rust degree determination are performed in parallel, and the rust region segmentation and identification and the rust degree determination together constitute the rust detection task.
5. The method for detecting corrosion and expanding samples of hydraulic metal structures according to claim 1, characterized in that: In step S6, the criterion for determining whether the detection result is normal or abnormal is whether the detection result of the corrosion region segmentation Transformer network matches the detection result of the corrosion degree determination Transformer network: the detection result of the corrosion region segmentation Transformer network is the segmented corrosion region map; the corrosion degree determination Transformer network uses the corrosion degree feature visualization result at the time of determination as the detection result, which is the heat map output by Grad-CAM; if the highlighted area of the heat map output by the corrosion degree determination Transformer network and the corrosion segmentation area output by the corrosion region segmentation Transformer network have an overlap of more than 50%, then the detection result of the corrosion region segmentation Transformer network and the detection result of the corrosion degree determination Transformer network are considered to match and are determined to be normal; otherwise, they are determined to be abnormal.
6. The method for detecting corrosion and expanding samples of hydraulic metal structures according to claim 1, characterized in that: The secondary preprocessing in step S7 specifically involves: archiving the difficult samples, using the segmentation model again for semi-automatic labeling, and repeating steps S1 and S2 for network relearning.
7. A system for detecting and expanding corrosion samples of hydraulic metal structures, implementing the method for detecting and expanding corrosion samples of hydraulic metal structures according to any one of claims 1 to 6, characterized in that: include: The dataset construction module is used to build corrosion detection datasets, including corrosion segmentation datasets and corrosion degree determination datasets; The network training module is used to train the corrosion degree determination network using a labeled classification dataset and the corrosion region segmentation network using a labeled segmentation dataset. The rust region segmentation module uses a trained rust region segmentation network to segment and identify the rust regions in the image under inspection; the rust degree determination module uses a trained rust degree classification network to identify the degree of rust in the image under inspection. The detection result determination module determines whether the identification results of the corrosion degree determination module and the corrosion area segmentation module are abnormal. The detection result processing module archives abnormal results and issues an alarm if the detection result is abnormal. Then, it performs annotation with the assistance of segmenting the large model, and finally uses it for network learning.
Citation Information
Patent Citations
Retinal blood vessel image segmentation method based on double-channel U-shaped improved Transform network
CN114820632A
Corrosion detection model construction method and corrosion detection method
CN115994889A