Defect detection method and system for surface coating of hydraulic steel structure

Through the multi-scale layer coupled parallel balanced network model MCPB, the shortcomings of manual visual inspection in hydraulic steel structure coating detection are solved, and efficient and accurate automatic detection and evaluation of coating defects are achieved, which reduces labor intensity and improves detection efficiency.

CN120259226APending Publication Date: 2025-07-04CHINA THREE GORGES UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510328234.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-19
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The periodic inspection and acceptance of hydraulic steel structure coatings in the prior art mainly rely on manual visual inspection, which has problems such as high labor intensity, low efficiency and strong subjectivity. The traditional detection methods are poor in complex environments, making it difficult to accurately detect coating defects.

Method used

The multi-scale layer coupled parallel balanced network model MCPB is adopted to design coating defect assessment indicators through coating defect image exposure correction and data set optimization, and a detection platform is built to realize the automated identification and evaluation of coating defects.

Benefits of technology

It improves the efficiency and accuracy of coating defect detection, reduces the intensity of labor, and provides stable defect evaluation standards, which facilitates timely detection of minor defects and conducts small-scale repairs, saving maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120259226A_ABST
    Figure CN120259226A_ABST
Patent Text Reader

Abstract

The invention provides a defect detection method and system for a surface coating of a hydraulic steel structure, and the method comprises the following steps: S1, making a coating defect data set, and providing a basis for the operation of a model algorithm; s2, optimizing the data set image by adopting a coating defect image exposure correction method so as to improve the image quality; s3, designing and training a multi-scale layer coupling parallel balance network model MCPB, and identifying the hydraulic steel structure surface coating defect image; s4, coating defect evaluation indexes are designed, a detection platform is constructed, and coating defect detection and visual output of the evaluation indexes are achieved. The problems of high labor intensity, low efficiency, strong subjectivity and the like due to the fact that periodic detection in the service period of the coating and acceptance inspection monitoring of the recoated coating in the prior art are mainly performed by manual visual detection are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of image defect detection, mainly related to the defect detection of the surface coating of hydraulic steel structures, and particularly relates to a method for detecting the defects of the surface coating of hydraulic steel structures based on a multi-scale layer coupled parallel balance network model MCPB. Background Art

[0002] Hydraulic steel structures are widely used in areas such as water conservancy projects, ports, and offshore platforms, and have advantages such as high strength and flexible structure. However, the service environment of hydraulic steel structures is harsh. Some are immersed in various media (seawater, fresh water, industrial wastewater, etc.) for a long time, and some serve at the interface of the medium water line, experiencing a wet-dry alternating environment with the change of water level; the underwater part is subject to the friction and erosion of solid substances such as high-speed water flow carrying sediment and floating objects, and the above-water part is affected by splashing water mist and ultraviolet rays in sunlight. Limited by the service environment, hydraulic steel structures are extremely prone to corrosion. Although their surfaces are coated with matching anti-corrosion coatings, under the influence of factors such as water mist, sunlight, biology, and stress, the coating state deteriorates continuously. It is necessary to conduct periodic detection and evaluation of the coating corrosion of hydraulic steel structures, and re-paint severely corroded areas. At present, for the periodic detection during the service period of the coating and the acceptance detection of the coating after re-painting, it mainly relies on manual visual inspection, which has deficiencies such as high labor intensity, low efficiency, and strong subjectivity.

[0003] The corrosion damage of the coating is difficult to detect. To avoid a large amount of manual visual work in the regular corrosion detection of metal structures, many technologies have been applied to the defect detection of the surface coating of metal structures. To detect tiny corrosion defects under the coating, a coating corrosion detection method based on the data of detection instruments has been used. By methods such as the wire beam electrode technique, scanning Kelvin probe, electrochemical impedance spectroscopy, and electrochemical noise, the electrochemical reactions under the coating can be detected, and the dynamic change process of local corrosion under the coating can be modeled; by non-destructive testing methods such as eddy current, ultrasonic wave, and acoustic emission, sensors can be used to extract detailed physical information of the coating and the metal substrate; in the early stage, some digital image methods were used to improve the visibility of coating defects to facilitate the detection of coating-related defects by the human eye. Specifically, there are corrosion detection methods such as thermal imaging technology and electron microscopy; traditional digital image processing detection methods usually use digital image technology to enhance the image, and then extract the defect image features through machine learning methods, and use various manually designed operators to implement the detection process of the coating quality.

[0004] Although the above detection method can solve problems to a certain extent, there are still certain limitations: traditional detection methods rely on detection instruments to obtain accurate chemical or physical change data at the microscopic level of the coating, but they have poor adaptability and cannot obtain macroscopic defect characteristics of the coating. Therefore, a more stable and convenient means of obtaining coating defect data is needed; traditional digital image processing detection methods have good detection effects for coatings with single defect types or good detection environments, but traditional image processing technologies are easily affected by the environment and have poor stability in actual engineering environments, making it difficult to accurately detect coating defects of hydraulic steel structures.

