A method for inspecting the quality of pipeline girth weld radiographs
By adopting deep learning methods in industrial ray image quality inspection, combining image enhancement and multi-scale feature extraction, a single-stage instance segmentation algorithm is designed, which solves the problem of low detection accuracy in traditional technology and realizes high-precision recognition of image quality in industrial negatives It can reduce the error detection rate and improve detection efficiency and accuracy.
Patent Information
- Application Number
- CN202210028163.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-11
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2042-01-11
AI Technical Summary
In the existing technology, in the industrial field, traditional image recognition technology has low detection accuracy and is difficult to adapt to the complex environment of industrial negatives. In particular, the target features are not significant and the image content is large, which makes it difficult to detect, and deep learning methods are Applications in this field have not been fully explored.
Using deep learning-based pipeline ring weld ray image quality inspection method, including preprocessing module, deep learning module and post-processing module, single-stage examples are designed through the technology of image enhancement, multi-scale feature extraction, image segmentation and mask fusion. Segmentation algorithm to improve detection accuracy and efficiency.
It realizes high-precision image recognition meter in industrial negative images, reduces false detection and error detection rates, improves algorithm computing efficiency, ensures the accuracy and real-time detection, and is suitable for industrial applications with high precision requirements.
Smart Images

Figure CN114387245B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the fields of industrial radiographic quality inspection and artificial intelligence technology, and in particular to a pipeline girth weld radiographic quality inspection method. Background Art
[0002] Industrial X-ray films are widely used for non-destructive X-ray inspection of device profiles, parts or welds made of ferrous metals, non-ferrous metals and their alloys or other materials with small decay coefficients. Industrial films preserve the radiographic images of the filmed parts and must be well preserved. Quality inspection is an important part of the preservation and use of industrial films, and it is necessary to use digital and intelligent means for inspection.
[0003] The existing detection technologies include: traditional image recognition technology, machine learning algorithms, algorithms based on deep learning, etc. Among them, traditional image recognition technology was proposed the earliest and is the most widely used. However, its detection accuracy is low and it is not suitable for applications in fields with high precision requirements. In recent years, with the gradual advancement of hardware equipment, especially the substantial improvement in GPU computing power, hardware computing power no longer constitutes a bottleneck for the use of algorithms. Detection algorithms based on big data and deep learning have developed rapidly. A series of detection algorithms such as Faster R-CNN, SSD, Yolo, Mask R-CNN, FCN, etc. have been proposed. They have good detection effects, high accuracy, and strong applicability, and are widely used in many industries such as industry, Internet, and public services.
[0004] By consulting the literature, we found that previous image recognition was mostly focused on object recognition, face recognition, and license plate recognition. In these fields, the target features are significant, the image color is saturated, the image brightness is high, and the boundaries are clear, so the recognition difficulty is relatively low. However, due to the actual environment, industrial films have no color data, the grayscale changes are small, the target features are not significant, and the image content is large, which greatly increases the difficulty of detection.
[0005] Therefore, it is necessary to use deep learning methods to replace traditional methods to detect film image quality meters. Deep learning methods have strong detection capabilities. Therefore, based on the above restrictions, it is necessary to use a new, appropriate, and efficient method to identify film type numbers based on the uniqueness of industrial film images, while ensuring high detection precision and accuracy, reducing false detection and wrong detection, and improving algorithm operation efficiency. Summary of the invention
[0006] In order to solve the above technical problems, the present invention provides a method for inspecting the quality of pipeline girth weld radiographs.
[0007] The specific technical solutions are as follows:
[0008] A pipeline girth weld radiographic quality inspection method based on deep learning and image processing, comprising a preprocessing module, a deep learning module, a post-processing module and a quality inspection module;
[0009] The preprocessing module reads the digitized film image, converts it into a suitable format and size, performs image enhancement, filling, normalization, etc., adds noise, Mixup, Mosaic, color conversion, etc., and transmits it to the deep learning module;
[0010] The deep learning module includes a backbone network submodule and an image segmentation submodule; the backbone network submodule is used to extract multi-scale features of the input image, perform multi-layer feature fusion, and transmit the features to the image segmentation submodule; the image segmentation submodule is used to generate an image segmentation Mask and parameters such as confidence and offset corresponding to the Mask, and give the final generated segmentation result;
[0011] The post-processing module is used to restore and process the segmentation results given by the deep learning module, including mask size restoration, useless information deletion, mask merging into the original image, result drawing, etc., and normalize the obtained results and return them to the system;
[0012] The quality inspection module determines the number of identifiable image quality indicators contained in the detection result given by the post-processing module, and then determines the quality of the film using the image quality indicator information of the film.
[0013] The output image size of the preprocessing module is determined according to the actual image size and the input size required by the algorithm model.
[0014] The radiographic quality inspection method for pipeline girth welds includes the following steps:
[0015] Step 1: Image data preprocessing
[0016] Step 1.1: Data reading
[0017] The data includes original DICOM data and image data;
[0018] According to the original image DICOM data, the pixel data is taken out and converted into an unsigned 8-bit integer type according to the number of data bits to obtain the single-channel grayscale image data to be detected.
[0019] Step 1.2: Data preprocessing
[0020] In the original image, a rectangular frame is used to mark the image quality meter part, and a marking frame and label are generated; the original marking contains (x min ,y min ,x max ,y max), which are the coordinate values of the upper left corner and the lower right corner of the rectangular box respectively; the label content is pre-set and can reflect the simple text that the labeled content is the image quality meter;
[0021] According to the statistics of existing image data, since the image size is much larger than the input size that the deep learning model can accept, the original image is sliced into smaller images. The image is sliced in a square shape and the sliced images are scaled to the size accepted by the model.
[0022] Using a variety of methods to process and enhance the square-sized images after segmentation is conducive to increasing the robustness of the model and improving the accuracy: using mixup to process images and randomly adjust the image transparency; using mosaic processing, randomly selecting different images, intercepting parts of them and splicing them together, and the size of the spliced images remains unchanged, which can significantly increase the generalization ability of the model; using the relief algorithm to increase the contrast of the edges in the image; taking other processing methods, such as translation, flipping, HSV-Hue, HSV-Saturation, HSV-Value, etc., to improve the training accuracy; according to data statistics, the global contrast and brightness distribution range of the film is relatively fixed, so according to the outlier detection principle, when the image contrast and brightness are abnormal, they can be globally corrected, and the statistical results of the data set can be used as the correction reference value.
[0023] The pixel value distribution range of traditional grayscale images is too large, which is not conducive to model convergence. Therefore, standardization is required to transform the image pixel distribution range from [0,255] to [0,1]; this is conducive to accelerating model convergence and avoiding gradient instability. This can improve training and reasoning efficiency, reduce training time, and prevent overfitting.
[0024] Step 2: Image Detection
[0025] Step 2.1: Model construction
[0026] The processed images and labels are fed into the algorithm model for training. Using GPU acceleration for training can significantly increase the training speed.
[0027] The algorithm model uses the yolact model for image segmentation, and the backbone part uses the Resnet system. The number of layers of the Resnet-50 network is 5, and the FLOPs is 3.8×10 9 , which can provide good image feature extraction capabilities;
[0028] Layer1 of the Resnet network uses a single layer of Conv 7×7, with an output channel of 64 and an output size of 112×112. The feature output of this layer is called C1; Layer2 uses Conv 1×1 and Conv 3×3, with an output channel of 256 and an output size of 56×56. The feature output of this layer is called C2; Layer3 uses Conv 1×1 and Conv 3×3, with an output channel of 512 and an output size of 28×28. The feature output of this layer is called C3; Layer4 uses Conv 1×1 and Conv 3×3, with an output channel of 1024 and an output size of 14×14. The feature output of this layer is called C4; Layer5 uses Conv 1×1, Conv 3×3, with an output channel of 2048 and an output size of 7×7. The feature output of this layer is called C5. From C1 to C5, the resolution of the feature map decreases successively, and the semantic features are gradually enriched;
[0029] Use C3, C4, and C5 to obtain P3, P4, P5, P6, and P7 in FPN through Conv, downsampling, and bilinear interpolation; the P3 feature is sent to Protonet, and P3-P7 are sent to Prediction Head for parallel calculation;
[0030] The input of Protonet is P3. After Conv 3×3, the output is 138×138×32, which is the generated mask template. The output mask template is activated using the ReLU activation function to increase the accuracy of the template.
[0031] The input of Prediction Head is P3-P7. Each feature map generates an Anchor, and each pixel generates 3 Anchors with a ratio of 1:1, 1:2, and 2:1. The basic side lengths of P3-P7 Anchors are 24, 48, 96, 192, and 384 respectively. The basic side lengths are adjusted according to different ratios to ensure that the Anchor areas are equal. Each Anchor generates 4+c+k coefficients, which are 4 bbox rectangular frame coefficients, c category confidences, and k Mask coefficients:
[0032] (x,y,w,h,conf0,conf1,...,conf c_1 ,m0,m1,...,m k_1 ) (1)
[0033] Among them, x, y, w, h are bbox rectangular box coefficients, conf is the category confidence, and m is the Mask coefficient;
[0034] In order to generate an instance Mask, the mask template and the mask coefficient need to be synthesized; the former is linearly combined with the latter to perform matrix multiplication:
[0035] M=σ(PC T ) (2)
[0036] Where P is the mask template of h×w×k, C is the mask coefficient of n×k, indicating that there are n filtered instances, and M is the synthesized mask;
[0037] Loss consists of three parts: classification loss, bbox bounding box regression loss and mask loss. The classification loss uses softmax CE cross entropy, the bbox bounding box regression loss uses Smooth-L1 Loss, and the mask loss is the pixel-by-pixel two-class sigmoid cross entropy of the predicted mask and the ground truth mask.
[0038] The large target in the Loss has a larger area, and its impact on the final Loss is significantly greater than that of the small target. In order to improve the segmentation effect of small targets, they are first cropped according to the detection frame during inference, and then thresholded. During training, the ground truth frame with the actual annotation label is used for cropping, and the Loss scale is balanced by dividing it by the area of the corresponding ground truth annotation frame to increase the influence of small targets on the Loss. The cropping operation increases the transfer variance of the model and increases the position prediction accuracy of the model.
[0039] In order to further speed up the algorithm efficiency and achieve real-time detection, the FastNMS algorithm is used in the NMS non-maximum suppression step to convert NMS into a parallel matrix operation, directly calculate the IoU between all rectangular boxes, and filter out the non-maximum confidence rectangular boxes with IoU greater than the threshold, to replace the serial operation of the traditional NMS. With this change, the overall time consumption of the algorithm is effectively controlled while the algorithm accuracy is only slightly reduced, and the detection efficiency of the algorithm reaches real-time performance;
[0040] Step 2.2: Model training
[0041] The training data set uses industrial X-ray film images. The image quality indicators in the images are manually annotated and the label file format is unified. The model is trained using the above data set and the hardware is accelerated using NVIDIA GPU. The model is trained until it is usable, and the model mAP@.5:.95 is 52.4.
[0042] AP=∫p(r)dr mAP=mean(∑AP) (3)
[0043] Among them, p(r) is the Precision-Recall curve, AP is the area under the PR curve in the same category, and mAP is the average AP of all categories;
[0044] Step 2.3: Model Inference
[0045] Use the trained model for inference. Before inference, perform the image segmentation step in image preprocessing to segment the original image into small images. When segmenting, keep a certain length of overlap between adjacent images. Other preprocessing steps are only applicable to the training stage and do not need to be performed.
[0046] Step 3: Algorithm post-processing
[0047] After the image is scaled, it needs to be restored to its original size; the Mask generated by image segmentation needs to be transformed accordingly according to the image scaling factor:
[0048] r=w0 / w (4)
[0049] m0=resize(m,r) (5)
[0050] Where w0 is the size of the original image, and the image is a square with equal height and width; w is the size of the scaled image, r is the image scaling ratio, m is the mask generated by the algorithm, m0 is the adjusted mask, and resize is an interpolation transformation of m with a scale of r;
[0051] Since the original industrial film image has been segmented, the detection results need to be merged into the original image:
[0052] x0=(wo)×ib (6)
[0053] Among them, x0 is the x value of the coordinate of the upper left point of the current segmented image in the original image, w is the size of the segmented image, o is the overlapping length between the segmented images, i is the current segmented image index with a minimum value of 0, and b is the padding value on the left side of the original image; place the image at the corresponding position according to the required x0 value, and it can be merged into the original image;
[0054] After the images are merged, the detection result masks between different images may overlap, resulting in repeated detection. Here, the Fast NMS algorithm is also used for processing, and the detection frames with less confidence than the largest ones in the overlapping detection frames are removed to obtain non-duplicate detection results. The final detection results include: detection frame, mask of the instance in the frame, and the corresponding target category.
[0055] Step 4: Quality Check
[0056] The number of image quality indicators detected in step 3 is counted, and combined with the image quality indicator information of the film, the image quality indicator thread number in the film identified by the algorithm is determined, thereby obtaining the quality information of the detected film.
[0057] The image detection deep learning model described in step 2, the model training and prediction methods are as follows:
[0058] The labeled data are sent to the neural network in batches. The data includes preprocessed image data and its corresponding label file; the label file includes the label box, the instance mask in the label box, and the corresponding category number; the network training method uses the SGD gradient descent method, and momentum is set to accelerate model optimization; L2 regularization is used to control the degree of model fitting; the loss function consists of three parts: classification loss, bounding box regression loss, and mask loss; lr is set to 0.01; the model is trained for 300 epochs, and the completion of all data training is counted as one training epoch;
[0059] During prediction, the image data to be predicted is read and converted into RGB three-channel data, processed according to the above preprocessing method, sent to the model for inference, and then post-processed to obtain the final prediction result. The prediction supports batch prediction, which can improve the prediction speed.
[0060] Compared with the prior art, the present invention has the following beneficial technical effects:
[0061] (1) The present invention is different from the traditional detection methods in the past. The present invention adopts an industrial film quality detection algorithm based on a deep learning method, which includes a deep learning algorithm model and a film quality detection algorithm. The use of this algorithm can effectively improve the recognition accuracy. In addition, in order to ensure the accuracy of the deep learning algorithm, the present invention uses an algorithm based on single-stage instance segmentation to detect the image quality meter in the image, thereby determining the film quality. A large number of optimizations are added to the algorithm model, including the design of the network structure, the structure of the dual-branch mask parallel detection, the optimization of the mask fusion, the design of the loss function, etc., which comprehensively improves the accuracy of the algorithm. Different from the two-stage detection algorithm, the single-stage algorithm has a fast reasoning speed, low resource consumption, and broad application prospects.
[0062] (2) The present invention designs a suitable image data pre-processing algorithm based on the characteristics of the film image. A variety of image optimization and enhancement methods are adopted. After the image is segmented, it is combined into batches for model reasoning. After reasoning, the reasoning results are restored and merged, and non-maximum suppression is applied again to remove duplicate detections. Finally, the quality of the film to be tested is determined based on the detected image quality meter information.
[0063] (3) The degree of coupling between the modules of the present invention is low, which facilitates subsequent upgrading and maintenance, making the algorithm more valuable for practical engineering applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 Training parameters for the detection model of the present invention;
[0065] Figure 2 A curve related to the detection model of the present invention;
[0066] Figure 3 This is an output result example 1 of the present invention;
[0067] Figure 4 This is output result example 2 of the present invention; DETAILED DESCRIPTION
[0068] The present invention is described in detail below in conjunction with the accompanying drawings, but the protection scope of the present invention is not limited by the embodiments.
[0069] Embodiment 1:
[0070] Step 1: Image data preprocessing.
[0071] Step 1.1: Data reading. All samples are collected from real industrial X-ray film, scanned by a scanner and stored in a DICOM file. The labeler uses the labeling software to label the data set and generate a label file. Each image corresponds to a label file.
[0072] In the label file, each annotation box includes: class, x_center, y_center, width, height, mask, which respectively refer to: sample label, x-coordinate of the center point of the annotation box, y-coordinate of the center point of the annotation box, width of the annotation box, height of the annotation box, and instance mask. Except for the label, the other values of the above annotation information need to be normalized, and the sliced image is used as the benchmark during processing. Each image containing annotations must correspond to one annotation information.
[0073] Step 1.2: Data preprocessing. The original image width pixel value is greater than 15000. When segmenting, the width and height of the small image are both 648, the overlap is set to 200, and the number of segmented images is determined according to the actual original image size. After the image is segmented, the image optimization and enhancement algorithm is applied to the image, and normalization is performed.
[0074] Step 2: Image detection.
[0075] Step 2.1: Model construction. The model is built using default parameters, the model framework uses Pytorch, and the operating system uses Linux.
[0076] Step 2.2: Model training. Use a batch size of 32, use an NVIDIA GPU to train the model, use 24GB of video memory per card, 64GB of system RAM, and use an i9-10980XE CPU. See the model training parameters for details. Figure 1 , the lr learning rate is set to 0.01, and a variety of image enhancement methods are used. After the model training is completed, the relevant indicators are shown in Figure 2 , after 400 iterations, the model mAP@.5 is about 0.9.
[0077] Step 2.3: Model inference. During inference, a single original image is segmented into batches and sent to the model for inference. During Fast NMS processing, the IoU threshold is 0.4 and the confidence threshold is 0.1. For detection boxes with an IoU greater than 0.4, the confidence that is not the maximum value is suppressed, and all detection boxes with a confidence lower than 0.1 are removed.
[0078] Step 3: Algorithm post-processing. The image size of the detection box and mask is transformed back to 648, and merged into the original image based on the overlap length of 200. The parameters used by the global Fast NMS are the same as the above steps.
[0079] Step 4: Quality inspection. Determine the film quality meter thread number, and sum the number of quality meters detected by the algorithm to obtain the largest quality meter thread number, which is the conclusion of the film quality inspection. The output results of the inspection are shown in Figure 3 and Figure 4 The number of image quality meters marked in the figure is the final inspection result.
Claims
1. A method for inspecting the quality of pipeline girth weld radiographs, characterized in that: Based on deep learning and image processing, it includes pre-processing module, deep learning module, post-processing module and quality inspection module; The preprocessing module reads the digitized film image, converts it into a suitable format and size, performs image enhancement, padding, normalization, adding noise, Mixup, Mosaic, color conversion, and transmits it to the deep learning module; The deep learning module includes a backbone network submodule and an image segmentation submodule; the backbone network submodule is used to extract multi-scale features of the input image, perform multi-layer feature fusion, and transmit the features to the image segmentation submodule; the image segmentation submodule is used to generate an image segmentation Mask and the confidence and offset parameters corresponding to the Mask, and give the final generated segmentation result; The post-processing module is used to restore and process the segmentation results given by the deep learning module, including mask size restoration, useless information deletion, mask merging into the original image, result drawing, and normalizing the obtained results and returning them to the system; The quality inspection module determines the number of identifiable image quality meters contained in the test results given by the post-processing module, and then uses the image quality meter information of the film to determine the quality of the film; The steps include: Step 1: Image data preprocessing Step 1.1: Data reading The data includes original DICOM data and image data; According to the original image DICOM data, the pixel data is taken out and converted into an unsigned 8-bit integer type according to the number of data bits to obtain the single-channel grayscale image data to be detected; Step 1.2: Data preprocessing In the original image, a rectangular frame is used to mark the image quality meter part, and a marking frame and label are generated; the original marking contains (x min ,y min ,x max ,y max ), which are the coordinate values of the upper left corner and the lower right corner of the rectangular box respectively; the label content is pre-set and can reflect the simple text that the labeled content is the image quality meter; According to the statistics of existing image data, since the image size is much larger than the input size that the deep learning model can accept, the original image is sliced into smaller images. The image is sliced in a square shape and the sliced images are scaled to the size accepted by the model. Step 2: Image Detection Step 2.1: Model construction The processed images and labels are fed into the algorithm model for training. Using GPU acceleration for training can significantly increase the training speed. The algorithm model uses the yolact model for image segmentation, and the backbone part uses the Resnet system. The number of layers of the Resnet-50 network is 5, and the FLOPs is 3.8×10 9 , which can provide good image feature extraction capabilities; Layer1 of the Resnet network uses a single layer of Conv 7×7, with an output channel of 64 and an output size of 112×112. The feature output of this layer is called C1; Layer2 uses Conv 1×1 and Conv 3×3, with an output channel of 256 and an output size of 56×56. The feature output of this layer is called C2; Layer3 uses Conv 1×1 and Conv 3×3, with an output channel of 512 and an output size of 28×28. The feature output of this layer is called C3. Layer4 uses Conv1×1 and Conv 3×3, the output channel is 1024, the output size is 14×14, and the feature output of this layer is called C4; Layer5 uses Conv 1×1, Conv 3×3, the output channel is 2048, the output size is 7×7, and the feature output of this layer is called C5; From C1 to C5, the resolution of feature maps decreases, and the semantic features become richer. Use C3, C4, and C5 to obtain P3, P4, P5, P6, and P7 in FPN through Conv, downsampling, and bilinear interpolation; the P3 feature is sent to Protonet, and P3-P7 are sent to Prediction Head for parallel calculation; The input of Protonet is P3. After Conv 3×3, the output is 138×138×32, which is the generated mask template. The output mask template is activated using the ReLU activation function to increase the accuracy of the template; The input of Prediction Head is P3-P7. Each feature map generates an Anchor, and each pixel generates 3 Anchors with a ratio of 1:1, 1:2, and 2:
1. The basic side lengths of P3-P7 Anchors are 24, 48, 96, 192, and 384 respectively. The basic side lengths are adjusted according to different ratios to ensure that the Anchor areas are equal. Each Anchor generates 4+c+k coefficients, which are 4 bbox rectangular frame coefficients, c category confidences, and k Mask coefficients: Among them, x, y, w, h are bbox rectangular box coefficients, conf is the category confidence, and m is the Mask coefficient; In order to generate an instance Mask, the mask template and the mask coefficient need to be synthesized; the former is linearly combined with the latter to perform matrix multiplication: M=σ(PC T ) (2) Where P is the mask template of h×w×k, C is the mask coefficient of n×k, indicating that there are n filtered instances, and M is the synthesized mask; Loss consists of three parts: classification loss, bbox bounding box regression loss and mask loss. The classification loss uses softmax CE cross entropy, the bbox bounding box regression loss uses Smooth-L1 Loss, and the mask loss is the pixel-by-pixel two-class sigmoid cross entropy of the predicted mask and the ground truth mask. The area of large targets in the Loss is larger, and the impact on the final Loss is significantly greater than that of small targets. In order to improve the segmentation effect of small targets, they are first cropped according to the detection frame during inference, and then thresholded. During training, the ground truth frame with the actual label is used for cropping, and the Loss scale is balanced by dividing it by the area of the corresponding ground truth label frame to increase the impact of small targets on the Loss. The cropping operation increases the transfer variance of the model and increases the position prediction accuracy of the model. In order to further accelerate the efficiency of the algorithm and achieve real-time detection, the Fast NMS algorithm is used in the NMS non-maximum suppression step to convert NMS into a parallel matrix operation, directly obtain the IoU between all rectangular boxes, and filter out the non-maximum confidence rectangular boxes whose IoU is greater than the threshold, to replace the serial operation of the traditional NMS. With this change, the overall time consumption of the algorithm is effectively controlled while the algorithm accuracy is only slightly reduced, and the detection efficiency of the algorithm reaches real-time performance. Step 2.2: Model training The training data set uses industrial X-ray film images. The image quality indicators in the images are manually annotated and the label file format is unified. The model is trained using the above data set and the hardware is accelerated using NVIDIA GPU. The model is trained until it is usable, and the model mAP@.5:.95 is 52.
4. AP=∫p(r)dr mAP=mean(∑AP) (3) Among them, p(r) is the Precision-Recall curve, AP is the area under the PR curve in the same category, and mAP is the average AP of all categories; Step 2.3: Model Inference Use the trained model for inference. Before inference, perform the image segmentation step in image preprocessing to segment the original image into small images. When segmenting, keep a certain length of overlap between adjacent images. Other preprocessing steps are only applicable to the training stage and do not need to be performed. Step 3: Algorithm post-processing After the image is scaled, it needs to be restored to its original size; the Mask generated by image segmentation needs to be transformed accordingly according to the image scaling factor: r=w0 / w (4) m0=resize(m,r) (5) Where w0 is the size of the original image, and the image is a square with equal height and width; w is the size of the scaled image, r is the image scaling ratio, m is the mask generated by the algorithm, m0 is the adjusted mask, and resize is an interpolation transformation of m with a scale of r; Since the original industrial film image has been segmented, the detection results need to be merged into the original image: x0=(wo)×ib (6) Among them, x0 is the x value of the coordinate of the upper left point of the current segmented image in the original image, w is the size of the segmented image, o is the overlapping length between the segmented images, i is the current segmented image index with a minimum value of 0, and b is the padding value on the left side of the original image; place the image at the corresponding position according to the required x0 value, and it can be merged into the original image; After the images are merged, the detection result masks between different images may overlap, resulting in repeated detection. Here, the Fast NMS algorithm is also used for processing, and the detection frames with less confidence than the largest ones in the overlapping detection frames are removed to obtain non-duplicate detection results. The final detection results include: detection frame, mask of the instance in the frame, and the corresponding target category. Step 4: Quality Check The number of image quality indicators detected in step 3 is counted, and combined with the image quality indicator information of the film, the image quality indicator thread number in the film identified by the algorithm is determined, thereby obtaining the quality information of the detected film.
2. The pipeline girth weld radiographic quality inspection method according to claim 1 is characterized in that: The output image size of the preprocessing module is determined according to the actual image size and the input size required by the algorithm model.
3. The pipeline girth weld radiographic quality inspection method according to claim 1 is characterized in that: The image detection deep learning model described in step 2, the model training and prediction methods are as follows: The labeled data are sent to the neural network in batches. The data includes preprocessed image data and its corresponding label file; the label file includes the label box, the instance mask in the label box, and the corresponding category number; the network training method uses the SGD gradient descent method, and momentum is set to accelerate model optimization; L2 regularization is used to control the degree of model fitting; the loss function consists of three parts: classification loss, bounding box regression loss, and mask loss; lr is set to 0.01; the model is trained for 300 epochs, and the completion of all data training is counted as one training epoch; During prediction, the image data to be predicted is read and converted into RGB three-channel data, processed according to the above preprocessing method, sent to the model for inference, and then post-processed to obtain the final prediction result; the prediction supports batch prediction, which can improve the prediction speed.
Citation Information
Patent Citations
Nuclear power pipeline defect detection system based on deep learning attention mechanism
CN111899224A
Intelligent detection method for weld defects of radiographic industrial negative film
CN112184693A
