Weld defect determination method and device, computer equipment and storage medium

By standardizing and de-standardizing the weld defect images, and using the trained weld recognition model, the accuracy and efficiency of weld defect recognition are improved, and the problems of low recognition efficiency and low accuracy in the existing technology are solved. problem and reduce waste of resources.

CN118747739APending Publication Date: 2024-10-08CHINA UNIV OF PETROLEUM (BEIJING)

Patent Information

Application Number
CN202410807767.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-21
Publication Date
2024-10-08

AI Technical Summary

Technical Problem

In the existing technology, the efficiency of weld defect identification is low and resources are wasted. The accuracy of manual identification is not high. The accuracy of identification based on artificial intelligence is also limited by the problem of different sample numbers and shooting levels.

Method used

By standardizing the image of the weld defect to be determined, using the trained weld recognition model for processing, the standard weld defect data is obtained, and denormalization is performed to determine the target weld defect data, thereby improving the recognition accuracy and efficiency and reducing the Waste of resources.

Benefits of technology

The accuracy and efficiency of weld defect identification are improved, resource waste is reduced, and the problems of low identification efficiency and low accuracy in the existing technology are solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118747739A_ABST
    Figure CN118747739A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of pipeline defect detection, in particular to a welding seam defect determination method and device, computer equipment and a storage medium, and the welding seam defect determination method comprises the following steps: performing standardization processing on a to-be-determined welding seam defect image to obtain an input welding seam image; processing the input welding seam image by using the trained welding seam identification model to obtain standard welding seam defect data corresponding to the input welding seam image; and performing inverse standardization processing on the standard weld defect data, and determining target weld defect data corresponding to the to-be-determined weld defect image. According to the embodiment of the invention, in the defect identification process, the identification accuracy and the identification efficiency are improved, and the resource waste is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present specification relates to the technical field of pipeline defect detection, and in particular to a weld defect determination method, device, computer equipment and storage medium. Background Art

[0002] Currently, non-destructive testing of pipeline welds is mostly achieved by taking photos and identifying the defects of the welds to be determined. Defect identification methods include manual methods, which result in low efficiency and waste of resources; and defect identification based on artificial intelligence methods, which has low recognition accuracy due to the small number of samples for model training and the different shooting levels of the samples.

[0003] How to improve recognition accuracy and efficiency and reduce resource waste in the defect recognition process is an urgent problem to be solved in the existing technology. Summary of the invention

[0004] To solve the problems in the prior art, the embodiments of this specification provide a weld defect determination method, apparatus, computer equipment and storage medium, which perform standardized processing on the weld defect image to be determined to obtain an image that can be efficiently and accurately recognized by a trained weld recognition model; the image is then processed using the trained weld recognition model to obtain the final target defect data, thereby improving the recognition accuracy and efficiency and reducing resource waste during the defect recognition process.

[0005] In order to solve the above technical problems, the specific technical solutions of this specification are as follows:

[0006] On the one hand, an embodiment of the present specification provides a method for determining weld defects, comprising:

[0007] Performing standardization processing on the weld defect image to be determined to obtain an input weld image;

[0008] Processing the input weld image using the trained weld recognition model to obtain standard weld defect data corresponding to the input weld image; and

[0009] The standard weld defect data is subjected to inverse normalization processing to determine target weld defect data corresponding to the weld defect image to be determined.

[0010] Furthermore, the step of performing standardization processing on the weld defect image to be determined to obtain the input weld image further includes:

[0011] Cutting the weld defect image to be determined to obtain a plurality of sub-images to be standardized; and

[0012] A magnification process is performed on each of the sub-images to obtain the input weld image.

[0013] Furthermore, the training method of the trained weld recognition model further includes:

[0014] Performing standardization processing on the original weld image to obtain a sample weld image;

[0015] Annotating the sample weld images to determine annotation information corresponding to each of the sample weld images; and

[0016] The sample weld image and the annotation information are used to train a preset weld recognition model to obtain the trained weld recognition model.

[0017] Furthermore, the standardization process is performed on the original weld image to obtain the sample weld image, which further includes:

[0018] Cutting the original weld image to be processed to obtain a plurality of sample sub-images to be processed by standardization;

[0019] Performing a magnification process on each of the sample sub-images to obtain a sample input weld image; and

[0020] Sample expansion is performed on the sample input weld image to obtain the sample weld image.

[0021] Further, the sample expansion is performed on the sample input weld image to obtain the sample weld image further comprising:

[0022] Determining a target type image corresponding to a target type weld from the input weld image;

[0023] Processing the target type image using a data enhancement algorithm to obtain an expanded image; and

[0024] The expanded image and the input weld image are both used as the sample weld images.

[0025] Furthermore, the step of cutting the weld defect image to be determined to obtain a plurality of sub-images to be standardized further includes:

[0026] Based on the height pixel unit of the weld defect image to be determined, the weld defect image to be determined is cut into squares to obtain a plurality of sub-images to be standardized; and

[0027] The enlarging process is performed on each of the sub-images to obtain the input weld image, comprising:

[0028] The sub-image is processed by using a bicubic interpolation algorithm to obtain the input weld image.

[0029] Further, the performing of inverse normalization processing on the standard weld defect data to determine the target weld defect data corresponding to the weld defect image to be determined further includes:

[0030] Determining defect frame coordinate data based on the standard weld defect data; and