[0005] In recent years, with the continuous development and maturity of machine vision technology, in order to give full play to its advantages such as high precision, high efficiency, and objectivity, it is used in coating detection technology. It can solve the problem of simply relying on the human eye to judge the degree of coating defects, discover slight coating defects such as blisters, cracks, and peeling in a timely and efficient manner, locate and save defect information in time before the above defects develop into serious corrosion, achieve coating surface treatment with a smaller repair area and lower repair difficulty, greatly improve the repair efficiency and save repair costs at the same time, and has certain theoretical significance and practical value. Summary of the Invention

[0006] To solve the current technical problems, the main purpose of the present invention is to provide a method and system for detecting defects in the surface coating of hydraulic steel structures. By providing a method for detecting defects in the surface coating of hydraulic steel structures based on the multi-scale layer coupled parallel balance network model MCPB, it aims to solve the problems in the prior art that the periodic detection during the service period of the coating and the acceptance monitoring of the coating after recoating usually mainly rely on manual visual inspection, with problems such as high labor intensity, low efficiency, and strong subjectivity.

[0007] To achieve the above technical features, the object of the present invention is realized as follows: A method for detecting defects in the surface coating of hydraulic steel structures includes the following steps: S1, make a coating defect data set to provide a basis for the operation of the model algorithm; S2, adopt a coating defect image exposure correction method to optimize the data set images to improve the image quality; S3, design and train a multi-scale layer coupled parallel balance network model MCPB to identify images of coating defects on the surface of hydraulic steel structures; S4, design coating defect evaluation indicators and build a detection platform to realize the detection of coating defects and the visual output of evaluation indicators.

[0008] Preferably, in S1, the method for making the coating defect data set prepares coating specimens through coating defect acceleration tests, obtains various types of coating defects, and collects and organizes the coating specimens to construct a coating defect data set.

[0009] Preferably, the preparation of the coating specimen for the coating defect acceleration test specifically includes: S1.1, Solution preparation: According to the requirements of the test medium of sodium chloride solution with a certain mass fraction, pour pure water into a container, and then pour a certain amount of pure sodium chloride crystals, and stir to completely melt them to obtain the test medium for the deterioration test. The prepared solution is poured into the brine tank of the salt spray chamber for salt spray test, and can also be poured into a turnover box to complete the simulated immersion test; S1.2, Salt spray test: Place multiple coating specimens in the test chamber of the salt spray test platform. There are heating copper pipes laid at the bottom of the test chamber, which are responsible for controlling the test temperature; The air compressor gives the spray power to the salt spray chamber through the air duct. There is a brine tank on the side of the salt spray chamber, which is responsible for storing the sodium chloride solution; There are nozzles in the salt spray chamber. The two inlets of the nozzles are respectively connected to the air compressor air duct and the brine tank. When the air compressor starts, the high-speed gas will suck out the solution in the brine tank and form misty droplets through the nozzles. The droplets naturally settle on the surface of the specimen to simulate atmospheric corrosion; S1.3, Immersion test: Divide the relative position relationship between the specimen and the solution into three immersion methods: full immersion, semi-immersion, and periodic immersion. The entire immersion test platform consists of three identical turnover boxes, a constant temperature heater, and an air pump; The three turnover boxes correspond to three service environments, among which the sodium chloride solution is stored, and they are respectively a control group without any interference, a water flow impact group, and a constant temperature water flow impact group; The water flow impact is simulated by an air pump. The air pump introduces gas into the air stone in the turnover box through the air duct to simulate the water flow impact on the surface of the specimen, and at the same time increases the oxygen content in the medium; The constant temperature heater is used to add the variable of the medium temperature. During the test process, the specimen is controlled by a cable tie to simulate different immersion areas.

[0010] Preferably, in S2, the coating defect image exposure correction method includes: S2.1, Invert the input image to achieve color space conversion and multi-scale brightness fusion of the dual-illuminance image; S2.2, Design a brightness component correction function to adaptively correct the brightness component; S2.3, Adopt a fusion strategy, assign image fusion weights based on the set brightness threshold, and use the Laplacian pyramid image features and Gamma correction method to enhance the texture of the output image, and then restore it to the RGB color space.

[0011] Preferably, in S3, the basic module of the multi-scale layer coupled parallel balance network model MCPB includes: S3.1, Input layer: Preprocess the original image to meet the input requirements of the neural network; S3.2, Backbone network: Used to extract features of different scales from the image; S3.3, Neck Network, which fuses feature maps of different scales output by the backbone network to enhance the ability to detect targets of different sizes; S3.4, Detection Head, which performs object detection on the fused feature maps and outputs bounding box coordinates, object confidence, and class probabilities.

