Defect marking method and system
The automated defect marking system enhances image quality and accuracy in small-diameter pipe welds, reducing manual intervention and radiation exposure by using a flat panel detector, R-PCE software, and an improved fasterrcnn algorithm with a PLC-driven marking device.
Patent Information
- Application Number
- CN202411218004.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2024-12-27
AI Technical Summary
Current X-ray imaging systems for detecting defects in small-diameter pipe welds are semi-automatic, inefficient, inaccurate, and expose workers to occupational health risks due to manual defect marking in lead rooms.
A fully automated defect marking system using a flat panel detector, R-PCE software, and an improved fasterrcnn target detection algorithm with an additive angle interval loss function, coupled with a programmable logic controller (PLC) and variable frequency motor to drive a marking device for automated defect identification and marking.
The system enhances image quality, improves detection accuracy, reduces manual intervention, and minimizes X-ray radiation exposure, ensuring efficient and precise defect detection and marking in small-diameter pipes.
Smart Images

Figure CN119198795A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of automated nondestructive testing, and more specifically to a defect marking method and system for fully automated DR testing of small-diameter pipes. Background Art
[0002] Welding is a key process in the manufacturing of major power generation equipment, and its quality determines the safety and reliability of power generation equipment. According to external quality feedback over the years, more than 80% of the quality problems of power plant boilers are caused by weld quality. Therefore, effectively improving the welding quality of power plant boiler enterprises is very important to ensure production safety and help enterprises improve quality and efficiency.
[0003] In the petrochemical, energy and power, aerospace and other industries, small-diameter pipes (specifically pipes with a diameter of 100mm or less) are important parts of related equipment. The serpentine pipe is a small-diameter pipe and is a core component of power station boilers. The operating temperature is as high as 677℃ and the working pressure is 40MPa.
[0004] In the prior art, when X-ray imaging defect detection is performed on the serpentine and straight pipe welds of boiler high-temperature components, a DR imaging detection system (referred to as industrial television RTV in the industry) is required. Currently, all RTV systems in the industry are semi-automatic systems that require manual selection of defect images and defect identification, which is extremely inefficient and inaccurate. In addition, after the defect images are selected, it is necessary to manually enter the lead room to mark the defects of small-diameter pipes. Frequent manual entry into the lead room to manually mark the defects will cause X-ray radiation to the workers in the lead room, which will increase the risk of occupational health of the workers. Summary of the invention
[0005] In order to overcome the defects existing in the above-mentioned prior art, the present invention discloses a defect marking method and system. The purpose of the present invention is to solve the problems in the prior art that manual selection of defect images and defect marking are extremely inefficient and inaccurate, and X-ray radiation increases the risk of occupational health of workers.
[0006] In order to achieve the above objectives, the technical solution adopted by the present invention is:
[0007] A defect marking method comprises the following steps:
[0008] 1. Image acquisition
[0009] S1, the image acquisition module acquires the DR image of the small-diameter pipe weld, and sends the acquired DR image of the small-diameter pipe weld to the information management system;
[0010] In the present invention, the information management system is specifically R-PCE software in a computer. The image acquisition module is specifically a flat panel detector, which is installed under the grating and is used to receive X-rays and perform A / D conversion. The R-PCE software acquires the collected DR image through the SDK call of the flat panel detector, wherein the flat panel detector and the computer are connected to the same local area network through a switch.
[0011] 2. Defect Detection
[0012] S2, the information management system performs defect detection on the DR image of the small-diameter pipe weld to obtain a defect detection result; wherein, when performing defect detection, the DR image of the small-diameter pipe weld is firstly subjected to image enhancement preprocessing, and then the improved fasterrcnn target detection algorithm is used to detect the DR image of the small-diameter pipe weld after image enhancement preprocessing, and the defect type and defect position of the DR image of the small-diameter pipe weld are detected, and the loss function of the improved fasterrcnn target detection algorithm is an additive angle interval loss function;
[0013] Preferably, step S2 comprises the following steps:
[0014] 1. Image enhancement
[0015] In step S2, image preprocessing is performed. The software has a built-in image enhancement algorithm, which first enhances the acquired DR image. The specific method is to use guided filtering, using the image itself as a guided image to enhance details while suppressing noise.
[0016] Preferably, the image enhancement preprocessing in step S2 comprises the following steps:
[0017] S21, when no inspection workpiece is placed at the small-diameter pipe weld inspection station, collecting a plurality of DR images at the inspection station, and processing the plurality of DR images to obtain a dark field image and a correction curve;
[0018] Preferably, step S21 includes: when no inspection workpiece is placed at the small-diameter pipe weld inspection station, opening the grating to the maximum position to expose the flat-panel detector, adjusting the movement of the X-ray machine head so that the X-ray machine is vertically aligned with the flat-panel detector to emit X-rays, and the flat-panel detector collects several DR images.
[0019] Preferably, step S21 comprises the following steps:
[0020] S211, when no inspection workpiece is placed at the small-diameter pipe weld inspection station, collecting a number of DR images with different grayscale values at the inspection station, and taking the DR image with the lowest grayscale value as the dark field image;
[0021] Preferably, step S211 includes: when no inspection workpiece is placed at the small-diameter pipe weld inspection station, first turn off the X-ray machine, use 10 frames of superposition and averaging to collect an image with a grayscale value of 0 as a dark field image, then turn on the X-ray machine, adjust the voltage, and use 10 frames of superposition and averaging to collect 4 DR images as bright field images when the image grayscale values are 10000, 20000, 30000, and 40000, respectively.
[0022] In the above steps, five DR images with gray values of 0, 10000, 20000, 30000, and 40000 are obtained. When acquiring images, 10-frame stacking and averaging are used to acquire DR images because: generating DR images by stacking and averaging multiple frames can effectively improve the signal-to-noise ratio of the image.
[0023] S212, using a plurality of DR images with different gray values, respectively, and subtracting the dark field image, to obtain a plurality of calibration reference images;
[0024] In the above steps, the dark field image is subtracted from the five DR images to eliminate the bias error and obtain five calibration reference images.
[0025] S213, calculating the image grayscale mean value of each correction reference image as the standard correction value of each pixel response in the correction reference image, and obtaining a correction curve of the correction output changing with the grayscale response in different grayscale intervals.
[0026] Preferably, step S213 includes: for each correction reference image, averaging the image grayscale as the standard correction value of each pixel response, and based on the linear relationship between grayscale response and correction output, obtaining four correction curves of correction output changing with grayscale response in the grayscale ranges of 0-10000, 10000-20000, 20000-30000, and 30000-40000, respectively.
[0027] In the above steps, for each reference image, the image grayscale is averaged as the standard correction value of each pixel response. For each pixel, since the grayscale response and the correction output are in a linear relationship, four correction curves of the correction output changing with the grayscale response can be obtained in the intervals of 0-10000, 10000-20000, 20000-30000, and 30000-40000. Among them, for a pixel, the grayscale response is the grayscale value before correction, and the correction value or correction output is the grayscale value after correction.
[0028] In the above steps, the correction curve is set in this way because: after testing, the pixel correction effect is good and the signal-to-noise ratio of the image after correction is high.
[0029] S22, when the inspection workpiece is placed at the small-diameter pipe weld inspection station, collecting a DR image of the small-diameter pipe weld at the inspection station, and correcting the DR image of the small-diameter pipe weld by using a dark field image and a correction curve;
[0030] Preferably, step S22 includes: when the inspection workpiece is placed at the small-diameter pipe weld inspection station, the DR image of the small-diameter pipe weld on the inspection station is collected as the original image, and the dark field image is subtracted from the original image to obtain a bias error elimination image, and then each pixel in the bias error elimination image is corrected using the correction curve.
[0031] Preferably, in step S22, 10 frames are superimposed and averaged to collect the DR image of the small-diameter pipe weld at the inspection station.
[0032] Preferably, in step S22, using the correction curve to correct each pixel in the bias error elimination image includes: first determining in which grayscale interval the pixel grayscale value is located, then calculating the pixel correction value based on the correction curve corresponding to the pixel grayscale value and the grayscale interval, and correcting the pixel using the correction value.
[0033] In the above steps, the dark field image is subtracted from the DR image of the small-diameter pipe weld, which eliminates the bias error in the DR image and protects the DR image correction value from the influence of the detector hardware, mainly the leakage current of the photodiode and the zero drift of the charge amplifier.
[0034] In the above steps, the correction curve is used to calculate the pixel correction value in the small-diameter pipe weld DR image, and the correction value is used as the new grayscale value of the small-diameter pipe weld DR image to improve the signal-to-noise ratio of the small-diameter pipe weld DR image.
[0035] S23, performing image enhancement processing on the corrected DR image of the small-diameter pipe weld to obtain a DR evaluation image of the small-diameter pipe weld.
[0036] Preferably, step S23 comprises:
[0037] The guided filtering method is used to perform guided filtering and smoothing on the corrected small-diameter pipe weld DR image M to obtain a smoothed image N. The guided filtering filter is an Edge-preS2erving filter.
[0038] Use the corrected small-diameter pipe weld DR image M to subtract the smoothed image N to obtain a detailed contour image;
[0039] Multiply the detail contour image by the magnification factor a to magnify the detail contour image;
[0040] The enlarged image is added to the smoothed image N to obtain the enhanced image I.
[0041] Preferably, in step S23, image enhancement includes:
[0042] I = (MN) × a + N;
[0043] Among them, I is the enhanced image, M is the corrected DR image of the small-diameter pipe weld; N is the smoothed image; and a is the magnification factor.
[0044] Preferably, in step S23, the value of the amplification coefficient a is 3.
[0045] In the above steps, the formula I=(MN)×a+N is used to perform image enhancement processing on the corrected DR image of the small-diameter pipe weld, so that the details of the DR image are enhanced, it is easy to find tiny defects, and the situation of misjudgment and omission of defects in the evaluation is improved.
[0046] 2. Object detection algorithm detection defects
[0047] Preferably, in step S2, the defect types of the DR image of the small-diameter pipe weld include: pores, lack of fusion, lack of penetration, weld bumps, poor forming, undercut, concave, cracks, burn-through, and tool marks.
[0048] In step S2, the enhanced DR image is used to detect the defect types and locations of the DR image by improving the fasterrcnn target detection algorithm. The current algorithm can detect 10 types of defects, including porosity, lack of fusion, incomplete penetration, weld nodule, poor forming, undercut, concave, crack, burn-through, and tool marks.
[0049] Preferably, in step S2, the improvement of the fasterrcnn target detection algorithm includes: for the cross entropy loss function, its b j Set to 0, normalize both the feature vector and the weight vector, multiply by the scaling factor s, and set the angle between the feature vector and the weight vector Adding the angle interval m, it finally becomes the additive angle interval loss function.
[0050] Preferably, in step S2, the additive angle interval loss function is:
[0051]
[0052] Among them, L is the total loss function; N is the total number of categories, which is 10; i is the i-th category; s is the scaling factor, which is 70; is the angle between the feature vector of the i-th classification and the weight vector; m is the angle interval, which is 0.3; n is the total number of classifications; j is the specific j-th classification; θ j is the angle between the j-th classification feature vector and the weight vector.
[0053] In the present invention, in order to make fasterrcnn more accurate in defect classification, the algorithm is improved and designed. The loss function used in the classification of the fasterrcnn algorithm is cross-entropy loss. When the cross-entropy loss is used to train the defect classification of the current DR image, it is easy to cause inaccurate classification of defects with relatively high similarity, such as: three types of defects such as incomplete penetration, lack of fusion, and turning tool marks are prone to classification errors. Therefore, the present invention improves the fasterrcnn algorithm for application in DR image defect detection, and the specific method is to change the cross-entropy loss to the additive angle interval loss (arcloss).
[0054] The cross entropy loss function is:
[0055]
[0056] Among them, L is the total loss function; N is the total number of categories, which is 10; i is the i-th category; is the weight vector when the classification result is i; x i is the feature vector; is the bias term when the classification result is i; j is the jth classification; n is the total number of classifications; is the weight vector when the classification result is j; b j is the bias term when the classification result is j.
[0057] In the present invention, b j Set to 0, normalize both the feature vector and the weight vector, multiply by the scaling factor s, and set the angle between the feature vector and the weight vector Adding the angle interval m, it finally becomes the additive angle interval loss, and the loss function is as follows:
[0058]
[0059] In the present invention, when s takes a value of 70 and m takes a value of 0.3, after testing, the three types of defects, namely, incomplete penetration, lack of fusion and tool marks, are accurately classified.
[0060] When the improved fasterrcnn algorithm detects defects in the DR image, it means that the current weld has defects and is an unqualified weld, which needs to be marked and repaired.
[0061] 3. Marking
[0062] S3. When the defect detection result shows that there is a defect in the DR image of the small-diameter pipe weld, the information management system sends a defect identification signal to the controller. The controller controls the operation of the variable frequency motor according to the defect identification signal, and drives the marking device to mark near the small-diameter pipe weld corresponding to the defect image.
[0063] Preferably, step S3 also includes: when the defect detection result shows that there is a defect in the DR image of the small-diameter pipe weld, after manual review, the information management system sends a defect identification signal to the controller.
[0064] In the present invention, the controller is a programmable logic controller (PLC). During the DR flaw detection process of small-diameter pipes, when the system identifies defects in the weld, it is necessary to mark the weld for repair. The automatic defect marking system consists of an image acquisition module, R-PCE software, PLC, variable frequency motor, marking device, etc. The AI defect detection algorithm built into the R-PCE software performs defect detection on the weld DR image. When defects are identified and manually reviewed, the R-PCE software communicates with the PLC and sends a defect identification signal. The PLC drives the variable frequency motor, and the variable frequency motor drives the marking device to mark near the weld.
[0065] Based on the above defect marking method, the present invention further provides a defect marking system, including:
[0066] Image acquisition module for acquiring DR images of small-diameter pipe welds;
[0067] An information management system in communication with the image acquisition module, the information management system being used to perform defect detection on the DR image of the small-diameter pipe weld;
[0068] a controller in communication with the information management system;
[0069] A variable frequency motor in communication with the controller;
[0070] A marking device connected to the variable frequency motor drive; when the information management system detects a defect in the DR image of the small-diameter pipe weld, the information management system sends a defect identification signal to the controller, and the controller controls the variable frequency motor according to the defect identification signal to drive the marking device to mark near the small-diameter pipe weld corresponding to the defect image.
[0071] Preferably, the marking device comprises a marking frame, a motor fixing box, a lead screw, a lead screw slider, a connecting plate, a marking head and an ink storage box;
[0072] The lead screw is assembled at the front end of the marking frame, and the motor fixing box is assembled at the top end. The variable frequency motor is assembled in the motor fixing box and connected to the lead screw. The lead screw slider is assembled on the lead screw. One end of the connecting plate is connected to the lead screw slider, and the other end is connected to the marking head. The ink storage box is assembled on the marking head. The variable frequency motor drives the lead screw to rotate, drives the lead screw slider to move up and down, and drives the marking head to move up and down through the connecting plate to mark the vicinity of the small-diameter pipe weld.
[0073] In the present invention, when the software detects that there is a defect in the weld, the information is sent to the PLC, the PLC drives the variable frequency motor to rotate, the variable frequency motor drives the marking device to slide up and down on the screw rod, and drives the marking head with ink to move up and down near the weld of the small diameter pipe to complete the marking action. At this time, the ink is present near the weld as a mark.
[0074] Beneficial effects of the present invention:
[0075] The defect marking method and system provided by the present invention, the image acquisition module acquires the DR image of the small-diameter pipe weld, the information management system performs defect detection on the DR image of the small-diameter pipe weld, when a defect is detected, the information management system sends a defect identification signal to the controller, the controller controls the operation of the variable frequency motor according to the defect identification signal, and drives the marking device to mark near the small-diameter pipe weld corresponding to the defect image, it uses the information management system to automatically identify the defect image, and uses the marking device to automatically mark, which is efficient and accurate.
[0076] The defect marking method and system provided by the present invention utilize a marking device for automatic marking, thereby avoiding frequent entry of humans into the lead room to manually mark defects, effectively avoiding X-ray radiation to personnel while improving detection efficiency, and reducing occupational health risks to personnel.
[0077] The defect marking method and system provided by the present invention can perform image enhancement processing on the DR image of the small-diameter pipe weld, so that the defect details of the DR image can be more clearly visible, and a large amount of manual adjustment of the image contrast to find defects can be eliminated, thereby improving the accuracy of the computer using the AI algorithm to evaluate the image. By correcting the DR image of the small-diameter pipe weld, the image signal-to-noise ratio and resolution can be greatly improved; by performing image enhancement on the DR image of the small-diameter pipe weld, the defect contrast can be increased, providing conditions for AI evaluation and manual determination of defects, and ensuring the quality of small-diameter pipe defect detection. Compared with the image processing of the existing RTV system, the correction and enhancement post-processing results of this method can obtain a higher signal-to-noise ratio, resolution and contrast, which is more conducive to AI algorithm evaluation and manual evaluation. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] Figure 1 It is a schematic diagram of the defect marking system of the present invention;
[0079] Figure 2 It is a schematic diagram of the marking device of the present invention;
[0080] Figure 3 The DR image after correction of the present invention;
[0081] Figure 4 This is the enhanced DR image of the present invention.
[0082] Reference numerals:
[0083] 1. Marking machine frame; 2. Motor fixing box; 3. Screw; 4. Screw slider; 5. Connecting plate; 6. Marking head; 7. Ink storage box. DETAILED DESCRIPTION
[0084] The concept, specific structure and technical effects of the present invention will be clearly and completely described below in conjunction with the embodiments and drawings to fully understand the purpose, characteristics and effects of the present invention.
[0085] Example 1
[0086] A defect marking method comprises the following steps:
[0087] S1, the image acquisition module acquires the DR image of the small-diameter pipe weld, and sends the acquired DR image of the small-diameter pipe weld to the information management system;
[0088] S2, the information management system performs defect detection on the DR image of the small-diameter pipe weld to obtain a defect detection result; wherein, when performing defect detection, the DR image of the small-diameter pipe weld is firstly subjected to image enhancement preprocessing, and then the improved fasterrcnn target detection algorithm is used to detect the DR image of the small-diameter pipe weld after image enhancement preprocessing, and the defect type and defect position of the DR image of the small-diameter pipe weld are detected, and the loss function of the improved fasterrcnn target detection algorithm is an additive angle interval loss function;
[0089] S3. When the defect detection result shows that there is a defect in the DR image of the small-diameter pipe weld, the information management system sends a defect identification signal to the controller. The controller controls the operation of the variable frequency motor according to the defect identification signal, and drives the marking device to mark near the small-diameter pipe weld corresponding to the defect image.
[0090] Example 2
[0091] This embodiment further elaborates on step S1 based on embodiment 1. In this embodiment, the information management system is specifically the R-PCE software in the computer. The image acquisition module is specifically a flat panel detector, which is installed under the grating and is used to receive X-rays and perform A / D conversion. The R-PCE software acquires the collected DR image through the SDK call of the flat panel detector, wherein the flat panel detector and the computer are connected to the same local area network through a switch.
[0092] Example 3
[0093] This embodiment further describes step S2 based on embodiment 1. The image enhancement preprocessing in step S2 includes the following steps:
[0094] S21, when no inspection workpiece is placed at the small-diameter pipe weld inspection station, collecting a plurality of DR images at the inspection station, and processing the plurality of DR images to obtain a dark field image and a correction curve;
[0095] S22, when the inspection workpiece is placed at the small-diameter pipe weld inspection station, collecting a DR image of the small-diameter pipe weld at the inspection station, and correcting the DR image of the small-diameter pipe weld by using a dark field image and a correction curve;
[0096] S23, performing image enhancement processing on the corrected DR image of the small-diameter pipe weld to obtain a DR evaluation image of the small-diameter pipe weld.
[0097] Step S21 includes: when no inspection workpiece is placed at the small-diameter pipe weld inspection station, the grating is opened to the maximum position to expose the flat-panel detector, the movement of the X-ray machine head is adjusted so that the X-ray machine is vertically aligned with the flat-panel detector to emit X-rays, and the flat-panel detector collects a number of DR images.
[0098] In this embodiment, the collected DR image needs to be corrected first. Without placing the inspection workpiece, 5 DR images with grayscale values of approximately 0, 10000, 20000, 30000, and 40000 are collected by 10-frame superposition and averaging. The image with a grayscale value of 0 is a dark field image.
[0099] Specifically, when no inspection workpiece is placed at the small-diameter pipe weld inspection station, the X-ray machine is turned off first, and an image with a grayscale value of 0 is collected as a dark field image by using 10-frame superposition and averaging. Then the X-ray machine is turned on, the voltage is adjusted, and 4 DR images are collected as bright field images by using 10-frame superposition and averaging when the image grayscale values are 10000, 20000, 30000, and 40000. Five DR images with grayscale values of 0, 10000, 20000, 30000, and 40000 are obtained.
[0100] Secondly, the dark field image was subtracted from the five DR images to eliminate the bias error and obtain five calibration reference images.
[0101] Finally, for each reference image, the image grayscale average is used as the standard correction value of each pixel response. For each pixel, since the grayscale response and the correction output are in a linear relationship, four correction curves showing the change of correction output with grayscale response can be obtained in the intervals of 0-10000, 10000-20000, 20000-30000, and 30000-40000 respectively.
[0102] In step S22, the workpiece is placed, and the weld DR image is collected by stacking and averaging 10 frames as the original image. The dark field image is subtracted from the original image to eliminate the bias error. Each pixel of the image after the error is eliminated is corrected. First, the interval of the pixel gray value is determined, and then the pixel correction value is calculated according to the gray value and the obtained correction curve. The corrected DR image is as follows: Figure 3 shown.
[0103] In step S22, the signal-to-noise ratio and resolution of the corrected image are improved, and step S23 performs image enhancement to maintain the edge information of the image while increasing the contrast. The specific method is to use guided filtering, set the corrected DR image to M, and use M as the guided image. At this time, the guided filter becomes an Edge-preserving filter. After filtering, the smoothed image N is obtained. In order to enhance the details and suppress the noise at the same time, the corrected DR image itself is subtracted from the smoothed image N to obtain the details and contour information of the image. The details and contours are enlarged and multiplied by the enlargement coefficient a. Finally, the smoothed image N is added to obtain the final enhanced image I. The specific formula is: I = (MN) × a + N. After actual processing, when a is 3, the actual enhancement effect is the best. The enhanced DR image is as follows Figure 4 The enhanced image I is the DR evaluation image of the small-diameter pipe weld. The DR evaluation image of the small-diameter pipe weld is then used to evaluate the defects in the image. Specifically, AI algorithm evaluation and manual evaluation can be used.
[0104] Example 4
[0105] Based on Example 1, this embodiment further elaborates on step S2. In step S2, the enhanced DR image is used to detect the defect types and defect locations of the DR image by improving the fasterrcnn target detection algorithm. The current algorithm can detect a total of 10 types of defects, including porosity, lack of fusion, incomplete penetration, weld nodules, poor forming, undercuts, concave, cracks, burn-throughs, and tool marks.
[0106] In the present invention, in order to make fasterrcnn more accurate in defect classification, the algorithm is improved and designed. The loss function used in the classification of the fasterrcnn algorithm is cross-entropy loss. When the cross-entropy loss is used to train the defect classification of the current DR image, it is easy to cause inaccurate classification of defects with relatively high similarity, such as: three types of defects such as incomplete penetration, lack of fusion, and turning tool marks are prone to classification errors. Therefore, the present invention improves the fasterrcnn algorithm for application in DR image defect detection, and the specific method is to change the cross-entropy loss to the additive angle interval loss (arcloss).
[0107] The cross entropy loss function is:
[0108]
[0109] Among them, L is the total loss function; N is the total number of categories, which is 10; i is the i-th category; is the weight vector when the classification result is i; x i is the feature vector; is the bias term when the classification result is i; j is the jth classification; n is the total number of classifications; is the weight vector when the classification result is j; b j is the bias term when the classification result is j.
[0110] In the present invention, b j Set to 0, normalize both the feature vector and the weight vector, multiply by the scaling factor s, and set the angle between the feature vector and the weight vector Adding the angle interval m, it finally becomes the additive angle interval loss, and the loss function is as follows:
[0111]
[0112] Among them, L is the total loss function; N is the total number of categories, which is 10; i is the i-th category; s is the scaling factor, which is 70; is the angle between the feature vector of the i-th classification and the weight vector; m is the angle interval, which is 0.3; n is the total number of classifications; j is the specific j-th classification; θ j is the angle between the j-th classification feature vector and the weight vector.
[0113] In the present invention, when s takes a value of 70 and m takes a value of 0.3, after testing, the three types of defects, namely, incomplete penetration, lack of fusion and tool marks, are accurately classified.
[0114] When the improved fasterrcnn algorithm detects defects in the DR image, it means that the current weld has defects and is an unqualified weld, which needs to be marked and repaired.
[0115] Example 5
[0116] Based on Example 1, this embodiment further elaborates on step S3, and step S3 also includes: when the defect detection result is that there is a defect in the DR image of the small-diameter pipe weld, after manual review, the information management system sends a defect identification signal to the controller.
[0117] In the present invention, the controller is a programmable logic controller (PLC). During the DR flaw detection process of small-diameter pipes, when the system identifies defects in the weld, it is necessary to mark the weld for repair. The automatic defect marking system consists of an image acquisition module, R-PCE software, PLC, variable frequency motor, marking device, etc. The AI defect detection algorithm built into the R-PCE software performs defect detection on the weld DR image. When defects are identified and manually reviewed, the R-PCE software communicates with the PLC and sends a defect identification signal. The PLC drives the variable frequency motor, and the variable frequency motor drives the marking device to mark near the weld.
[0118] Example 6
[0119] A defect marking system, such as Figure 1 As shown, including:
[0120] Image acquisition module for acquiring DR images of small-diameter pipe welds;
[0121] An information management system in communication with the image acquisition module, the information management system being used to perform defect detection on the DR image of the small-diameter pipe weld;
[0122] a controller in communication with the information management system;
[0123] A variable frequency motor in communication with the controller;
[0124] A marking device connected to the variable frequency motor drive; when the information management system detects a defect in the DR image of the small-diameter pipe weld, the information management system sends a defect identification signal to the controller, and the controller controls the variable frequency motor according to the defect identification signal to drive the marking device to mark near the small-diameter pipe weld corresponding to the defect image.
[0125] like Figure 2 As shown, the marking device includes a marking frame 1, a motor fixing box 2, a screw 3, a screw slider 4, a connecting plate 5, a marking head 6 and an ink storage box 7;
[0126] The screw rod 3 is assembled at the front end of the marking frame 1, and the motor fixing box 2 is assembled at the top end. The variable frequency motor is assembled in the motor fixing box 2 and connected to the screw rod 3. The screw rod slider 4 is assembled on the screw rod 3. One end of the connecting plate 5 is connected to the screw rod slider 4, and the other end is connected to the marking head 6. The ink storage box 7 is assembled on the marking head 6. The variable frequency motor drives the screw rod 3 to rotate, drives the screw rod slider 4 to move up and down, and drives the marking head 6 to move up and down through the connecting plate 5 to mark the vicinity of the small-diameter pipe weld.
[0127] In the present invention, when the software detects that there is a defect in the weld, the information is sent to the PLC, the PLC drives the variable frequency motor to rotate, the variable frequency motor drives the marking device to slide up and down on the screw rod 3, and drives the marking head 6 with ink to move up and down to contact near the weld of the small diameter pipe to complete the marking action. At this time, the ink is present near the weld as a mark.
[0128] The above is a specific description of the implementation mode of the present invention, but the present invention is not limited to the described embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention, and these equivalents or substitutions are all included in the scope defined by the claims of the present invention.
Claims
1. A defect marking method, characterized in that: The following steps are involved: S1, the image acquisition module acquires the DR image of the small-diameter pipe weld, and sends the acquired DR image of the small-diameter pipe weld to the information management system; S2, the information management system performs defect detection on the DR image of the small-diameter pipe weld to obtain a defect detection result; wherein, when performing defect detection, the DR image of the small-diameter pipe weld is firstly subjected to image enhancement preprocessing, and then the improved fasterrcnn target detection algorithm is used to detect the DR image of the small-diameter pipe weld after image enhancement preprocessing, and the defect type and defect position of the DR image of the small-diameter pipe weld are detected, and the loss function of the improved fasterrcnn target detection algorithm is an additive angle interval loss function; S3. When the defect detection result shows that there is a defect in the DR image of the small-diameter pipe weld, the information management system sends a defect identification signal to the controller. The controller controls the operation of the variable frequency motor according to the defect identification signal, and drives the marking device to mark near the small-diameter pipe weld corresponding to the defect image.
2. The defect marking method according to claim 1, characterized in that: In step S2, the defect types of the DR image of the small-diameter pipe weld include: pores, lack of fusion, lack of penetration, weld bead, poor forming, undercut, concave, crack, burn-through, and tool marks.
3. The defect marking method according to claim 1, characterized in that: In step S2, the improvements of the fasterrcnn target detection algorithm include: for the cross entropy loss function, its b j Set to 0, normalize both the feature vector and the weight vector, multiply by the scaling factor s, and set the angle between the feature vector and the weight vector Adding the angle interval m, it finally becomes the additive angle interval loss function.
4. The defect marking method according to claim 1, characterized in that: In step S2, the additive angle interval loss function is: Among them, L is the total loss function; N is the total number of categories, which is 10; i is the i-th category; s is the scaling factor, which is 70; is the angle between the feature vector of the i-th classification and the weight vector; m is the angle interval, which is 0.3; n is the total number of classifications; j is the specific j-th classification; θ j is the angle between the j-th classification feature vector and the weight vector.
5. The defect marking method according to claim 1, characterized in that: Step S3 also includes: when the defect detection result shows that there is a defect in the DR image of the small-diameter pipe weld, after manual review, the information management system sends a defect identification signal to the controller.
6. A defect marking system, characterized in that: include: Image acquisition module for acquiring DR images of small-diameter pipe welds; An information management system in communication with the image acquisition module, the information management system being used to perform defect detection on the DR image of the small-diameter pipe weld; a controller in communication with the information management system; A variable frequency motor in communication with the controller; A marking device connected to the variable frequency motor drive; When the information management system detects defects in the DR image of the small-diameter pipe weld, the information management system sends a defect identification signal to the controller, and the controller controls the operation of the variable frequency motor according to the defect identification signal to drive the marking device to mark near the small-diameter pipe weld corresponding to the defect image.
7. The defect marking system according to claim 6, characterized in that: The marking device comprises a marking frame, a motor fixing box, a lead screw, a lead screw slider, a connecting plate, a marking head and an ink storage box; The lead screw is assembled at the front end of the marking frame, and the motor fixing box is assembled at the top end. The variable frequency motor is assembled in the motor fixing box and connected to the lead screw. The lead screw slider is assembled on the lead screw. One end of the connecting plate is connected to the lead screw slider, and the other end is connected to the marking head. The ink storage box is assembled on the marking head. The variable frequency motor drives the lead screw to rotate, drives the lead screw slider to move up and down, and drives the marking head to move up and down through the connecting plate to mark the vicinity of the small-diameter pipe weld.