[0031] The defect frame coordinate data is processed using a pixel unit conversion formula to obtain the target weld defect data.

[0032] Furthermore, the pixel unit conversion formula further includes,

[0033]

[0034] F1=|x1-x2|×K

[0035] F2=|y1-y2|×K

[0036] Among them, L represents the distance from the center position of the defect to the leftmost side of the weld defect image to be determined; U represents the distance from the center position of the defect to the topmost end of the weld defect image to be determined; F1 represents the length of the defect; F2 represents the width of the defect, x1 represents the horizontal coordinate of the upper left corner of the defect frame in the defect frame coordinate data, x2 represents the horizontal coordinate of the lower right corner of the defect frame in the defect frame coordinate data, y1 represents the vertical coordinate of the upper left corner of the defect frame in the defect frame coordinate data, y2 represents the vertical coordinate of the lower right corner of the defect frame in the defect frame coordinate data, and K represents the conversion coefficient.

[0037] Furthermore, the conversion coefficient determination formula further includes,

[0038]

[0039] Wherein, K represents the conversion coefficient, and H is the height pixel data of the weld defect image to be determined.

[0040] On the other hand, the embodiment of this specification also provides a device for determining weld defects, comprising:

[0041] A first processing unit is used to perform standardization processing on the weld defect image to be determined to obtain an input weld image;

[0042] A second processing unit is used to process the input weld image using the trained weld recognition model to obtain standard weld defect data corresponding to the input weld image; and

[0043] The third processing unit is used to perform inverse normalization processing on the standard weld defect data to determine target weld defect data corresponding to the weld defect image to be determined.

[0044] On the other hand, an embodiment of the present specification further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the computer program.

[0045] On the other hand, an embodiment of the present specification further provides a computer-readable storage medium on which computer instructions are stored, and the computer instructions implement the above method when executed by a processor.

[0046] On the other hand, an embodiment of the present specification further provides a computer program product, including a computer program / instruction, and a method implemented when the computer program / instruction is executed by a processor.

[0047] Using the embodiments of the present specification, a standardization process is performed on a weld defect image to be determined that needs to be identified, and an input weld image is obtained; the input weld image is processed using a trained weld recognition model to obtain standard weld defect data corresponding to the input weld image; and the defect data is inversely standardized to determine the target weld defect data corresponding to the weld defect image to be determined. Thus, since the weld defect image to be determined is firstly subjected to standardization process, for example, an image that can be efficiently and accurately identified by the trained weld recognition model is obtained; the image is processed using the trained weld recognition model to obtain the corresponding standard weld defect data; and then the standard weld defect data is inversely converted to obtain the target weld defect data corresponding to the defect frame on the weld defect image to be determined, thereby improving the recognition accuracy and efficiency and reducing the waste of resources during the defect recognition process. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0049] Figure 1 It is a schematic diagram of a system for implementing a method for determining weld defects according to an embodiment of this specification;

[0050] Figure 2 Shown is a flow chart of a method for determining weld defects according to an embodiment of this specification;

[0051] Figure 3 It is a flowchart of a standardization processing method according to an embodiment of this specification;

[0052] Figure 4A It is a flow chart of a training method of a trained weld recognition model according to an embodiment of this specification;

[0053] Figure 4B It is a flow chart of a method for determining a sample weld image according to an embodiment of this specification;

[0054] Figure 4C It is a flow chart of a method for determining a sample weld image according to another embodiment of the present specification;

[0055] Figure 4D Shown is a schematic diagram of a circular defect in an embodiment of this specification;

[0056] Figure 4E Shown is a schematic diagram of a stripe defect according to an embodiment of this specification;

[0057] Figure 4F Shown is a schematic diagram of an incomplete penetration defect in an embodiment of this specification;

[0058] Figure 4G Shown is a schematic diagram of an unfused defect according to an embodiment of this specification;

[0059] Figure 4H Shown is a schematic diagram of a crack defect in an embodiment of this specification;

[0060] Fig. 4I Shown is a schematic diagram of a target type image and an expanded image according to an embodiment of this specification;

[0061] Figure 5 Shown is a flow chart of a standardization method according to another embodiment of the present specification;

[0062] Fig. 6A It is a flow chart of a method for determining target weld defect data according to an embodiment of this specification;

[0063] Figure 6B Shown is a schematic diagram of a target weld defect frame according to an embodiment of this specification;

[0064] Figure 6C Shown is a schematic diagram of a target weld defect frame according to another embodiment of the present specification;

[0065] Figure 7 The figure shows a schematic diagram of the structure of a test plan generating device according to an embodiment of the present specification;

[0066] Figure 8 This is a schematic diagram of the structure of a computer device according to an embodiment of this specification.

[0067] [Description of Reference Numerals]

[0068] 101. User terminal;

[0069] 102. Server;

[0070] 710, first processing unit;

[0071] 720, second processing unit;

[0072] 730, third processing unit;

[0073] 802. Computer equipment;

[0074] 804. Processing equipment;

[0075] 806. Storage resources;

[0076] 808, driving mechanism;

[0077] 810, input / output module;

[0078] 812. Input device;

[0079] 814. Output device;

[0080] 816. Presentation equipment;

[0081] 818. Graphical user interface;

[0082] 820, network interface;

[0083] 822, communication link;

[0084] 824. Communication bus. DETAILED DESCRIPTION