[0012] Preferably, the backbone network uses CSP module and SPP module for feature extraction, where: the CSP module divides the feature map into two parts, one part performs convolution operations, and the other part directly skips to reduce the computational load and maintain the efficient feature extraction ability; the SPP module introduces pooling kernels of different scales to perform feature aggregation on different receptive fields to enhance the detection ability of multi-scale targets.

[0013] Preferably, the improvement of the MCPB network includes: (1) Using CIOU loss as the anchor box loss function to improve the target localization accuracy; (2) Introducing RFocus and Focus upsampling and downsampling methods to enhance the feature expression ability; (3) Modeling adjacent layer features through a layer-coupled attention module; (4) Using a parallel reconstruction module to purify the deep fusion features; (5) Using a spatial attention enhancement module and a channel attention enhancement module to guide attention allocation.

[0014] Preferably, the model training method in S3 includes: setting the batch size, adjusting the pixels of the input image, initializing the learning rate and the final learning rate, using the SGD optimizer, setting the momentum coefficient, setting the optimizer weight decay coefficient, adopting a warm-up learning strategy and enabling an early stopping strategy during training. When the mAP does not improve within 100 epochs, stop training in advance and save the best weights.

[0015] Preferably, the design method of the coating defect evaluation index in S4 includes: S4.1, Combining the detection model with relevant standards to set the coating defect evaluation index; S4.2, Using the multi-anchor box union algorithm to calculate the defect area to improve the accuracy of object detection; S4.3, Obtaining the final prediction tensor through non-maximum suppression operation, including anchor box coordinate values, confidence, and defect types; S4.4, Counting the types and quantities of defects, and combining with the area calculation component to calculate the proportion of the defect area to evaluate the protection level of the coating defects.

[0016] Preferably, on the other hand, a detection system based on the water conservancy steel structure surface coating defect detection method described in any one of the above is provided, including: A detection algorithm module for performing coating defect detection and calculation of evaluation indicators; An evaluation index output component for counting the types and areas of defects and calculating the defect evaluation level; A visualization platform for outputting coating defect detection results and evaluation indicators, supporting user interaction.

[0017] The present invention has the following beneficial effects: 1. Through the accelerated test of anti-corrosion coating defects on hydraulic steel structures, the present invention builds an image acquisition platform to obtain rich coating defect image data in the coating acceptance stage and service stage, thus solving the problem of extremely lacking public data sets in the aspect of anti-corrosion coating defects on hydraulic steel structures, and providing data support for the model training of deep learning methods; through the coating defect image exposure correction method, the problems of abnormal exposure and low contrast of the collected coating defect images are alleviated, and the generalization of the model algorithm after optimizing with the data set is improved; by designing and using a multi-scale layer coupled parallel balance network model MCPB, the influence of the large inter-class difference and small intra-class difference of coating defects on machine vision detection is reduced; by combining relevant coating defect evaluation standards with the actual situation, specific coating defect evaluation indicators are determined, and the coating defect evaluation indicators can correctly reflect the current situation of the surface coating, facilitating the systematic evaluation of the surface coating state. Description of the Drawings

[0018] The present invention will be further described below with reference to the drawings and embodiments.

[0019] Figure 1 It is a schematic diagram of an adaptive brightness enhanced image fusion method.

[0020] Figure 2 It is a schematic diagram of the MCPB network structure.

[0021] Figure 3 It is a schematic diagram of a coating defect detection platform. Detailed Embodiments

[0022] The embodiments of the present invention will be further described below with reference to the drawings.

[0023] Embodiment 1: The defect detection method for the surface coating of hydraulic steel structures based on the multi-scale layer coupled parallel balance network model MCPB provided by the present invention includes: experimentally obtaining a basic data set, where the specific data set is a coating defect data set, preparing samples and collecting data through an accelerated test for anti-corrosion coating defects of hydraulic steel structures, providing a basis for the implementation of the defect detection method; adopting a coating defect image exposure correction method to perform data enhancement on the data set images. The data enhancement includes methods based on strategies such as multi-scale brightness fusion and adaptive brightness enhancement to expand and optimize the data set; designing a multi-scale layer coupled parallel balance network model MCPB and running it based on the aforementioned data set to obtain model parameters, and being able to determine the defect index of the input picture according to the network model generated after training; constructing a determination standard for the coating defect part, designing a coating defect evaluation index, and constructing a detection platform to realize the detection of coating defects and the visual output of the evaluation index.

[0024] Example 2: The present invention provides a defect detection method for the surface coating of hydraulic steel structures based on the multi-scale layer coupled parallel balance network model MCPB, which solves the technical problems in the prior art that the detection of defects in the surface coating of hydraulic steel usually relies on manual observation, has strong subjectivity, inconsistent standards and low efficiency, resulting in a lack of reliable determination criteria during coating renewal and acceptance.

[0025] After introducing the basic principle of the present invention, the various non-restrictive implementation manners of the present invention will be specifically introduced below.

