CN-122023392-A - X-ray detection method for structural member internal structural defect
Abstract
The invention discloses an X-ray detection method for structural internal structural defects, and belongs to the technical field of nondestructive detection and computer vision. The method comprises the steps of firstly constructing an adaptive image enhancement flow, and obviously enhancing the identifiability of a defect area while suppressing noise. On the basis, an end-to-end defect detection network model is designed, a mixed encoder integrating a attention mechanism and a convolution structure is adopted in the model, the co-scale global modeling of high semantic features and the efficient integration of cross-scale features are realized, meanwhile, an uncertainty minimum selection query mechanism is introduced, joint modeling and dynamic optimization are carried out on the types and the space positions of defects, and positioning errors caused by unstable query initialization in end-to-end detection are remarkably reduced. The invention effectively solves the problems of insufficient precision and low efficiency in the traditional method for detecting the fine internal defects, and is particularly suitable for automatic nondestructive detection of structural members.
Inventors
- SHANG ZHENDONG
- ZHANG WEIWEI
- ZHAO JULONG
- WANG SHAOBIN
Assignees
- 中国工程物理研究院电子工程研究所
Dates
- Publication Date
- 20260512
- Application Date
- 20260408
Claims (10)
- 1. An X-ray detection method for structural defects in a structural member, comprising: step1, acquiring an original X-ray image of a structural member to be detected; Step2, sequentially executing an image enhancement process of sequential coupling on the original X-ray image, wherein the image enhancement process comprises standardization processing, self-adaptive gamma conversion, contrast-limited self-adaptive histogram equalization and Sobel operator edge sharpening processing, and finally obtaining an internal structural defect enhancement image of the structural member; And 3, inputting the enhanced image into a pre-trained end-to-end defect detection network, wherein the network adopts a hybrid encoder comprising a co-scale feature interaction module and a trans-scale feature fusion module, and a decoder based on an uncertainty minimum selection query mechanism, and the network directly outputs defect position information.
- 2. The method according to claim 1, wherein in the step 2, the normalization process eliminates affine transformation interference and unifies data distribution by subtracting a global mean value from an original image pixel matrix and dividing the global mean value by a standard deviation.
- 3. The method according to claim 1, wherein in the step 2, the gamma value for the adaptive gamma conversion is dynamically calculated and determined within a preset minimum and maximum range of the gamma value according to the average brightness value of the pixels in the local area of the image.
- 4. The method for detecting structural defects in an internal structure of a structural member according to claim 1, wherein in the step 2, the adaptive histogram equalization processing of limiting contrast is specifically performed by dividing an image into a plurality of local areas, calculating a gray level histogram of each local area, clipping pixel frequencies exceeding a preset contrast limiting threshold in the gray level histogram, and equally distributing clipping amounts to all gray levels to form a new local histogram, constructing an accumulated distribution function based on the new local histogram, and mapping pixel gray values of the corresponding local area.
- 5. The method of claim 4, wherein the mapping the pixel gray values of the corresponding local area is performed by mapping the original gray values to new gray values by a cumulative distribution function, wherein the cumulative distribution function is calculated based on the reassigned histogram.
- 6. The method according to claim 1, wherein in the step 2, the Sobel operator edge sharpening is implemented by calculating the gradient amplitude of the image in the horizontal direction and the vertical direction, weighting the gradient amplitude by a preset sharpening factor, and then adding the weighted gradient amplitude to the image subjected to the limited contrast adaptive histogram equalization.
- 7. The method according to claim 1, wherein the normalization process, the adaptive gamma conversion, the limiting contrast adaptive histogram equalization, and the Sobel operator edge sharpening process in step 2 are performed sequentially, and the output image of the previous process step is used as the input image of the subsequent process step.
- 8. The X-ray detection method for structural member internal structural defects according to claim 1 is characterized in that in the hybrid encoder, the co-scale feature interaction module utilizes an attention mechanism to achieve feature reinforcement and information interaction in feature graphs, the trans-scale feature fusion module utilizes a convolutional neural network to fuse the feature graphs of different scales so as to aggregate multi-scale semantic information, and the minimum uncertainty selection query mechanism of the decoder selects the feature with the minimum uncertainty to initialize a query vector of the decoder by evaluating the uncertainty of the output feature of the encoder.
- 9. An electronic device, comprising: one or more processors; A memory for storing one or more programs; Wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement a structural member internal structural defect X-ray detection method of any one of claims 1-8.
- 10. A computer readable storage medium having stored thereon executable instructions which when executed by a processor cause the processor to perform a method of X-ray detection of structural defects in a structure according to any one of claims 1 to 8.
Description
X-ray detection method for structural member internal structural defect Technical Field The invention belongs to the technical field of nondestructive testing and computer vision, and particularly relates to an X-ray detection method for internal structural defects of a structural member. Background In the high-end manufacturing fields of aerospace, energy equipment and the like, the internal quality of a key structural member directly determines the service safety and service life of the key structural member. The X-ray nondestructive testing technology is a core means for detecting internal defects (such as porosity and air holes). However, the fundamental challenge faced by this technique is that, subject to imaging physics principles, the raw X-ray images acquired are typically characterized by low overall contrast, concentrated gray scale distribution, and associated significant quantum noise and scattering artifacts. For the small size defect, the signal in the image is weak, and the small size defect is almost integrated with the background, so that the small size defect is extremely difficult to identify by naked eyes and a traditional algorithm. To enhance defect visibility, image enhancement techniques are widely used. The prior art comprises global histogram equalization, gamma conversion, various spatial filtering and the like. However, these methods have obvious limitations when applied to X-ray images, such as that the global processing can amplify noise at the same time, resulting in reduced signal-to-noise ratio, that simple gamma conversion cannot take into account the bright-dark regions, and that traditional edge enhancement operators (such as Sobel) extract most noise edges on low-contrast original images, rather than actual defect contours. In recent years, there have been studies on the combination of adaptive gamma conversion and edge enhancement for infrared target detection (e.g., chinese patent application, publication No. CN 111611907B), but infrared images and X-ray images are essentially different in imaging mechanism, noise properties, and target characteristics. The former deals with the differences in surface thermal radiation, and the latter deals with the penetrating projections of differences in material internal density. The former method is directly migrated to the X-ray detection field, the inherent contradiction of 'enhancing local weak signals' and 'suppressing global noise' cannot be solved, the enhancement effect on micron-sized defects is limited, and even the detection precision is possibly reduced due to noise amplification. On the other hand, deep learning-based object detection models (e.g., YOLO, fast R-CNN) have been introduced into the field to replace manual evaluation. However, these generic models, when faced with the above-described non-effectively enhanced, feature-blurred X-ray images, tend to have inadequate sensitivity to small-scale defects, or produce a large number of false positives. Some end-to-end detection networks also have problems of slow convergence and inefficient query mechanisms. Therefore, developing an intelligent detection method capable of processing the X-ray image characteristics, cooperatively optimizing the enhancement flow and the special detection network in a targeted manner becomes an urgent need for realizing the automation and high-precision nondestructive detection of structural members. Disclosure of Invention In order to solve the technical problems, the invention provides an X-ray detection method for the internal structural defects of a structural member, and provides an accurate and automatic solution for the internal defect identification of the structural member by combining an image enhancement technology and a deep learning image detection method. In order to achieve the above purpose, the invention adopts the following technical scheme: in a first aspect, the present invention provides a method for detecting structural defects in an interior of a structural member by X-rays, comprising: step1, acquiring an original X-ray image of a structural member to be detected; Step2, sequentially executing an image enhancement process of sequential coupling on the original X-ray image, wherein the image enhancement process comprises standardization processing, self-adaptive gamma conversion, contrast-limited self-adaptive histogram equalization and Sobel operator edge sharpening processing, and finally obtaining an internal structural defect enhancement image of the structural member; And 3, inputting the enhanced image into a pre-trained end-to-end defect detection network, wherein the network adopts a hybrid encoder comprising a co-scale feature interaction and trans-scale feature fusion module and a decoder based on an uncertainty minimum selection query mechanism, and the network directly outputs the defect position information. Further, in the step 2, the normalization process performs an operation of subtracting the g