[0085] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.

[0086] It should be noted that the terms "first", "second", etc. in the description and claims of this specification and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of this specification described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0087] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0088] Figure 1 The schematic diagram of the implementation system of a weld defect determination method according to an embodiment of the present specification is shown, which may include: a user terminal 101 and a server 102, wherein the user terminal 101 and the server 102 communicate with each other through a network, and the network may include a local area network (LAN), a wide area network (WAN), the Internet, or a combination thereof, and is connected to a website, a user device (such as a computing device), and a back-end system. The user may send a weld defect recognition request to the server 102 through the user terminal 101, and the server 102 determines the weld defect image to be determined from the request of the user terminal after receiving the request from the user terminal. Then, the weld defect image to be determined is standardized to obtain an input weld image; the input weld image is processed using the trained weld recognition model to obtain standard weld defect data corresponding to the input weld image; and the standard weld defect data is inversely standardized to determine the target weld defect data corresponding to the weld defect image to be determined. It should be noted that after determining the target weld defect data, the server 102 can also determine the defect box on the weld defect image to be determined based on the target weld defect data, and mark the defect box and the corresponding data on the weld defect image to be determined, and then send the weld defect image to be determined marked with the defect box and data to the user terminal 101 so that the user can view it through the user terminal 101.

[0089] It should be noted that before the server 102 performs recognition, a preset weld recognition model may be trained to obtain a trained weld recognition model. Specifically, the training method for training the preset weld recognition model may be to perform standardization processing on the original weld image to obtain a sample weld image; annotate the sample weld image to determine the annotation information corresponding to each sample weld image; and train the preset weld recognition model using the sample weld image and the annotation information to obtain the trained weld recognition model.

[0090] Alternatively, the server 102 may be a node of a cloud computing system (not shown), or each server 102 may be a separate cloud computing system including a plurality of computers interconnected by a network and operating as a distributed processing system.

[0091] In an optional embodiment, the user terminal 101 may include electronic devices such as, but not limited to, smart phones, acquisition devices, desktop computers, tablet computers, laptop computers, smart speakers, digital assistants, augmented reality (AR) / virtual reality (VR) devices, smart wearable devices, etc. Optionally, the operating system running on the electronic device may include, but not limited to, Android, IOS, Linux, Windows, etc.

[0092] In addition, it should be noted that Figure 1 What is shown is only an application environment provided by this specification. In actual application, multiple user terminals 101 may be included, and this specification does not impose any limitation.

[0093] like Figure 2 The flowchart of a method for determining weld defects in an embodiment of this specification is shown. The weld defect determination process is described in this figure, but more or fewer operation steps may be included based on conventional or non-creative labor. The order of steps listed in the embodiment is only one way of executing the steps among many, and does not represent the only execution order. When the actual system or device product is executed, it can be executed in the order or in parallel according to the method shown in the embodiment or the accompanying drawings. Specifically, Figure 2 As shown, the method may include:

[0094] S210, performing standardization processing on the weld defect image to be determined to obtain an input weld image;

[0095] S220, using the trained weld recognition model to process the input weld image to obtain standard weld defect data corresponding to the input weld image;

[0096] S230, performing inverse normalization processing on the standard weld defect data to determine target weld defect data corresponding to the weld defect image to be determined.

[0097] Using the embodiments of the present specification, a standardization process is performed on a weld defect image to be determined that needs to be identified, and an input weld image is obtained; the input weld image is processed using a trained weld recognition model to obtain standard weld defect data corresponding to the input weld image; and the defect data is inversely standardized to determine the target weld defect data corresponding to the weld defect image to be determined. Thus, since the weld defect image to be determined is firstly subjected to standardization process, for example, an image that can be efficiently and accurately identified by the trained weld recognition model is obtained; the image is processed using the trained weld recognition model to obtain the corresponding standard weld defect data; and then the standard weld defect data is inversely converted to obtain the target weld defect data corresponding to the defect frame on the weld defect image to be determined, thereby improving the recognition accuracy and efficiency and reducing the waste of resources during the defect recognition process.

[0098] According to an embodiment of the present specification, when it is necessary to identify weld defects on a welded object, a photo is taken of the welded object to obtain a weld defect image to be determined, and the weld defect image to be determined is sent to a server through a user terminal. After receiving the weld defect image to be determined, the server performs standardization processing on the weld defect image to be determined to obtain an image that can be used to input a trained weld recognition model, that is, an input weld image.

[0099] The standardization process may be any format or pixel processing performed on the weld defect image to be determined, and the standardization process may include a clearing process and an amplification process, etc. Thus, the recognizability and recognition accuracy of the weld defect image to be determined are improved. Specifically, the standardization process may be pixel recognition of the weld defect image to be determined, and when unclear pixels are identified, a clearing process is performed on the unclear pixels to obtain a clear input weld image. The clearing process may be any method to make the pixels clear, and this specification does not limit this. For example, the standardization process may also be a magnification process performed on the weld defect image to be determined to obtain a clear input weld image. It should be noted that this specification does not limit the specific method of standardization process.