[0026] The present invention provides a method for designing and conducting an accelerated test for coating defects to produce a data set. The main contents of this method include: The accelerated test for coating defects is to solve the problem that it is difficult to detect the defects generated after spraying on the surface of hydraulic steel structures and the defects generated during subsequent service, and to obtain a coating defect data set for the research of defect detection methods based on neural network models. This method uses a Q235B carbon steel specimen coated with three layers as the matrix carrier for coating defects, and collects coating defect data during the spraying process through a built image acquisition platform to complete the acceptance defect part of the layer defect accelerated test.

[0027] The Q235B carbon steel specimen is processed by laser cutting, and the specimen size is designed to be 160mm×120mm×4mm to facilitate taking and placing the specimen and collecting surface images, while fully utilizing the space of the test instrument when obtaining a sufficient number of samples. The specimen has fixed round holes with a diameter of 5mm reserved at four corners to facilitate subsequent specimen spraying and coating air drying.

[0028] The Q235B carbon steel specimens were subjected to surface pretreatment. A grinding machine and sandpapers with various grit sizes were used to remove the black oxide scale and partial rust on their surfaces until metallic luster appeared on the substrate surfaces. Then, the substrates were suspended using cable ties and fixing holes. The zinc-rich epoxy primer, zinc-rich epoxy intermediate coat, and polyurethane topcoat were diluted in the specified proportions and sprayed onto the metal substrates using an electric spray gun. After natural drying and verifying that the dry film thickness was correct, specimens meeting the requirements of the accelerated test were obtained.

[0029] In this method, zinc-rich epoxy paint was selected as the primer and intermediate coat, and polyurethane paint was selected as the topcoat. At the same time, to obtain richer defect image data of the coating and make it easier to distinguish the degree of coating defects, different colors were chosen for the three layers of paint.

[0030] The accelerated test for coating defects aims to obtain a large number of defect images and accelerate the generation rate of coating defects in specimens through an accelerated test simulating the natural environment. Starting from the coating deterioration mechanism, this method provides a reasonable test environment for the coating specimens of hydraulic steel structures. The designed test includes the following steps: Solution preparation: According to the requirements of the test medium of a 5% mass fraction sodium chloride solution, 9500 ml of pure water was poured into a container, and then 500 g of analytical pure sodium chloride crystals were added and stirred until completely melted to obtain the test medium for the deterioration test. The prepared solution was poured into the brine tank of the salt spray chamber for salt spray tests, and it could also be poured into a turnover box to complete the simulated immersion test.

[0031] Salt spray test: Twenty-four coating specimens were placed in the test chamber of the salt spray test platform. There were heating copper pipes laid at the bottom of the test chamber, which were responsible for controlling the test temperature. An air compressor provided the spray power for the salt spray chamber through an air duct. There was a brine tank on the side of the salt spray chamber, which was responsible for storing the sodium chloride solution. There was a type-A nozzle in the salt spray chamber. The two inlets of the nozzle were respectively connected to the air compressor air duct and the brine tank. When the air compressor was started, high-speed gas would suck out the solution in the brine tank and form mist-like droplets through the nozzle. The droplets would naturally settle on the specimen surfaces to simulate atmospheric corrosion.

[0032] Immersion test: The relative position relationship between the specimens and the solution was divided into three immersion methods: full immersion, semi-immersion, and cyclic immersion. The entire immersion test platform consisted of three identical turnover boxes, a constant temperature heater, and an air pump, with a total of 36 coating specimens. The three turnover boxes corresponded to three service environments, where the sodium chloride solutions were stored, namely a control group without any interference, a water flow impact group, and a constant temperature water flow impact group. The water flow impact was simulated by an air pump. The air pump introduced gas into the air stones in the turnover box through an air duct to simulate the water flow impact on the specimen surfaces and increase the oxygen content in the medium at the same time. The constant temperature heater was used to add the variable of the medium temperature. During the test process, the immersion method of the specimens was controlled by cable ties to simulate different immersion areas.

[0033] Image acquisition: During the image acquisition process, the industrial camera is fixed by the camera bracket, the lens is installed, the USB data cable connects the camera and the computer, and the computer is used to capture and store the coating defect images; after the image acquisition platform is built, the coating defects generated during the spraying process are collected, and a total of five types of defects are obtained, including common spraying defects such as exposed substrate, inclusion, orange peel, shrinkage cavity, and sag. After saving them to the computer, they are waiting for subsequent processing.

[0034] The present invention also provides an exposure correction method for the coating defect images collected by the industrial camera. The main content of this method includes: Using MATLAB to write an algorithm to achieve multi-scale brightness fusion estimation of dual-illuminance images; designing a brightness component correction function to adaptively correct the brightness component; formulating a fusion strategy, assigning image fusion weights, and by analyzing the brightness threshold of the set dataset images, adaptively using the Laplacian pyramid image features and Gamma correction method to enhance the texture of the output image and restore it to the RGB color space; used to solve the technical problem that in the actual implementation process, some of the collected defect images are taken under poor ambient light conditions, resulting in the disappearance of image details and poor image quality.

