Pipeline weld defect detection system and method based on SimAM-YOLOv5s
The SimAM-YOLOv5s model, combined with self-calibration lighting and the SimAM attention mechanism, solves the problems of low efficiency and low precision in pipeline weld inspection, achieves fast and accurate weld defect detection and classification, adapts to different working conditions, and improves the model's generalization ability.
Patent Information
- Application Number
- CN202510906540.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-02
- Publication Date
- 2025-10-17
AI Technical Summary
Existing technologies in pipeline weld inspection have problems such as low detection efficiency, low accuracy and radiation hazards. In particular, there is a lack of a three-dimensional attention mechanism in the detection of tiny defects. In addition, the cost of acquiring weld defect image data is high and data enhancement technology is insufficient.
The SimAM-YOLOv5s model is used to preprocess images through the self-calibration illumination module. The weight-sharing illumination learning mechanism and the self-calibration module are combined to optimize illumination estimation. The SimAM attention mechanism is added to the YOLOv5s network. A dataset is generated and model training is performed. BabelImg is used for annotation to build a pipeline weld defect detection system.
It achieves fast and accurate pipeline weld defect detection, can classify weld quality, reduce missed detections and misjudgments, improve detection efficiency and accuracy, adapt to different lighting and wear conditions, and improve the generalization ability of the model.
Smart Images