[0100] The determined input weld image is identified and processed by using the trained weld recognition model to obtain standard weld defect data corresponding to the input weld image. Specifically, the input weld image is input into the trained weld recognition model to obtain standard weld defect data output by the weld recognition model. Further, the standard weld defect data may include, for example, defect type, defect location data and defect size data. Further, the defect location data represents data corresponding to the position of the defect included in the input weld image, for example, it may include coordinate data corresponding to the defect position, and the defect size data represents data corresponding to the size of the defect included in the input weld image, for example, it may include the length and width of the defect. It should be noted that in the training process of the trained weld recognition model, the sample image used for training is also subjected to the above standardization processing. Therefore, when the trained weld recognition model is used to identify the input weld image that has also been subjected to the standardization processing, the problem of low recognition accuracy caused by the large difference in shooting level between the sample image used to train the preset weld recognition model and the weld defect image to be determined in the prior art can be solved. Specifically, the trained weld recognition model can be a trained neural network model, and the recognition process can be: obtaining a sample image, standardizing the sample image, and obtaining a standard sample image; using the standard sample image to train a preset neural network model to obtain a trained weld recognition model that meets preset conditions. The preset neural network model can, for example, be a neural network model with random parameters and hyperparameters, and the preset conditions can, for example, be that the number of iterations is greater than or equal to a preset value or that a series composed of loss function values ​​converges.

[0101] After determining the standard weld defect data of the defects included in the input weld image, it is necessary to determine the target defect corresponding to the standard weld defect data in the weld defect image to be determined, and then determine the target weld defect data corresponding to the target defect. The standard weld defect data is subjected to inverse normalization processing to determine the target weld defect data corresponding to the weld defect image to be determined. Specifically, the standard weld defect data can be subjected to a processing opposite to the normalization processing (inverse normalization processing), that is, the target weld defect data corresponding to the weld defect image to be determined is obtained. For example, in the case where the normalization processing is an amplification processing, the standard weld defect data is subjected to inverse normalization processing to determine the target weld defect data corresponding to the weld defect image to be determined. It can be determined that the defect frame in the input weld image corresponding to the standard weld defect data, and the target defect frame corresponding to the defect frame is determined in the weld defect image to be determined by inverse normalization processing, and the target weld defect data corresponding to the target defect frame is determined. Thus, based on the normalization processing and the inverse normalization processing, a recognition result with high recognition efficiency and recognition accuracy is obtained.

[0102] Figure 3The flowchart of a standardized processing method according to an embodiment of the present specification is shown. Figure 3 The process of standardized processing is described in , but it may include more or fewer steps based on routine or non-creative work. Figure 3 As shown, the method may include:

[0103] S311, cutting the weld defect image to be determined to obtain a plurality of sub-images to be standardized;

[0104] S312, enlarging each sub-image to obtain an input weld image.

[0105] According to another embodiment of the present specification, in order to unify the standardized processing, the present specification provides a standardized processing method. Specifically, first, a cutting process is performed on the weld defect image to be determined to obtain multiple sub-images, and then each sub-image is enlarged to obtain an input weld image, thereby improving the clarity of each sub-image.

[0106] The weld defect image to be determined is cut to obtain multiple sub-images to be standardized. Specifically, the weld defect image to be determined is cut in sequence based on the height pixel data of the weld defect image to be determined to obtain multiple sub-images to be standardized. It should be noted that in order to further improve the recognition accuracy, it can be cut into square sub-images.

[0107] Then, each sub-image is magnified to obtain an input weld image. The magnification process can be performed based on any method that can achieve image magnification, and this specification does not limit this. In order to facilitate the normalization process and the inverse normalization process, it can be implemented based on a bicubic interpolation algorithm.

[0108] Figure 4A The flowchart of the training method of a trained weld recognition model in the embodiment of this specification is shown. Figure 4A A training process is described in , but may include more or fewer steps based on routine or non-creative labor. Figure 4A As shown, the method may include:

[0109] S410, performing standardization processing on the original weld image to obtain a sample weld image;

[0110] S420, annotating the sample weld images, and determining annotation information corresponding to each sample weld image;

[0111] S430, training a preset weld recognition model using sample weld images and annotation information to obtain a trained weld recognition model.

[0112] According to another embodiment of the present specification, the original weld image is obtained in the same or similar manner as the weld defect image to be determined. Figure 3 The standardization process is performed to obtain a sample weld image. Further, the sample weld images are labeled to determine the labeling information corresponding to each sample weld image. Specifically, the labeling process can be implemented manually or through a trained artificial intelligence model, which is not limited in this specification.

[0113] The annotation information may include, for example, defect types, defect location data, and defect size data corresponding to the weld defects in the sample weld image. Specifically, the defect types may include five defect types: circular defects, strip defects, incomplete penetration defects, incomplete fusion defects, and crack defects. Specifically, Figure 4D Shown is a schematic diagram of a circular defect in an embodiment of this specification; Figure 4E Shown is a schematic diagram of a stripe defect according to an embodiment of this specification; Figure 4F Shown is a schematic diagram of an incomplete penetration defect in an embodiment of this specification; Figure 4G A schematic diagram of a lack of fusion defect according to an embodiment of the present specification is shown; and Figure 4H The diagram shows a crack defect of an embodiment of the present specification. The defect location data may include, for example, the horizontal coordinate and the vertical coordinate of the center point of the annotation box corresponding to the weld defect. The defect size data may be, for example, the length and width of the annotation box. Thus, the annotation box in the sample weld image may be accurately determined based on the annotation information.