[0035] Furthermore, the multi-scale brightness fusion estimation method for the dual-illuminance images estimates the ambient light, including: Flipping the input image and adding it to the original input image to form a dual-illuminance image input. Starting from the illumination estimation of the Retinex theory, converting the input dual-illuminance RGB image to the HSV space, performing multi-scale Gaussian filtering and brightness fusion on the brightness component, and finally using the multi-scale fused brightness component as the estimated value of the ambient component.

[0036] The Retinex theory believes that the perception of the color and brightness of an object depends not only on the light reflected by the object surface but also on the distribution of the light in the scene. An image can be regarded as composed of two parts: the object reflectance and the ambient light; the pixel value of the input image is equal to the product of the object reflectance and the ambient light; therefore, the goal of Retinex is to decompose the image into the reflectance and the illumination parts, so as to eliminate the influence brought by the illumination change and enhance the image details and colors.

[0037] For the input image, first invert the image according to the definition of the dual-illuminance image, that is, obtain the negative of the input image, use the input image and the inverted image together for image enhancement, introduce the multi-scale brightness fusion method, input the original image and its inverted image together, and establish the connection between the multi-scale ambient brightness components of the low-light image and the overexposed image when performing the subsequent ambient brightness estimation; by fusing the brightness components, this method corrects the respective overexposure abnormal areas of the dual-illuminance images to achieve a more comprehensive image correction effect.

[0038] Specifically, for the multi-scale luminance fusion method, calculation formulas are written in MATLAB to process the input image, including: Define the input image I and its negative image I inv , and their relationship is I inv = 1 - I. Since the RGB color component value range of the input image I is [0, 1], the value range of I inv is [0, 1]. Then, the V components of the two images can be calculated according to the formulas V0 = max(I(R, G, B)) and V1 = max(I(R, G, B)).

[0039] ; (1-1) ; (1-2) ; (1-3) Through the functions of Gaussian low-pass filter for dynamic image compression and ambient light component estimation described by formula (1-1), it is used to extract the ambient light component from the non-uniform input image luminance component, where σ is the scale parameter controlling the clarity of the filtered image, and α is a constant; in formula (1-2), L g is the ambient luminance estimation map after Gaussian filtering; to achieve multi-scale feature extraction of the ambient luminance value of the dual-illuminance image, Gaussian filters with multiple σ values are used to extract the luminance component of the dual-illuminance image, and fusion weights are assigned to it. Finally, the ambient luminance estimation expression is as shown in formula (1-3), where ω j,k represents the fusion weight of different scale luminance components of the dual-illuminance image. Among them, the illuminance category is 2 (J = 1), and the Gaussian filter category is 3 (K = 3). Therefore, there are a total of 6 weights ω j,k . The Gaussian filter uses three scale parameters σ (i.e., 1, 10, and 100) to extract the ambient luminance of the dual-illuminance image, sets all six weight coefficients to take the value of 1 / 6, and finally obtains the ambient light component of the multi-scale fusion of the dual-illuminance image.

[0040] Furthermore, aiming at the problem of information loss of the reflected light, the following luminance adaptive correction function is designed, and the formula is written in MATLAB to enhance the reflected light luminance component: ; (2-1) ; (2-2) ; (2-3) In the above correction function formula, W is the total number of pixels of the original image, M and N represent the number of pixels of the length and width of the original image, and their product is W ,I s is the saturation component of the original image. Equation (2-1) relates the constant α manually selected in the original method to the adaptive coefficient x, and x is related to the luminance component and saturation component of the original image, that is, the empirical constant α becomes an enhancement coefficient with adaptive adjustment. An adaptive factor y is introduced in Equation (2-2), which is related to the difference between the luminance components of the dual-illumination images. Use y to perform Gamma transformation on the multi-scale fused luminance component L g . In Equation (2-3), the value of the correction coefficient k is determined by the adaptive coefficient α and the luminance component V 0 of the original image, and finally the corrected object reflection luminance map R en is obtained.

[0041] Furthermore, in order to adaptively correct low-light and overexposed images simultaneously, as Figure 1 shown, an adaptive luminance enhancement image fusion method based on Laplacian pyramid features is used. Based on the judgment of the exposure threshold, the Laplacian pyramid features are screened to obtain the optimized effects of low-light enhancement and overexposure correction images.

[0042] Specifically, the exposure degree of the image is judged according to V fu , and the threshold θ is set with the overall luminance mean value of 500 images; when V fu >θ, the fused image is subjected to overexposure correction, and when V fu <θ, the fused image is subjected to low-light enhancement; the fused result V fu replaces the luminance component V0 of the input image, and the HSV image space is converted to the RGB image space to obtain the final adaptively exposure-corrected image.