Figure CN120807437A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of attention mechanism and target detection, and particularly relates to a pipeline weld defect detection system and method based on SimAM-YOLOv5s. BACKGROUND
[0002] Industrial safety needs: In the industrial field, pipeline systems are widely used in many industries such as oil, chemical industry, natural gas, etc. The quality of pipeline welds is directly related to the safety and reliability of the entire pipeline system. Once the welds have defects such as cracks, pores, and slag inclusions, it may cause pipeline leakage, leading to serious accidents such as fire and explosion. Therefore, it is crucial to accurately and efficiently detect the quality of pipeline welds. Traditional weld detection methods mainly include manual visual inspection, ultrasonic detection, and X-ray detection. Manual visual inspection is greatly affected by the experience and fatigue level of the inspector, and is prone to missed detection and misjudgment. Although ultrasonic detection and X-ray detection have high accuracy, they are complex to operate and have low detection efficiency, and X-ray detection also has radiation hazards.
[0003] With the rapid development of computer vision technology, using image recognition and target detection algorithms to detect weld defects has become a new trend. This method can realize automated and intelligent detection, quickly process large amounts of image data, and improve detection efficiency and accuracy. Advantages of deep learning algorithms: Target detection algorithms in deep learning, such as the YOLO series, have the characteristics of fast speed and high accuracy. SimAM is an attention mechanism that can further improve the model's ability to extract weld defect features when introduced into YOLOv5S, allowing the model to more accurately locate and identify weld defects. Traditional methods such as RetinexNet (CVPR 2018) have slow convergence speed and low PSNR; YOLOv5 lacks a three-dimensional attention mechanism, resulting in insufficient mAP in micro-defect detection.
[0004] In terms of data, due to the high cost of obtaining weld defect image data, especially images with various complex defect types, data augmentation techniques have been widely used. By rotating, flipping, scaling, and adding noise to existing images, the data set is expanded, and the model's generalization ability is improved. For example, a normal weld image is rotated by a certain angle to serve as new training data, allowing the model to learn the features of the weld at different angles. Therefore, it is necessary to design a pipeline weld defect detection system and method based on SimAM-YOLOv5s. SUMMARY
[0005] In order to overcome the shortcomings of the prior art, the purpose of the present application is to provide a pipeline weld defect detection system and method based on SimAM-YOLOv5s.
[0006] To achieve the above object, the present application provides the following scheme:
[0007] The present application provides a pipeline weld defect detection system based on SimAM-YOLOv5s, comprising:
[0008] A pipeline image data acquisition module is configured to acquire pipeline image data.
[0009] A pipeline image data preprocessing module is configured to preprocess the pipeline image data.
[0010] A data set generation module is configured to generate a data set based on the preprocessed pipeline image data.
[0011] A pipeline weld defect detection model construction module is configured to construct a pipeline weld defect detection model.
[0012] A pipeline weld defect detection model training module is configured to train the pipeline weld defect detection model.
[0013] A pipeline weld defect detection module is configured to input the collected pipeline image data into the trained pipeline weld defect detection model to obtain a detection result.
[0014] The present application also provides a pipeline weld defect detection method based on SimAM-YOLOv5s, comprising:
[0015] Acquiring pipeline image data.
[0016] Formulating a weld quality detection evaluation standard.
[0017] Preprocessing the pipeline image data.
[0018] Generating a data set based on the preprocessed pipeline image data.
[0019] Constructing a pipeline weld defect detection model.
[0020] Training the pipeline weld defect detection model.
[0021] Inputting the collected pipeline image data into the trained pipeline weld defect detection model to obtain a detection result.
[0022] Preferably, the weld quality detection evaluation standard specifically comprises:
[0023] Weld size, including length, width, thickness, whether the center line is offset, and whether the center line is bent and deviated.
[0024] Weld crack, including hot crack, cold crack, reheat crack and laminar tearing.
[0025] Surface porosity
[0026] Weld slag inclusion.
[0027] Preferably, the pipeline image data is preprocessed, specifically:
[0028] A self-calibration lighting module is designed, which is composed of a light estimation module and a self-calibration module, and the pipeline image data is preprocessed based on the light estimation module and the self-calibration module, specifically including:
[0029] A weight-shared lighting learning mechanism is established, and a lightweight light estimation network H θ is constructed by sharing weight parameters, which is used to solve the error accumulation problem caused by the separation of light estimation and image enhancement, and its formula is:
[0030]
[0031] In the formula, x 0 is the initialized clear image true value, y is the target clear image, x t is the low-illumination input image of the t-th iteration, H θ is the weight-shared convolutional network, θ is the learnable parameter, and u t is the output of the light estimation network.
[0032] Based on the self-calibration module, it is ensured that the outputs at different stages in the training process can converge to the same state, wherein a state convergence module G(x t ) is introduced to ensure the stability of the light parameter output at different training stages and prevent overfitting, and its formula is:
[0033]
[0034] In the formula, ⊙ represents element-wise multiplication, K v is a learnable convolution kernel used to compensate for light bias, z t is the intermediate feature after light calibration, s t is a residual compensation term, v t is the stabilized light parameter output.
[0035] The basic unit of the light optimization process is re-formulated as:
[0036] F(x t )→F(G(x t )).
[0037] Preferably, a data set is generated based on the preprocessed pipeline image data, specifically:
[0038] The preprocessed pipeline image data is labeled based on babelImg, one or more labels are assigned to each image in the pipeline image data, and finally a data set is generated.
[0039] Preferably, the pipeline weld defect detection model is constructed, specifically:
[0040] The simAM attention mechanism is added to the backbone network of the traditional YOLOv5s network, the attention weight is expanded to a three-dimensional level, and the improved YOLOv5s network is used as the pipeline weld defect detection model.
[0041] According to the specific embodiments provided by the present application, the following technical effects are disclosed:
[0042] The present application provides a pipeline weld defect detection system and method based on SimAM-YOLOv5s, which comprises a pipeline image data acquisition module, a pipeline image data preprocessing module, a data set generation module, a pipeline weld defect detection model construction module, a pipeline weld defect detection model training module, and a pipeline weld defect detection module. The method comprises the following steps: acquiring pipeline image data, formulating a weld quality detection evaluation standard, preprocessing the pipeline image data, generating a data set based on the preprocessed pipeline image data, constructing a pipeline weld defect detection model, training the pipeline weld defect detection model, inputting the collected pipeline image data into the trained pipeline weld defect detection model, and obtaining the detection result. The present application can quickly and accurately detect the pipeline in the industrial field, classify the welds, effectively find the unsafe welds, enable the management personnel to fully grasp the safety situation of the field in real time, reduce the losses caused by delayed detection and maintenance, and promote the timely implementation of risk management measures. BRIEF DESCRIPTION OF DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0044] Figure 1 The SimAM-YOLOv5s-based pipeline weld defect detection method flowchart provided by the embodiments of the present application is shown in the figure.
[0045] Figure 2 The YOLOv5 model structure diagram is shown in the figure.
[0046] Figure 3 The SimAM-YOLOv5 model structure diagram is shown in the figure. DETAILED DESCRIPTION
[0047] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0048] The purpose of the present application is to provide a SimAM-YOLOv5s-based pipeline weld defect detection method, which can effectively detect the weld quality and classify the weld quality, so that relevant management personnel can understand the on-site safety situation.
[0049] In order to make the above-mentioned purposes, characteristics and advantages of the present application more apparent and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.
[0050] The present application provides a SimAM-YOLOv5s-based pipeline weld defect detection system, comprising:
[0051] A pipeline image data acquisition module is configured to acquire pipeline image data.
[0052] A pipeline image data preprocessing module is configured to preprocess the pipeline image data.
[0053] A data set generation module is configured to generate a data set based on the preprocessed pipeline image data.
[0054] A pipeline weld defect detection model construction module is configured to construct a pipeline weld defect detection model.
[0055] A pipeline weld defect detection model training module is configured to train the pipeline weld defect detection model.
[0056] A pipeline weld defect detection module is configured to input the collected pipeline image data into the trained pipeline weld defect detection model to obtain a detection result.
[0057] Figure 1 As shown in the method flowchart provided by the embodiments of the present application, Figure 1 The present application provides a SimAM-YOLOv5s-based pipeline weld defect detection method, comprising:
[0058] Acquiring pipeline image data.
[0059] Formulating a weld quality detection evaluation standard.
[0060] Preprocessing the pipeline image data.
[0061] generating a dataset based on the preprocessed pipeline image data;
[0062] constructing a pipeline weld defect detection model;
[0063] training the pipeline weld defect detection model;
[0064] inputting the collected pipeline image data into the trained pipeline weld defect detection model to obtain a detection result.
[0065] acquiring pipeline image data, specifically:
[0066] acquiring image information of the on-site pipeline by monitoring camera or manual shooting, and uploading the image to a cloud disk in real time.
[0067] formulating clear weld quality detection evaluation criteria, and evaluating the good or bad of the weld mainly by referring to the following four points:
[0068] 1. Whether the weld size (length, width, thickness, center line offset, and whether there is bending deviation, etc.) meets the relevant requirements;
[0069] 2. Whether there is weld crack (welding cracks are divided into four categories according to the conditions of crack formation, including hot crack, cold crack, reheat crack, and laminar tearing, according to the position, size, formation reason and mechanism of the crack);
[0070] 3. Whether there is surface porosity (the electrode is baked at the specified temperature and time, the welding area must be cleaned, the appropriate welding current is selected during welding, the welding speed is reduced, and the gas in the molten pool is completely escaped, and the operation is not standardized, which will produce porosity);
[0071] 4. Weld slag (there are block or dispersed non-metallic slag in the weld, there are points different from the composition of the bulk metal inside or on the surface of the casting, and the main reasons for the formation are as follows: dross The metal liquid above is not cleaned, the slag is not good during pouring, and the dross enters the casting with the metal liquid; runner system The design is unreasonable, the slag effect is poor, and the slag entering the pouring system directly enters cavity without being discharged).
[0072] preprocessing the pipeline image data, specifically:
[0073] A self-calibration illumination (SCI) module is designed, which is composed of illumination estimation and self-calibration modules: the image preprocessing of the module has a great influence on the effect of feature extraction and the result of image analysis, because it is difficult to achieve good computer vision effect directly from the original image obtained from the imaging system, and the problem can be improved through one or a series of image preprocessing operations, which specifically include:
[0074] A weight-shared illumination learning mechanism is established, and there is a correlation between the low-illumination image and the clear image that is wanted to be obtained, and the most important component is illumination, which is also the main part that needs to be optimized in the low-light image enhancement, and a lightweight illumination estimation network H θ is constructed by sharing weight parameters, which is used to solve the error accumulation problem caused by the separation of illumination estimation and image enhancement, and the formula is:
[0075]
[0076] In the formula, x 0 is the initialization of the clear image true value, y is the target clear image, x t is the low-illumination input image of the tthiteration, H θ is the weight-shared convolutional network, θ is the learnable parameter, u t is the output of the illumination estimation network; the traditional method (such as histogram equalization) is easy to produce noise amplification under low light conditions, and SCI reduces the illumination estimation error by 37% (experimental data) through iterative optimization, and improves the ability to retain the details of the weld edge;
[0077] Based on the self-calibration module, it is ensured that the outputs at different stages in the training process can converge to the same state, wherein a state convergence module G(x t is introduced to ensure the stability of the illumination parameter output at different training stages and prevent overfitting, and the formula is:
[0078]
[0079] In the formula, represents element-wise multiplication, K v is a learnable convolution kernel used to compensate for illumination bias, z t is the intermediate feature after illumination calibration, s t is a residual compensation term, v t is the stabilized illumination parameter output; verification on the COCO-LOWLIGHT dataset found that the convergence speed of SCI is 2.1 times faster than that of the traditional RetinexNet, and the PSNR is improved by 4.2dB;
[0080] The basic unit of the illumination optimization process is re-formulated as:
[0081] F(x t )→F(G(x t ));
[0082] The weight sharing illumination learning mechanism is adopted, the joint optimization of illumination estimation and image enhancement is realized through sharing weight parameters, the error accumulation problem caused by the separation of illumination estimation and enhancement in traditional methods is solved, the self-calibration module is designed, the state convergence constraint is introduced, the output stability of different stages in the training process is ensured, and the divergence phenomenon in the illumination optimization process is avoided, the traditional method (such as histogram equalization) is prone to over-enhancement / under-enhancement under complex illumination, and the SCI improves the detail retention ability of low-illumination images through end-to-end joint optimization, and experiments show that the mAP of dark light weld images is improved by 12.3%.
[0083] The data set is generated based on the pretreated pipeline image data, specifically:
[0084] In deep learning, labeling a data set is an important step because it allows the model to understand and learn the patterns identified from the data. The process of labeling involves assigning one or more labels to each item in the data set, which represent the item's category, features, or other relevant information. The invention uses babelImg (a python plugin specifically for labeling) to annotate the pictures. When labeling a data set, some basic rules need to be followed to ensure the consistency and accuracy of the labels. The basic rules are as follows:
[0085] 1. Label consistency: Ensure that the label numbers of each data set are consistent to avoid confusion.
[0086] 2. Edge rule: The annotation frame should be drawn close to the edge of the target object, and it should not be too small or too large.
[0087] 3. Occlusion and small target: Even if the target is occluded or very small, as long as the human eye can distinguish it, it needs to be labeled.
[0088] 4. Overlapping rule: When two target objects overlap, as long as the occlusion is less than half, they can be framed.
[0089] 5. Independent rule: Each target object needs to be labeled separately, and cannot be labeled in one frame.
[0090] 6. No frame rule: Do not frame images that are unclear, too dark, or overexposed.
[0091] 7. Boundary check: Ensure that the frame coordinates are not on the image boundary to prevent out-of-bound errors during data loading or expansion.
[0092] By engine-encoding labeling rules (such as occlusion processing and boundary checking) into automated scripts, manual labeling errors are reduced. The offset error of the manually labeled bounding box is reduced from an average of 12.3 pixels to 3.5 pixels, improving the stability of model training.
[0093] Construct a pipeline weld defect detection model, specifically:
[0094] In the traditional YOLOv5s network (structure such as Figure 2 The simAM attention mechanism is added to the backbone network of the improved YOLOv5s network (structured as shown in Figure 3 As shown in the figure, the pipeline weld defect detection model improves the network's ability to extract complex background features and enhances anti-interference effect without adding additional parameters. The original YOLOv5s network already has strong target detection capabilities, but it still has shortcomings when facing the task of detecting small defects. The steps and formulas for integrating the SimAM attention mechanism are as follows:
[0095] S1: First, we need to calculate the spatial importance weight: for the feature map X∈R C×H×W (C is the number of channels, H is the height, and W is the width). First, the mean μ and variance σ of each channel are calculated. Then, the SimAM three-dimensional attention mechanism is integrated to calculate spatial weights based on channel statistics. Spatial weights are generated by the mean-variance statistics between channels, without the need for learnable parameters, which reduces computational complexity. The mean calculation formula is:
[0096]
[0097] The formula for calculating variance is:
[0098]
[0099] Calculate the spatial importance weight using the formula:
[0100]
[0101] Where m is the attention function of the spatial position, ranging from (0 to 1);
[0102] S2: Generate attention feature map: Apply the spatial importance weight m to the original feature map X to obtain the attention feature map X att , which can be achieved by element-wise multiplication, namely:
[0103] X att (c,h,w)=m(h,w)×X(c,h,w), where c∈{1,2,…,C}, h∈{1,2,…,H}, w∈{1,2,…,W};
[0104] S3: Inserting the dynamic weight three-dimensional attention fusion module into the Backbone layer of YOLOv5s, realizing three-dimensional attention collaborative optimization of channel-space-semantics, and setting the output feature map of the convolution layer as X conv (dimension CxHxW), and the output after the SimAM module is X out , setting the output feature map of a certain convolution layer as X conv , the three-dimensional attention fusion process is as follows:
[0105] Channel attention enhancement:
[0106] X ch =F ch (X conv )×X conv ;
[0107] In the formula, F ch is a channel attention module composed of a 1D convolution and a Sigmoid activation function, used to compress the spatial dimension;
[0108] Spatial attention refinement:
[0109] X sp =F sp (X ch )⊙X ch ;
[0110] In the formula, F sp is a spatial attention module using a 3x3 hollow convolution structure to capture multi-scale spatial features, and is a pixel-level mask weighting operation;
[0111] Semantic attention modeling:
[0112]
[0113] In the formula, F sem is a semantic attention module based on the Transformer encoding layer, modeling long-range semantic dependencies, representing feature concatenation + linear projection operation;
[0114] Dynamic fusion output:
[0115] X fused =α·X ch +β·X sp +γ·X sem ;
[0116] In the formula, α, β, γ are dynamic weight coefficients, and the dynamic weight coefficients are obtained through feature statistics, where α is calculated by the L1 norm of the feature map, and β is calculated by the information entropy. The specific formula is:
[0117] γ=1-α-β;
[0118] Where Z is the normalization factor, ||·||1 represents the L1 norm, and Entropy(·) represents the information entropy of the calculated feature map;
[0119] Residual connection output:
[0120] X out =X conv +λ·X fused ;
[0121] Where λ is the residual intensity coefficient, and its initial value is 0.5;
[0122] The above model realizes the three-dimensional complementary mechanism and dynamic regulation characteristics, as follows:
[0123] Adopting a three-dimensional complementary mechanism, it suppresses invalid feature channels through channel attention, focuses on pixels in defective areas through spatial attention, and associates global context through semantic attention;
[0124] It adopts dynamic adjustment characteristics, uses small target defect detection, establishes overall-local part association through semantic modules, improves noise robustness, and forms a "screening-focusing-verification" cascade mechanism; improves generalization ability and can adapt to different lighting / wear conditions.
[0125] The pipeline weld defect detection model is trained as follows:
[0126] 1. Divide the dataset into a validation set and a test set. Randomly divide the dataset into a validation set and a test set in a ratio of 7:3;
[0127] 2. Use the validation set to evaluate the model. There are 6 evaluation indicators:
[0128] (1) Precision: Precision refers to the proportion of true positive examples (actually defects) among all samples predicted as positive examples (detected as defects). The formula is:
[0129]
[0130] Where TP (True Positive) represents a true positive, i.e., the model correctly predicts a defective sample as a defect; FP (False Positive) represents a false positive, i.e., the model incorrectly predicts a normal sample as a defect.
[0131] (2) Recall: Recall refers to the proportion of samples that are correctly predicted as positive (detected as defective) by the model among all samples that are actually positive (actually defective). The formula is:
[0132]
[0133] FN(False Negative) represents false negative examples, i.e. the model incorrectly predicts defect samples as normal;
[0134] (3) Average Precision (AP) first calculates the area under the Precision-Recall Curve. For each class c, the calculation process of AP is as follows
[0135] Let the precision corresponding to different recall rates r be p(r), and the range of recall rate from 0 to 1, In actual calculation, it is usually approximated by numerical integration of discrete recall-precision points. A common approximation method is to use the trapezoidal rule: Where n is the number of recall-precision points, p i and r i are the precision and recall of the i-th point;
[0136] (4) mean Average Precision (mAP): If there are N classes, mAP is the average of all class APs, and its formula is:
[0137]
[0138] (5) Intersection over Union (IoU): IoU is used to measure the overlap between the predicted defect frame and the real defect frame, and its formula is:
[0139]
[0140] Where B p is the predicted bounding box, and B g is the real bounding box. Intersection represents the intersection area of two bounding boxes, and Union represents the union area of two bounding boxes. When evaluating the model, an IoU threshold (such as IoU = 0.5) is usually set, and when the IoU of the predicted frame and the real frame is greater than this threshold, it is considered a correct detection;
[0141] (6) F1-score: F1-score is the harmonic mean of precision and recall, which considers both precision and recall, and its formula is:
[0142]
[0143] In the formula, mAP is an important indicator for comprehensively measuring the detection accuracy of a model, which considers the accuracy under different recall rates and can comprehensively evaluate the detection performance of the model on multiple classes (including defect classes);
[0144] According to the evaluation result, the hyperparameters or model structure of the model are adjusted, if the accuracy is found to be low, the learning rate can be adjusted, the number of training rounds can be increased, or the position of the SimAM module can be modified;
[0145] Final evaluation using the test set. After the model training and verification are completed, the test set is used for final evaluation, and the test set should be data that the model has never touched during the training and verification process, so as to truly reflect the performance of the model in actual application;
[0146] Configure the interface, send the result to the front end, create a route (Route) and a processing function (Handler): select an API development framework; in the processing function, verify the request parameters to ensure the legality of the data; and according to the interface function, implement the business logic in the processing function.
[0147] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts between the various embodiments can be mutually referred to.
[0148] The principles and implementation modes of the present application are described by applying specific examples in this specification. The above description of the embodiments is only used to help understand the method of the present application and its core idea; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation mode and application range will be changed. In summary, the content of the specification should not be understood as a limitation of the present application.
Claims
1. A pipeline weld defect detection system based on SimAM-YOLOv5s, characterized by: include: A pipeline image data acquisition module is used to acquire pipeline image data; A pipeline image data preprocessing module, used for preprocessing pipeline image data; A data set generation module, used to generate a data set based on the preprocessed pipeline image data; Pipeline weld defect detection model building module, used to build a pipeline weld defect detection model; Pipeline weld defect detection model training module, used to train the pipeline weld defect detection model; The pipeline weld defect detection module is used to input the collected pipeline image data into the trained pipeline weld defect detection model to obtain the detection results.
2. A pipeline weld defect detection method based on SimAM-YOLOv5s, characterized in that: include: Get pipeline image data; Formulate weld quality inspection and evaluation standards; Preprocess pipeline image data; Generate a dataset based on the preprocessed pipeline image data; Construct a pipeline weld defect detection model; Training pipeline weld defect detection models; The collected pipeline image data is input into the trained pipeline weld defect detection model to obtain the detection results.
3. The method according to claim 2, characterized in that The weld quality inspection and evaluation criteria specifically include: Weld dimensions, including length, width, thickness, centerline offset, and centerline bending deviation; Weld cracks, including hot cracks, cold cracks, reheat cracks and lamellar tearing; surface pores; Slag inclusions in welds.
4. The method according to claim 3, characterized in that Preprocess the pipeline image data, specifically: A self-calibration lighting module is designed, which consists of an illumination estimation module and a self-calibration module. The pipeline image data is preprocessed based on the illumination estimation module and the self-calibration module. Specifically, the following steps are performed: Establish a weight-sharing lighting learning mechanism and construct a lightweight lighting estimation network H by sharing weight parameters θ , which is used to solve the error accumulation problem caused by the separation of illumination estimation and image enhancement. Its formula is: Where x 0 To initialize the true value of the clear image, y is the target clear image, x t is the low-light input image of the tth iteration, H θ It is a weight-sharing convolutional network, θ is a learnable parameter, u t is the output of the lighting estimation network; Based on the self-calibration module, the outputs at different stages of the training process can converge to the same state, wherein the state convergence module G(x t ), to ensure the stability of the output illumination parameters at different training stages and prevent overfitting. The formula is: Where ⊙ represents element-by-element multiplication, K v is a learnable convolution kernel used to compensate for illumination deviation, z t is the intermediate feature after illumination calibration, s t is the residual compensation term, v t is the stabilized lighting parameter output; The basic unit of the lighting optimization process is reformulated as: F(x t )→F(G(x t ))。 5. The method according to claim 4, characterized in that Generate a dataset based on the preprocessed pipeline image data, specifically: The preprocessed pipeline image data is annotated based on babelImg, one or more labels are assigned to each image in the pipeline image data, and finally a dataset is generated.
6. The method according to claim 5, characterized in that Construct a pipeline weld defect detection model, specifically: The simAM attention mechanism is added to the backbone network of the traditional YOLOv5s network, the attention weight is extended to the three-dimensional level, and the improved YOLOv5s network is used as a pipeline weld defect detection model.
Citation Information
Patent Citations
Weld defect identification method and system
CN116563230A
Improved lightweight weld defect recognition algorithm based on YOLOv5
CN117095234A
Cited By
Wind power steel pipe pile welding seam quality detection system based on machine vision
CN121962046A
X-ray weld defect detection method based on structure degradation correction and parallel response recombination
CN121981993A