[0114] After the field of image analysis and recognition, the model that can be used to detect weld defects in images is the target detection model. The target detection model can include two categories; the first category is the second-order algorithm model represented by Faster RCNN. This type of model divides target detection into two parts. The first part performs a preliminary screening of the target to obtain a larger area candidate frame. The second part is to conduct a detailed analysis of the regional candidate frame to accurately identify and locate the features. The accuracy of the prediction depends largely on the reasonable generation of the regional candidate frame. The second category is the first-order algorithm model represented by the YOLO series. This type of algorithm model does not perform a preliminary screening of the image, but directly extracts the features of the target image through the convolutional neural network and predicts the classification and location of the features. Compared with the second-order algorithm, the first-order algorithm no longer relies on the generation and refinement of the candidate frame, and directly predicts the detection target in the original image based on the feature map extracted by the convolutional network, and the detection efficiency is higher.

[0115] By analyzing the image features of the weld defect image to be determined, it is found that there are multiple defect types, different sizes of different types of defects, unclear defect features, and large image size. In the application field of intelligent identification of weld defect images to be determined, the image recognition and classification model based on convolutional neural network can accurately predict the defect type. However, when there are multiple defect types in a weld defect image to be determined, the performance of the model depends largely on a reasonable image segmentation algorithm. When the weld defect image to be determined is segmented unreasonably, only the defect type with the highest confidence in the cut image can be output, and multiple defects in the weld defect image to be determined cannot be accurately identified. At the same time, the size of the weld defect image to be determined is relatively large, and the amount of calculation required to detect the defect type is also relatively large. If the second-order algorithm model of target detection based on convolutional neural network is used, it may cause problems such as low detection efficiency and high hardware requirements. Compared with other models, the first-order algorithm YOLO series model has the characteristics of multi-scale feature detection, high flexibility and fast detection speed, which is suitable for the application scenario of intelligent identification of weld defect images to be determined, so the YOLO V5 series model is selected.

[0116] The sample weld images and the annotation information are used to train the preset weld recognition model to obtain the trained weld recognition model. The sample weld images and the corresponding annotation information are combined to obtain a sample set; multiple sample sets are divided into a training set and a verification set; the training set is used to train the preset weld recognition model to obtain the weld recognition model to be verified; the verification set is used to verify the weld recognition model to be verified, and if the verification passes, the weld recognition model to be verified is determined to be the trained weld recognition model, otherwise, the multiple sample sets are divided into the training set and the verification set and the subsequent steps until, if the verification passes, the weld recognition model to be verified is determined to be the trained weld recognition model. Specifically, the multiple sample sets are divided into the training set and the verification set, which can be divided based on a ratio of 8:2, and the preset weld recognition model can be, for example, a YOLO V5 series model with random or pre-specified parameters and hyperparameters. It should be noted that the training process and the verification process are similar to those of the YOLO V5 series model, and this manual will not elaborate on this.

[0117] Figure 4B The flowchart of a sample weld image determination method according to an embodiment of the present specification is shown. Figure 4B A sample weld image determination process is described in , but may include more or fewer steps based on conventional or uncreative labor. Figure 4B As shown, the method may include:

[0118] S411, cutting the original weld image to be processed to obtain a plurality of sample sub-images to be processed by standardization;

[0119] S412, performing a magnification process on each sample sub-image to obtain a sample input weld image;

[0120] S413, performing sample expansion on the sample input weld image to obtain a sample weld image.

[0121] According to another embodiment of the present specification, it should be noted that the execution method of S411 and S412 is similar to that of S311 and S312, and this specification will not elaborate on this.

[0122] Since there are few original weld images in this field, in order to improve the recognition accuracy of the trained weld recognition model, this manual expands the sample input weld images to obtain more sample weld images for training the preset weld recognition model.

[0123] Specifically, sample expansion can be achieved through data enhancement algorithms such as image flipping, grayscale adjustment, adding trace noise, etc., which is not limited in this specification.

[0124] Figure 4C It is a flow chart of a method for determining a sample weld image according to another embodiment of the present specification; Fig. 4I FIG. 1 is a schematic diagram of a target type image and an expanded image according to an embodiment of the present specification. Figure 4C Another sample weld image determination process is described in , but may include more or fewer steps based on conventional or uncreative labor. Figure 4C As shown, the method may include:

[0125] S4131, determining a target type image corresponding to a target type weld from the input weld image;

[0126] S4132, processing the target type image using a data enhancement algorithm to obtain an expanded image;

[0127] S4133, taking both the expanded image and the input weld image as sample weld images.

[0128] According to another embodiment of the present specification, since there are fewer input weld images of three defect types, namely, lack of penetration defect, lack of fusion defect and crack defect, among the five defect types, in order to improve the recognition accuracy of the trained weld recognition model on the basis of reducing resource waste, the present specification only performs sample expansion on the input weld images of the three defect types, namely, lack of penetration defect, lack of fusion defect and crack defect.

[0129] The target type weld includes a lack of penetration defect, a lack of fusion defect and a crack defect. The defect type corresponding to each input weld image is determined, and the input weld image whose defect type is the target weld type is determined as the target type image.

[0130] The target type image is processed using the data enhancement algorithm to obtain an augmented image. The specific target type image and the corresponding augmented image can be as follows: Fig. 4I It should be noted that the data enhancement algorithm may be, for example, image flipping, grayscale adjustment, adding a small amount of noise, etc., which is not limited in this specification.