[0043] The present invention also provides a design method for a multi-scale layer coupled and parallel balanced network MCPB. The content of this method includes: Design and apply a multi-scale feature fusion model MCPB for defect detection. The multi-scale feature fusion model MCPB is an efficient object detection algorithm designed for coating defect detection based on the one-stage object detection network YOLOV5. It has the advantages of fast speed, high accuracy, and easy deployment. It adopts an improved network structure, supports multi-scale prediction and efficient feature extraction, and can significantly improve the inference speed while maintaining the detection accuracy. At the same time, the upsampling and downsampling methods are improved to reduce the model calculation amount. The designed layer coupling attention module is used to model the features of adjacent layers of the model, purify the highly fused multi-scale features with a parallel reconstruction module, and introduce a corresponding attention guidance module to enhance the multi-scale features.

[0044] Multi-scale features refer to feature representations extracted at different spatial scales. Objects in an image may exist in different sizes (e.g., small objects, large objects) or different context environments. Therefore, it is often difficult for single-scale features to capture comprehensive information. It includes high-level features with strong semantic information that can identify object categories and are obtained after multiple convolutions and downsamplings; low-level features from the relatively shallow layers of the network that retain more detailed information and edge information; and middle-level features between the high-level and low-level features, which have both certain semantic information and detailed information. High-level features have a low spatial resolution and less detailed information, which is not conducive to small object detection. Low-level features lack semantic information and are difficult to understand the context of complex objects. Therefore, since objects may exhibit different visual characteristics at different scales, multi-scale features can better capture this variation, effectively fuse features at different levels (low-level, middle-level, high-level), retain the feature advantages at different scales, and achieve better visual task effects.

[0045] Specifically, the multi-scale feature fusion model MCPB used in this embodiment is as Figure 2 shown, and its features include: 1. The backbone network is responsible for multi-level feature extraction of the input image and is composed of multiple feature extraction layers in sequence. The outputs of some feature extraction layers will be passed to the neck network for further feature fusion and optimization.

[0046] As shown in the figure, the backbone network in this embodiment includes five feature extraction layers. The first feature extraction layer is mainly composed of a convolution module (Conv), a batch normalization (BN) layer, and a SiLU activation function, and is used to initially extract low-level features of the image. On this basis, the second to fourth feature extraction layers use Focus and RFocus modules combined with the C3 module for feature extraction. The Focus and RFocus modules are respectively used for feature downsampling and recombination in different directions to ensure the integrity of features and improve computational efficiency at the same time. The C3 module, as a lightweight residual unit, helps to enhance feature expression ability and reduce computational overhead.

[0047] The fifth feature extraction layer uses the SPPF (Spatial Pyramid Pooling) module, which contains multiple pooling operations, can extract key features under different receptive fields, and retains more spatial information through feature splicing operations. After multi-scale feature extraction is completed, the output layer of the backbone network will input the features of a specific layer into the neck network.

[0048] 2. The neck network is used for multi-scale feature fusion and optimizes the feature expressions at different levels to make them suitable for subsequent detection tasks. This network includes two parts: the first part is responsible for cross-scale information fusion, and the second part is for feature purification and enhancement.

[0049] As shown in the figure, the first part of the fusion network includes an upsampling and downsampling module and a feature concatenation operation. Among them, the RFocus and Focus modules are used to adjust the scale of features upward and downward respectively to obtain richer multi-scale information. During this process, features of different layers of the backbone network are fused through the concatenation (Concat) operation and further key information is extracted through the C3 module.

[0050] The second part of the fusion network adopts a layer-coupled attention module (LCAM) and a parallel reconstruction module (PRM). The LCAM module consists of top-down attention (TFA) and bottom-up attention (BFA), which can enhance the information flow between features of different scales, enable low-level features to have stronger high-level information expression ability, and prevent information loss at the same time. The PRM module performs refined processing on the fused features to reduce the interference of background noise on target detection and improve the recognition accuracy of foreground targets.

[0051] 3. The output end is used to finally obtain the position and category information of the target object based on the feature map of the neck network.

[0052] In this embodiment, a spatial attention enhancement module (ESAM) and a channel attention enhancement module (ECAM) are used to optimize the output features. The ESAM is used to enhance the feature expression at the spatial level to make the target area more prominent; the ECAM focuses on information extraction in the channel dimension to ensure that the features of key channels can play an effective role. On this basis, features of different scales are integrated through the concatenation operation and finally input into the detection head to complete the recognition and positioning of defective targets.

[0053] Furthermore, an image after adaptive exposure correction is used to form a dataset, and the multi-scale feature fusion model MCPB is trained. The model training method includes the following steps: First, set the batch size to 8, and adjust the image to 256×256 pixels before inputting it into the model; the initial learning rate is 0.01, and the final learning rate is 0.2; use the SGD optimizer, set the momentum coefficient to 0.937, and the weight decay coefficient to 0.0005; use the warm-up learning strategy in the first three epochs, with the initial momentum in the warm-up period being 0.8 and the initial bias learning rate being 0.1; a total of 400 epochs are carried out during the training process. To improve the training efficiency, the early stopping strategy is enabled. When the mean average precision (mAP) does not improve within 100 epochs, the training is stopped in advance and the best weights are saved.

[0054] The present invention also provides a design method for a coating defect detection platform. The coating defect detection platform provides a graphical user operation interface based on the index output of the foregoing defect detection model. The content of this method includes: Design the evaluation index for the degree of coating defects, and solve the problem of calculating the defect area in object detection through the multi-anchor box union algorithm; use the proportion of the defect area as the evaluation index for coating defects. As shown in Table 1, the protection level of coating defects is divided into 11 levels according to the proportion of the defect area.

[0055] Table 1 Defect Detection Protection Rating Table

[0056] Use the predicted tensor processed by non-maximum suppression to obtain parameters such as anchor box coordinates, confidence levels, and defect types, and count the defect types; use the coating area calculation component to obtain the area and proportion of each type of defect, and calculate the protection level of the defect according to the set evaluation index.

[0057] Use Python to build a coating defect detection platform, and use PyQt5 to design the user graphical interface. Integrate the evaluation index output component into the coating defect detection platform. The final layout of the coating defect detection platform interface is as Figure 3 shown, realizing the visualization of coating defect detection and evaluation indexes to assist in the evaluation of the defect degree.

[0058] The above-mentioned defect detection method for the surface coating of hydraulic steel structures provided in this embodiment includes the following steps: L1 Use an image acquisition device to collect the coating specimens prepared by the aforementioned coating defect acceleration test, obtain various types of coating defects, and after sorting, obtain a preliminary coating defect data set.

[0059] After cutting off the irrelevant areas and cropping the specific defect parts in the image, the obtained data set contains 48 images of inclusion defects, 88 images of exposed substrate defects, 208 images of sagging defects, 560 images of orange peel defects, 21 images of shrinkage hole defects, 204 images of blister defects, 680 images of rust stains, and 198 images of peeling defects.

[0060] It is necessary to use the labeling tool Labelimg to bind the defect types with the corresponding labels after annotation.

[0061] L2 Use the aforementioned image exposure correction method to process the coating defect data set collected in L1, and solve the problems of abnormal exposure and low contrast of the initially collected coating defect images.

[0062] It is necessary to use MATLAB to write and execute the aforementioned formula, and perform batch processing and data enhancement on the pictures to be optimized; the processed data set contains 8 types of coating defects: inclusion, exposed substrate, sagging, orange peel, shrinkage hole, blister, rust stain, and peeling, a total of 2007 images, with a size of 200×200 pixels. The data set is divided into a training set, a validation set, and a test set according to the ratio of 8:1:1.

[0063] L3 inputs the processed dataset into the aforementioned multi-scale feature fusion model MCPB for training. The computing platform configuration used for training is as follows: RTX 3090 24G, Intel(R) Core(TM) i9-11900K@3.50GHz, pytorch version 1.12.1, Python version 3.7, CUDA version 11.3. Training is carried out according to the batch size, model transformation, learning rate transformation, learning strategy, and correlation coefficient of the aforementioned training method.

[0064] L4 loads the network model MCPB with updated training parameters and coating defect detection function onto the aforementioned coating defect detection platform. After completion, when an image of the coating defect to be detected is input, corresponding defect evaluation indicators can be obtained as output. The indicators include defect area segmentation, defect type description, defect quantity statistics, and comprehensive protection level assessment.

[0065] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but rather will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for detecting defects on the surface coating of hydraulic steel structures, characterized in that, It includes the following steps: S1. Produce a coating defect data set to provide a basis for the operation of the model algorithm; S2. Adopt a coating defect image exposure correction method to optimize the data set images to improve the image quality; S3. Design and train a multi-scale layer coupled parallel balance network model MCPB to identify the surface coating defect images of hydraulic steel structures; S4. Design coating defect evaluation indicators and construct a detection platform to realize the detection of coating defects and the visual output of evaluation indicators.

2. The defect detection method for the surface coating of a hydraulic steel structure according to claim 1, characterized in that: In S1, the method for producing the coating defect data set prepares coating specimens through a coating defect acceleration test, obtains various types of coating defects, and collects and collates the coating specimens to construct a coating defect data set.

3. The method for detecting defects on the surface coating of a hydraulic steel structure according to claim 2, characterized in that: The preparation of coating specimens by the coating defect acceleration test specifically includes: S1.

1. Solution preparation: According to the test medium requirements of a sodium chloride solution with a certain mass fraction, pour pure water into a container, then pour a certain amount of pure sodium chloride crystals, stir to completely melt them, obtain the test medium for the deterioration test, pour the prepared solution into the salt water tank of the salt spray chamber for the salt spray test, and at the same time, it can also be poured into a turnover box to complete the simulated immersion test; S1.