[0131] After obtaining more expanded images corresponding to the three defect types of incomplete penetration defect, lack of fusion defect and crack defect, the expanded images and the input weld image are summarized to obtain a sample weld image.

[0132] Figure 5 The flowchart of a standardization method according to another embodiment of the present specification is shown. Figure 5 Another standardized process is described in , but may include more or fewer steps based on routine or non-creative labor.

[0133] Specific as Figure 5 As shown, the method may include:

[0134] S511, taking the height pixel unit of the weld defect image to be determined as a reference, square cutting is performed on the weld defect image to be determined to obtain a plurality of sub-images to be standardized;

[0135] S512, using a bicubic interpolation algorithm to process the sub-image to obtain an input weld image.

[0136] According to another embodiment of the present specification, the weld defect image to be determined is cut into squares based on the height pixel unit of the weld defect image to be determined, so as to obtain a plurality of sub-images to be standardized. Specifically, the pixel range obtained after cutting can be as shown in the following formulas (1) to (3).

[0137] N=L / H Formula (1)

[0138] l(i)={H×(i-1)+1,H×i} i∈[1,N] Formula (2)

[0139] l(N+1)={H×N+1,L} Formula (3)

[0140] Wherein, L and H represent the length pixel value and height pixel value of the weld defect image to be determined, N represents the number of sub-images that can be cut, l(i) represents the length pixel value range corresponding to the i-th sub-image, and l(N+1) represents the length pixel value range of the sub-image with insufficient height pixel value remaining after cutting the weld defect image to be determined.

[0141] The sub-image is processed by the bicubic interpolation algorithm to obtain the input weld image. Specifically, each pixel value in the input weld image can be obtained by the following formula (4) and formula (5).

[0142]

[0143] Where W(i) represents the input weld image. ij The lateral weight value of the point, W(j) represents the a in the input weld image ij The vertical weight of the point, l is i or j.

[0144] Fig. 6A The flowchart of a method for determining target weld defect data in an embodiment of this specification is shown. Fig. 6A A target weld defect data determination process is described in , but may include more or fewer steps based on conventional or uncreative labor. Fig. 6A As shown, the method may include:

[0145] S631, determining defect frame coordinate data based on standard weld defect data;

[0146] S632, using a pixel unit conversion formula to process the defect frame coordinate data to obtain target weld defect data.

[0147] According to another embodiment of the present specification, the standard weld defect data may include, for example, defect type, defect location data, and defect size data. Specifically, the standard weld defect data includes initial coordinate data corresponding to the defect frame in the input weld image. For example, the initial coordinate data may also be used as defect frame coordinate data. In addition to the coordinate data, the standard weld defect data also includes defect type data corresponding to the defect frame. It should be noted that the initial coordinate data may be the horizontal coordinate and vertical coordinate of the center point of the defect frame, as well as the length and width of the defect frame.

[0148] Furthermore, the initial coordinate data may also be different from the defect frame coordinate data. Specifically, the initial coordinate data includes the horizontal coordinate and vertical coordinate of the center point of the defect frame, and the length and width of the defect frame. The defect frame coordinate data includes the horizontal coordinate and vertical coordinate of the lower right corner of the defect frame in the defect frame coordinate data, and the horizontal coordinate and vertical coordinate of the upper left corner of the defect frame in the defect frame coordinate data. The horizontal coordinate and vertical coordinate of the lower right corner of the defect frame, and the horizontal coordinate and vertical coordinate of the upper left corner of the defect frame can be calculated by the horizontal coordinate and vertical coordinate of the center point of the defect frame, and the length and width of the defect frame. Specifically, the horizontal coordinate of the lower right corner can be the horizontal coordinate of the center point of the defect frame plus half of the length of the defect frame, and the vertical coordinate of the lower right corner can be the vertical coordinate of the center point of the defect frame plus half of the width of the defect frame; the horizontal coordinate of the upper left corner can be the horizontal coordinate of the center point of the defect frame minus half of the length of the defect frame, and the vertical coordinate of the upper left corner can be the vertical coordinate of the center point of the defect frame minus half of the width of the defect frame.

[0149] After obtaining the horizontal and vertical coordinates of the lower right corner of the defect frame in the defect frame coordinate data, and the horizontal and vertical coordinates of the upper left corner of the defect frame in the defect frame coordinate data, the horizontal and vertical coordinates of the lower right corner of the defect frame in the defect frame coordinate data, and the horizontal and vertical coordinates of the upper left corner of the defect frame in the defect frame coordinate data are processed using the pixel unit conversion formula to obtain the target weld defect data.

[0150] According to another embodiment of the present specification, the pixel unit conversion formula may specifically include the following formula (6)-formula (9).

[0151]

[0152] F1=|x1-x2|×K Formula (8)

[0153] F2=|y1-y2|×K Formula (9)

[0154] Among them, L represents the distance from the center position of the defect to the leftmost side of the weld defect image to be determined; U represents the distance from the center position of the defect to the topmost end of the weld defect image to be determined; F1 represents the length of the defect; F2 represents the width of the defect, x1 represents the horizontal coordinate of the upper left corner of the defect box in the defect box coordinate data, x2 represents the horizontal coordinate of the lower right corner of the defect box in the defect box coordinate data, y1 represents the vertical coordinate of the upper left corner of the defect box in the defect box coordinate data, y2 represents the vertical coordinate of the lower right corner of the defect box in the defect box coordinate data, and K represents the conversion coefficient.