2. Salt spray test: Place multiple coating specimens in the test chamber of the salt spray test platform. There are heating copper tubes laid at the bottom of the test chamber, which are responsible for controlling the test temperature; The air compressor gives spray power to the salt spray chamber through a gas pipe. There is a salt water tank on the side of the salt spray chamber, which is responsible for storing the sodium chloride solution; There are nozzles in the salt spray chamber. The two inlets of the nozzles are respectively connected to the air compressor gas pipe and the salt water tank. When the air compressor starts, the high-speed gas will suck out the solution in the salt water tank and form misty droplets through the nozzles. The droplets naturally settle on the surface of the specimen to simulate atmospheric corrosion; S1.

3. Immersion test: Divide the relative position relationship between the specimen and the solution into three immersion methods: full immersion, semi-immersion, and periodic immersion. The entire immersion test platform consists of three identical turnover boxes, a constant temperature heater, and an air pump; The three turnover boxes correspond to three service environments, among which the sodium chloride solution is stored, namely, a control group without any interference, a water flow impact group, and a constant temperature water flow impact group; The water flow impact is simulated by an air pump. The air pump introduces gas into the air stone in the turnover box through a gas pipe to simulate the water flow impact on the surface of the specimen, and at the same time increases the oxygen content in the medium; The constant temperature heater is used to add the variable of the medium temperature. During the test process, the specimen controls the immersion method through cable ties to simulate different immersion areas.

4. The defect detection method for the surface coating of a hydraulic steel structure according to claim 1, wherein: In S2, the coating defect image exposure correction method includes: S2.

1. Invert the input image to realize the color space conversion and multi-scale brightness fusion of the dual-illuminance image; S2.

2. Design a brightness component correction function to adaptively correct the brightness component; S2.

3. Adopt a fusion strategy, assign image fusion weights based on a set brightness threshold, and use the Laplacian pyramid image features and Gamma correction method to enhance the texture of the output image, and then restore it to the RGB color space.

5. The defect detection method for the surface coating of a hydraulic steel structure according to claim 1, characterized in that: In S3, the basic modules of the multi-scale layer coupled parallel balance network model MCPB include: S3.

1. Input layer: Preprocess the original image to meet the input requirements of the neural network; S3.2, The backbone network, which is used to extract features of different scales from the image; S3.3, The neck network, which fuses the feature maps of different scales output by the backbone network to improve the ability to detect targets of different sizes; S3.4, The detection head, which performs object detection on the fused feature maps and outputs the bounding box coordinates, object confidence, and class probabilities.

6. The method for detecting defects on the surface coating of a hydraulic steel structure according to claim 5, wherein: The backbone network uses the CSP module and the SPP module for feature extraction, where: the CSP module divides the feature map into two parts, one part performs convolution operations, and the other part directly skips to reduce the computational load and maintain the efficient feature extraction ability; the SPP module introduces pooling kernels of different scales to perform feature aggregation on different receptive fields to improve the detection ability of multi-scale targets.

7. The defect detection method for the surface coating of a hydraulic steel structure according to claim 5, characterized in that: The improvements of the MCPB network include: (1) Using CIOU loss as the anchor box loss function to improve the target localization accuracy; (2) Introducing the RFocus and Focus upsampling and downsampling methods to enhance the feature expression ability; (3) Modeling the features of adjacent layers through the layer-coupled attention module; (4) Using the parallel reconstruction module to purify the deeply fused features; (5) Using the spatial attention enhancement module and the channel attention enhancement module to guide the attention distribution.

8. The defect detection method for the surface coating of a hydraulic steel structure according to claim 5, characterized in that: The model training method in S3 includes: setting the batch size, adjusting the pixels of the input image, initializing the learning rate and the final learning rate, using the SGD optimizer, setting the momentum coefficient, setting the optimizer weight decay coefficient, adopting the warm-up learning strategy and enabling the early stopping strategy during training. When the mAP does not improve within 100 epochs, stop training early and save the best weights.

9. The method for detecting defects on the surface coating of a hydraulic steel structure according to claim 5, characterized in that: The design method of the coating defect evaluation index in S4 includes: S4.1, Combining the detection model with relevant standards to set the coating defect evaluation index; S4.2, Using the multi-anchor box union algorithm to calculate the defect area to improve the accuracy of object detection; S4.3, Obtaining the final prediction tensor through non-maximum suppression operation, including the anchor box coordinate values, confidence, and defect types; S4.4, Counting the defect types and quantities, and combining the area calculation component to calculate the proportion of the defect area to evaluate the protection level of the coating defects.

10. A detection system for detecting surface coating defects of a hydraulic steel structure according to any one of claims 1-9, characterized in that, It includes: The detection algorithm module, which is used to perform coating defect detection and evaluation index calculation; The evaluation index output component, which is used to count the defect types and areas and calculate the defect evaluation level; The visualization platform, which is used to output the coating defect detection results and evaluation indexes and support user interaction.