[0155] The target weld defect data includes the distance from the center of the defect to the leftmost side of the weld defect image to be determined; the distance from the center of the defect to the top of the weld defect image to be determined; the length of the defect; and the width of the defect. It should be noted that the target defect frame in the weld defect image to be determined can be determined by the target weld defect data. Specifically, the determination method can be: based on the distance from the center of the defect to the leftmost side of the weld defect image to be determined, and the distance from the center of the defect to the top of the weld defect image to be determined, determine the coordinates of the center of the defect; based on the length of the defect, the width of the defect and the coordinates of the center of the defect, determine the four vertex coordinate data of the target defect frame. More specifically, as Figure 6B The target defect frame shown, which determines the four vertex coordinate data of the target defect frame based on the length of the defect, the width of the defect and the coordinates of the center position of the defect, may include: determining that the horizontal coordinate X1 and the vertical coordinate Y1 of the upper left corner of the target defect frame are respectively the horizontal coordinate of the coordinate of the center position of the defect minus half the length, and the vertical coordinate of the coordinate of the center position of the defect minus half the width; the horizontal coordinate and the vertical coordinate of the upper right corner of the target defect frame are respectively the horizontal coordinate of the coordinate of the center position of the defect plus half the length, and the vertical coordinate of the coordinate of the center position of the defect minus half the width; the horizontal coordinate and the vertical coordinate of the lower left corner of the target defect frame are respectively the horizontal coordinate of the coordinate of the center position of the defect minus half the length, and the vertical coordinate of the coordinate of the center position of the defect plus half the width; the horizontal coordinate X2 and the vertical coordinate Y2 of the lower right corner of the target defect frame are respectively the horizontal coordinate of the coordinate of the center position of the defect plus half the length, and the vertical coordinate of the coordinate of the center position of the defect plus half the width.

[0156] According to another embodiment of the present specification, the formula for determining the conversion coefficient may be specifically as shown in the following formula (10).

[0157]

[0158] Wherein, K represents the conversion coefficient, and H represents the height pixel data of the weld defect image to be determined.

[0159] It should be noted that after determining the target weld defect data, the weld can also be rated based on the target weld defect data. The specific rating method can be implemented based on national standards, etc.

[0160] According to another embodiment of the present specification, Figure 6CShown is a schematic diagram of a target weld defect frame of another embodiment of the present specification. Specifically, after performing standardization processing on the weld defect image to be determined, a plurality of input weld images can be obtained; each input weld image is then input into the trained weld recognition model to obtain standard weld defect data corresponding to each input weld image; the standard weld defect data corresponding to each input weld image is then inversely standardized to obtain a plurality of target weld defect data. Based on each target weld defect data, a corresponding target defect frame is then determined to obtain a plurality of target defect frames of the weld defect image to be determined. In this way, it is possible to identify more defects in the weld defect image to be determined. Specifically, as Figure 6C As shown, the weld defect image to be determined includes three target defect frames, specifically as follows Figure 6C The three enlarged boxes from left to right on the first layer in the figure.

[0161] Figure 7 FIG. 1 is a schematic diagram of the structure of a device for determining weld defects according to an embodiment of the present specification. Figure 7 As shown, including,

[0162] The first processing unit 710 is used to perform standardization processing on the weld defect image to be determined to obtain an input weld image;

[0163] A second processing unit 720 is used to process the input weld image using the trained weld recognition model to obtain standard weld defect data corresponding to the input weld image; and

[0164] The third processing unit 730 is used to perform inverse normalization processing on the standard weld defect data to determine the target weld defect data corresponding to the weld defect image to be determined.

[0165] Since the principle of solving the problem by the above device is similar to that of the above method, the implementation of the above device can refer to the implementation of the above method, and the repeated parts will not be repeated.

[0166] Since the principle of solving the problem by the above device is similar to that of the above method, the implementation of the above device can refer to the implementation of the above method, and the repeated parts will not be repeated.

[0167] like Figure 8The structure diagram of a computer device in an embodiment of this specification is shown. The apparatus in this specification can be a computer device in this embodiment, and the method of this specification is executed. The computer device 802 may include one or more processing devices 804, such as one or more central processing units (CPUs), and each processing unit may implement one or more hardware threads. The computer device 802 may also include any storage resource 806, which is used to store any kind of information such as code, settings, data, etc. Non-limiting, for example, the storage resource 806 may include any one or more combinations of the following: any type of RAM, any type of ROM, flash memory device, hard disk, optical disk, etc. More generally, any storage resource can use any technology to store information. Further, any storage resource can provide volatile or non-volatile retention of information. Further, any storage resource can represent a fixed or removable component of the computer device 702. In one case, when the processing device 804 executes an associated instruction stored in any storage resource or a combination of storage resources, the computer device 802 can perform any operation of the associated instruction. The computer device 802 also includes one or more drive mechanisms 808 for interacting with any storage resources, such as a hard disk drive mechanism, an optical disk drive mechanism, and the like.

[0168] The computer device 802 may also include an input / output module 810 (I / O) for receiving various inputs (via input devices 812) and for providing various outputs (via output devices 814). A specific output mechanism may include a presentation device 816 and an associated graphical user interface (GUI) 818. In other embodiments, the input / output module 810 (I / O), the input device 812, and the output device 814 may not be included, and the computer device 802 may be used as a computer device in a network. The computer device 802 may also include one or more network interfaces 820 for exchanging data with other devices via one or more communication links 822. One or more communication buses 824 couple the components described above together.

[0169] The communication link 822 may be implemented in any manner, for example, through a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 822 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc. governed by any protocol or combination of protocols.

[0170] The embodiments of the present specification also provide a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above method is implemented.

[0171] The embodiments of this specification also provide a computer program product, which includes a computer program. When the computer program is executed by a processor, the above method is implemented.

[0172] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0173] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0174] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0175] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0176] The above specific embodiments further illustrate the purpose, technical solutions and beneficial effects of this specification. It should be understood that the above are only specific embodiments of this specification and are not intended to limit the scope of protection of this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this specification should be included in the scope of protection of this specification.

Claims

1. A method for determining weld defects, characterized in that: include: Performing standardization processing on the weld defect image to be determined to obtain an input weld image; Processing the input weld image using the trained weld recognition model to obtain standard weld defect data corresponding to the input weld image; as well as The standard weld defect data is subjected to inverse normalization processing to determine target weld defect data corresponding to the weld defect image to be determined.

2. The method according to claim 1, characterized in that The step of performing standardization processing on the weld defect image to be determined to obtain the input weld image comprises: Cutting the weld defect image to be determined to obtain a plurality of sub-images to be standardized; and A magnification process is performed on each of the sub-images to obtain the input weld image.

3. The method according to claim 1, characterized in that: The training method of the trained weld recognition model includes: Performing standardization processing on the original weld image to obtain a sample weld image; Annotating the sample weld images to determine annotation information corresponding to each of the sample weld images; and The sample weld image and the annotation information are used to train a preset weld recognition model to obtain the trained weld recognition model.

4. The method according to claim 3, characterized in that The standardization process is performed on the original weld image to obtain a sample weld image, comprising: Cutting the original weld image to be processed to obtain a plurality of sample sub-images to be processed by standardization; Performing a magnification process on each of the sample sub-images to obtain a sample input weld image; and Sample expansion is performed on the sample input weld image to obtain the sample weld image.

5. The method according to claim 4, characterized in that The performing sample expansion on the sample input weld image to obtain the sample weld image comprises: Determining a target type image corresponding to a target type weld from the input weld image; Processing the target type image using a data enhancement algorithm to obtain an expanded image; and The expanded image and the input weld image are both used as the sample weld images.

6. The method according to claim 2, characterized in that The step of cutting the weld defect image to be determined to obtain a plurality of sub-images to be standardized comprises: Based on the height pixel unit of the weld defect image to be determined, the weld defect image to be determined is cut into squares to obtain a plurality of sub-images to be standardized; and The enlarging process is performed on each of the sub-images to obtain the input weld image, comprising: The sub-image is processed by using a bicubic interpolation algorithm to obtain the input weld image.

7. The method according to claim 1, characterized in that The performing inverse normalization processing on the standard weld defect data to determine the target weld defect data corresponding to the weld defect image to be determined comprises: Determining defect frame coordinate data based on the standard weld defect data; and The defect frame coordinate data is processed using a pixel unit conversion formula to obtain the target weld defect data.

8. The method according to claim 7, characterized in that The pixel unit conversion formula includes: Among them, L represents the distance from the center position of the defect to the leftmost side of the weld defect image to be determined; U represents the distance from the center position of the defect to the topmost end of the weld defect image to be determined; F1 represents the length of the defect; F2 represents the width of the defect, x1 represents the horizontal coordinate of the upper left corner of the defect frame in the defect frame coordinate data, x2 represents the horizontal coordinate of the lower right corner of the defect frame in the defect frame coordinate data, y1 represents the vertical coordinate of the upper left corner of the defect frame in the defect frame coordinate data, y2 represents the vertical coordinate of the lower right corner of the defect frame in the defect frame coordinate data, and K represents the conversion coefficient.

9. The method according to claim 8, characterized in that The conversion coefficient determination formula includes: Wherein, K represents the conversion coefficient, and H is the height pixel data of the weld defect image to be determined.

10. A weld defect determination device, characterized in that: include: A first processing unit is used to perform standardization processing on the weld defect image to be determined to obtain an input weld image; A second processing unit is used to process the input weld image using the trained weld recognition model to obtain standard weld defect data corresponding to the input weld image; as well as The third processing unit is used to perform inverse normalization processing on the standard weld defect data to determine target weld defect data corresponding to the weld defect image to be determined.

11. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 9 is implemented.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method of any one of claims 1 to 9 is executed.

13. A computer program product comprising a computer program / instructions, characterized in that The computer program / instructions, when executed by a processor, implement a method according to any one of claims 1-9.

Citation Information

Patent Citations

  • Weld defect characteristic parameter extraction method

    CN105588845A

  • Weld joint defect identification method and training method and device of weld joint defect identification model

    CN114862745A

  • Weld seam internal defect intelligent detection device and method, and medium

    WO2022053001A1

Cited By

  • X-ray weld joint pseudo-defect segmentation method and device based on skeleton extraction, storage medium and electronic equipment

    CN119151962A

  • Automated system for interpreting results of digital radiographic inspection - artificial analysis system

    RU2861595C1