Automatic Interpretation System and Method for Diode Packaging Defects via X-ray Images
By combining multi-angle X-ray imaging and deep learning, the problem of metal artifact interference in high-power diode packaging has been solved, achieving high-precision defect identification and location, which is suitable for the production and online inspection of high-reliability electronic devices.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-15
- Publication Date
- 2026-04-03
AI Technical Summary
In existing technologies for high-power diode packaging structures, X-ray images are prone to producing metal artifacts, which reduces the accuracy of defect identification and makes it difficult to remove defects effectively. Conventional methods may result in missed or false detections.
An image fusion algorithm combining multi-angle X-ray imaging and structural similarity weights is adopted. Through a region-adaptive metal recognition and repair model, a deep convolutional neural network is used for artifact repair, and a metal region attention mechanism is introduced to enhance feature weights, outputting the defect type and location.
It significantly reduces metal artifact interference, improves the accuracy and reliability of defect identification, and can accurately detect minute defects. It is suitable for quality control and online inspection in the production of high-reliability electronic devices.
Smart Images

Figure CN120543502B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of defect identification technology, specifically to an automatic interpretation system and method for X-ray images of diode packaging defects. Background Technology
[0002] Automatic X-ray image interpretation of diode packaging defects refers to the use of X-ray imaging technology to detect internal defects (such as cracks, voids, and poor soldering) that may occur during the diode packaging process, and to automatically identify and classify these defects through image recognition and intelligent algorithms (such as deep learning). This technology can replace manual inspection, improve inspection efficiency and accuracy, and help improve product quality control.
[0003] The existing technology has the following shortcomings:
[0004] In high-power diode and other packaged structures, the presence of a large amount of high-density metal material (such as copper frames and pads) makes them susceptible to metal artifacts or halo effects after X-ray penetration. This leads to blurring and distortion in localized areas of the image, masking real defects such as tiny cracks or voids, and severely impacting the accuracy of defect identification. Furthermore, conventional image enhancement techniques are ineffective in removing these artifacts, and deep learning-based recognition models may misclassify them as normal structures or defects, resulting in missed or false detections. Summary of the Invention
[0005] The purpose of this invention is to provide an automatic X-ray image interpretation system and method for diode packaging defects, in order to overcome the shortcomings of the prior art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: an automatic interpretation method for X-ray images of diode packaging defects, comprising:
[0007] Acquire multi-angle X-ray projection images of the target diode, wherein each angle is used to irradiate the diode with X-rays at a preset rotation angle;
[0008] The acquired multi-angle images are registered and fused. An image fusion algorithm based on structural similarity weights is used to generate artifact-suppressed images.
[0009] For the residual metal artifact regions in the fused image, the region adaptive metal recognition module is used for localization, and the trained metal artifact repair model is used for structural compensation and detail reconstruction.
[0010] The image after artifact restoration is input into a deep convolutional neural network model, which includes a metal region attention mechanism module to dynamically enhance the feature weights of metal boundaries and complex texture regions in the image.
[0011] Output the interpretation results, including the defect type, defect location, and its confidence score.
[0012] Preferably, the multi-angle images are acquired using an equal-angle distribution method with an acquisition step size of 10°, and supplementary sampling angles are set in the ±45° and ±135° directions.
[0013] Preferably, X-ray images from multiple angles are aligned to the same spatial coordinate system, and the intermediate angle image is selected as the reference image Ir. For each image Ii, the affine or non-rigid transformation matrix Ti between it and Ir is calculated. A weight is assigned to each pixel in each image. The structural similarity index SSIM is used to calculate the local window similarity between each image and the reference image. A fixed window is selected around each pixel in the image for sliding calculation. For each pixel position (x,y), the SSIM scores corresponding to all images are normalized to obtain the fusion weight. Based on the SSIM weight of each pixel in all images, the weighted average summation is performed on each registered image to obtain the final fused image.
[0014] Preferably, the input image is normalized to the [0,1] interval, the Laplacian operator is used to enhance the image details and boundaries, and the image details and boundaries are binarized to obtain preliminary artifact candidate regions. Image blocks are extracted in the candidate regions by sliding at a fixed size. For each image block, texture features are extracted, including Gabor filter response energy and gray-level co-occurrence matrix directional contrast.
[0015] Preferably, the method for extracting the Gabor filter response energy is as follows: construct Gabor kernels in the 0° and 135° directions respectively, convolve the image patch with the Gabor kernels in the two directions, and calculate the response map; calculate the energy of the response map in each direction, that is, calculate the sum of squares, as the Gabor filter response energy.
[0016] Preferably, the extraction method of gray-level co-occurrence matrix directional contrast is as follows: construct the GLCM matrix of the image block, select the directions 45° and 135°, and the distance d = 1; calculate the gray-level co-occurrence matrix directional contrast values in the two directions respectively.
[0017] Preferably, the Gabor filter response energy and gray-level co-occurrence matrix directional contrast of each window are concatenated into a unified vector, and the label is defined as: yi = 1, indicating that the image patch is an artifact region; yi = 0, indicating that the image patch is a normal structure region; the entire image is slide-by-window to extract features, and each feature is fed into the trained LightGBM model for classification and prediction. All window positions predicted as artifacts are marked to generate a binary map with the same size as the image: M(x,y) = 1, indicating an artifact; M(x,y) = 0, indicating a normal region.
[0018] Preferably, the image after artifact restoration is input into a deep convolutional neural network, and multi-scale feature maps are extracted using the first few convolutional layers of the backbone network; the resulting feature maps have dimensions F∈R. C×H×W Where C is the number of channels and H×W is the spatial dimension;
[0019] For each channel of the feature map F, channel-dimensional compression is first performed to obtain a two-dimensional spatial map; then, average pooling and max pooling operations are used to compress the channel dimension respectively to obtain the average map: F avg ∈R 1×H×W Maximum graph: F max ∈R 1×H×W ;
[0020] Concatenate the two images along the channel dimension to obtain F. concat ∈R 2×H×W ;
[0021] Perform a 7×7 convolution operation on the spliced result to obtain the spatial attention map M. s ∈R 1×H×W Its value range is [0,1];
[0022] Compare the original feature map F with the spatial attention map M s Multiplying them yields the spatially augmented feature map F′;
[0023] For the enhanced feature map F′, global average pooling and global max pooling are applied respectively; the two pooling vectors are fed into a shared two-layer fully connected network, and then channel attention vectors M are generated through sigmoid activation. c ∈R 1×1×C ;
[0024] M c The feature map is multiplied channel by channel with the original feature map to obtain a feature map F″ that has undergone spatial and channel attention weighting. The enhanced feature map F″ is then fed into the defect classification and localization head to generate a set of interpretation results, including the type of defect, its specific location in the image, and the confidence value of each result.
[0025] The present invention also provides an automatic interpretation system for X-ray images of diode packaging defects, including an image acquisition module, an image fusion module, an artifact detection module, a feature weight enhancement module, and a defect interpretation output module;
[0026] Image acquisition module: acquires multi-angle X-ray projection images of the target diode, wherein each angle irradiates the diode with X-rays at a preset rotation angle;
[0027] Image fusion module: Registers and fuses the acquired multi-angle images, and uses an image fusion algorithm based on structural similarity weights to generate artifact-suppressed images;
[0028] Artifact detection module: For residual metal artifact regions in the fused image, the module locates them based on the region adaptive metal recognition module, and uses the trained metal artifact repair model to perform structural compensation and detail reconstruction.
[0029] Feature weight enhancement module: Input the image after artifact restoration into a deep convolutional neural network model. The model includes a metal region attention mechanism module, which is used to dynamically enhance the feature weights of metal boundaries and complex texture regions in the image.
[0030] Defect Interpretation Output Module: Outputs interpretation results, including defect type, defect location, and confidence score.
[0031] The technical effects and advantages provided by the present invention in the above technical solution are as follows:
[0032] 1. This invention constructs an automatic defect identification system for diode packaging that integrates multi-angle X-ray imaging, image fusion for artifact removal, artifact recognition and repair, and an attention-enhanced recognition model. This solves the problems of difficult removal of X-ray image artifacts caused by metal structures in high-power diode packaging and inaccurate defect identification. Multi-angle imaging combined with a structural similarity fusion algorithm significantly reduces the interference of directional artifacts. Furthermore, the LightGBM artifact recognition and depth repair model achieves high-quality image compensation, ensuring the integrity of the image structure and providing clear and clean input for AI recognition.
[0033] 2. This invention introduces a metal region attention mechanism in the recognition stage, effectively enhancing the perception ability of complex textures and boundary regions, and improving the model's detection accuracy for minor defects (such as open solder joints, cracks, and cold solder joints) in metal interference areas. The overall method has advantages such as high intelligence, end-to-end deployment, and adaptability to complex packaging structures, and can be widely applied in high-reliability electronic device manufacturing quality control, failure analysis, and online inspection scenarios. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0035] Figure 1 This is a schematic diagram of the method of the present invention.
[0036] Figure 2 This is a system module diagram of the present invention. Detailed Implementation
[0037] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0038] Example 1, please refer to Figure 1 As shown in this embodiment, the automatic interpretation method for diode packaging defects using X-ray images includes:
[0039] Acquire multi-angle X-ray projection images of the target diode, wherein each angle is used to irradiate the diode with X-rays at a preset rotation angle;
[0040] The acquired multi-angle images are registered and fused. An image fusion algorithm based on structural similarity weights is used to generate artifact-suppressed images.
[0041] For the residual metal artifact regions in the fused image, the region adaptive metal recognition module is used for localization, and the trained metal artifact repair model is used for structural compensation and detail reconstruction.
[0042] The image after artifact restoration is input into a deep convolutional neural network model, which includes a metal region attention mechanism module to dynamically enhance the feature weights of metal boundaries and complex texture regions in the image.
[0043] Output the interpretation results, including the defect type, defect location, and its confidence score.
[0044] To achieve multi-angle X-ray imaging, the diode sample under test needs to be mounted on a platform with a rotatable structure to ensure that it can rotate with high precision along at least one axis during imaging. This typically includes the following structure:
[0045] Precision clamps or adsorption platforms are used to fix the diodes in place, preventing image blurring caused by vibration or displacement during rotation. The sample can rotate from 0° to 360° around its central axis (usually the Z-axis), with a minimum angle resolution of 1° or even higher. The rotation angle is controlled by a PLC or motion control card, synchronized with the X-ray acquisition system.
[0046] To minimize artifact interference caused by metal obstruction at a single angle, a multi-angle ray irradiation and image acquisition process was designed, including: equidistant angular distribution acquisition, such as acquiring 36 projected images at 0°, 10°, 20°…360° with a step size of 10°; and setting key angles based on the diode structure (such as the copper frame direction, solder joint concentration area) to enhance the image sampling density in these areas, such as additional acquisition in the ±45° and ±135° directions.
[0047] Multi-angle X-ray irradiation and synchronous image acquisition: X-ray emitter settings: Ensure the X-ray source has stable high-voltage control, typically adjustable within the range of 40kV to 80kV to accommodate packages of varying thicknesses. Employ a flat panel detector (FPD) or a high-resolution CCD / CMOS area array sensor, coupled with a data acquisition card, to read images at high speed, supporting real-time storage and processing. Automatic X-ray exposure and image acquisition are triggered each time the device rotates to a specified angle, avoiding human intervention and improving efficiency and consistency.
[0048] To ensure that the image quality from all angles meets the requirements for subsequent fusion and recognition, the following indicators need to be controlled:
[0049] Focus and field of view consistency: Ensure that the diode positions are consistent in each image to facilitate subsequent image registration processing; Exposure parameter uniformity: Keep exposure time, voltage, and current consistent at all angles to avoid brightness or contrast deviations; Image denoising: Perform basic noise reduction processing (such as Gaussian filtering, mean filtering, etc.) on the image in real time or offline during the acquisition process.
[0050] X-ray images from each angle should be stored according to the naming convention and retain metadata from the time of image acquisition (such as angle number, exposure parameters, etc.) for subsequent image fusion, artifact repair, and AI recognition. Storage format: Lossless image formats such as TIFF and PNG are recommended. Data structure: Angle and image information should be labeled in JSON or XML format. Image size recommendation: Not less than 1024×1024 pixels to ensure recognition accuracy.
[0051] In multi-angle X-ray images, each image contains information about the target structure from different viewpoints, but also includes artifact interference from different directions. By image registration and fusion, stable regions of the structure are extracted and angle-related artifacts are suppressed to generate a fused image with clear structure, rich details, and reduced artifacts, providing clean input for subsequent defect interpretation.
[0052] Align X-ray images from multiple angles to the same spatial coordinate system to ensure consistent pixel correspondence of the target structure from different viewpoints.
[0053] Typically, an intermediate angle image (such as 180° or 0°) is chosen as the reference image Ir. For each image Ii, its affine or non-rigid transformation matrix Ti with Ir is calculated, satisfying: Ii′=Ti(Ii);
[0054] Ii′ represents the i-th image after registration. Registration can be completed using feature point matching (SIFT, ORB), phase correlation, or mutual information-based optimization algorithms. Bilinear or bicubic interpolation algorithms are applied to resample the transformed image to maintain image quality.
[0055] It should be noted that the registration step ensures that the same physical structure will not be blurred or ghosted in the fused image, which is a prerequisite for the accuracy of subsequent fusion.
[0056] Each pixel in the image is assigned a weight that represents its confidence level in the fused image. The weights are set based on the sharpness and stability of the local structure of the images.
[0057] The structural similarity index SSIM is used to calculate the local window similarity SSIM(x, y) between each image and the reference image, and the expression is:
[0058] In the formula, μ x Let μ be the local average value of image x, representing the average brightness of image x within the current window. y Let be the local average value of image y, representing the average brightness of image y within the current window. Let be the local variance of image x, and let represent the brightness and contrast of image x within the current window. Let σ be the local variance of image y, representing the brightness and contrast of image y within the current window. xy C1 is the covariance of images x and y, representing the consistency of images x and y in the current window structure. C2 is a constant (to prevent the denominator from being 0) and C2 is a stability constant (used for the contrast denominator).
[0059] A fixed window (e.g., 11×11) is selected around each pixel of the image for sliding computation. For each pixel position (x, y), the SSIM scores of all images are normalized to obtain the fusion weight w. i (x, y), the expression is:
[0060] Based on the SSIM weight of each pixel in all images, a weighted average summation is performed on each registered image to obtain the final fused image, preserving areas with clear structures and suppressing noise and artifacts.
[0061] Although multi-angle fusion can significantly reduce artifact interference, residual artifacts may still remain in high-density metal areas (such as pads and copper frames). These artifacts have a structure-like appearance and may interfere with defect identification.
[0062] Metal artifacts often exhibit characteristics such as linear, radial, halo-like, and localized brightness anomalies. Region discrimination is achieved by utilizing image feature statistics and convolutional feature responses.
[0063] From the fused X-ray image, artifact regions (such as metallic halos and radial interference stripes) are automatically identified. Through image feature extraction and machine learning classification, a binary mask map of artifacts, M(x,y), is generated.
[0064] The input image is normalized to the [0,1] interval for easier processing. The Laplacian operator is used to enhance image details and boundaries.
[0065] Image details and boundaries are binarized to obtain preliminary artifact candidate regions Rc(x,y) when the values are greater than a threshold.
[0066] Image patches are extracted by sliding within the candidate region at a fixed size (e.g., 16×16 or 32×32). Texture features are calculated: For each image patch, the following texture features are extracted:
[0067] Feature 1: Gabor filter response energy exhibits strong directionality and clear response, commonly used for extracting periodic textures and directional patterns. Gabor convolution is performed on image patches at multiple scales and directions to extract response energy in different directions. The extraction method involves constructing Gabor kernels at 0° and 135°, convolving the image patch with these kernels, and calculating the response map. The energy of each direction's response map is then calculated as the sum of squares, which is used as the Gabor filter response energy, expressed as: E θ =∑ x,y [G θ (x, y)*I(x, y)] 2 In the formula, E θ G represents the Gabor filter response energy. θ (x, y) represents the Gabor kernel function, and I(x, y) represents the pixel values corresponding to the image patch (e.g., 16×16) extracted by the sliding window. The advantage of calculating the Gabor filter response energy is that it can effectively detect striped and radial artifacts and is highly sensitive to frequency responses in different directions.
[0068] For example, applying a Gabor filter with an orientation of θ = 0° to a 16×16 image patch, after convolution, if the image patch contains horizontal metallic texture stripes, the filter response is strong, E 0° It will be very large; in contrast, the Gabor filter response E in the vertical direction (90°) is much larger.90° It may then be close to 0; this directional selectivity is very suitable for determining the directional distribution of artifacts.
[0069] Feature 2: Gray-Level Co-occurrence Matrix (GLCM) Orientation Contrast, based on the GLCM, but focusing on contrast values in asymmetrical directions (e.g., 45°, 135°); it can reflect the directional roughness of image texture and gray-level transition characteristics. Extraction method: Construct the GLCM matrix of the image patch, selecting directions of 45° and 135°, with a distance d = 1; calculate the GLCM orientation contrast value Contrast for each of the two directions, expressed as: Contrast = ∑ i,j (ij) 2 ·P(i,j); where P(i,j) is the probability value in the co-occurrence matrix, representing the probability that a pixel with gray value i and a pixel with gray value j in the image co-occur in a certain spatial relationship (such as direction or distance).
[0070] For example, select an image patch (e.g., 32×32); calculate GLCM in a specified direction (e.g., 45°, 135°); extract the Contrast values in both directions; if the contrast is higher than that of normal structural regions, it may be an artifact region; use it as a feature input to the LightGBM classifier for judgment.
[0071] The Gabor filter response energy and gray-level co-occurrence matrix directional contrast of each window are concatenated into a unified vector. Labels are defined as follows: yi = 1, indicating an image patch is an artifact region; yi = 0, indicating an image patch is a normal structure region. Label sources include manually annotated known metallic artifact regions in the fused image or self-supervised generation using "artifact-non-artifact control samples" after image restoration.
[0072] Features are extracted by sliding the entire image through a window, and then fed into the trained LightGBM model one by one for classification and prediction.
[0073] Mark the positions of all windows predicted as artifacts (label=1) and generate a binary map with the same size as the image: M(x,y)=1 represents an artifact; M(x,y)=0 represents a normal region.
[0074] The identified artifact regions are repaired with reasonable structure, continuous edges, and natural texture to avoid damaging the real structure. A U-Net variant or a Transformer+CNN hybrid model is used for image inpainting, with the input being a fused image with a mask and an artifact mask. The inputs are the original fused image If and the artifact mask M; the output is the repaired image Ir. The encoder extracts multi-scale features from the image and mask; the attention mechanism focuses on the masked regions and their boundary information; the decoder progressively restores the texture and merges it with the unaffected areas of the original image; an edge loss function ensures structural continuity and suppresses blurring during inpainting.
[0075] During feature extraction, the network first uses shallow convolutional layers to extract low-level information such as basic edges, textures, and brightness distributions from the image. The attention mechanism module learns to identify metal regions. This identification is based on features such as obvious high-density edges, periodic textures, and abrupt changes in grayscale in the image, which are typical characteristics of structures such as metal frames and weld joints.
[0076] The artifact-repaired image is input into a deep convolutional neural network. The first few convolutional layers of the backbone network (such as ResNet or U-Net) are used to extract multi-scale feature maps; the resulting feature maps have dimensions F∈R. C×H×W Where C is the number of channels and H×W is the spatial dimension.
[0077] For each channel of the feature map F, channel-dimensional compression is first performed to obtain a two-dimensional spatial map; then, average pooling and max pooling operations are used to compress the channel dimension respectively to obtain the average map: F avg ∈R 1×H×W Maximum graph: F max ∈R 1×H×W ;
[0078] Concatenate the two images along the channel dimension to obtain F. concat ∈R 2×H×W ;
[0079] Perform a 7×7 convolution operation on the spliced result (with Sigmoid activation) to obtain the spatial attention map M. s ∈R 1×H×W Its value range is [0,1].
[0080] Compare the original feature map F with the spatial attention map M s Multiplication (broadcasting mechanism) gives a higher response to areas that are more likely to contain defects in space (such as metal boundaries): F′=F⊙M s ; We obtain the spatially enhanced feature map F′.
[0081] For the enhanced feature map F′, global average pooling and global max pooling are applied respectively; the two pooling vectors are fed into a shared two-layer fully connected network (usually a "compress-expand" structure), and then channel attention vectors M are generated by sigmoid activation. c ∈R 1×1×C .
[0082] M c Multiply the original feature map channel by channel to enhance the discriminative semantic channels: F′′=F′⊙M c The feature map F″, which is simultaneously subjected to spatial and channel attention weighting, is obtained, in which the texture, brightness, and structural features of the metal-related regions are significantly amplified.
[0083] The enhanced feature map F″ is fed into the defect classification and localization head. The classification branch in the model identifies the type of defect, such as open weld, cold weld, bubble, crack, etc., based on the extracted image semantic information. The localization branch predicts the spatial location of the defect in the image, usually marked as a rectangular box, center point, or pixel-level segmentation map. At the same time, the model also outputs a confidence score for each detection result, which is based on the probability value output by the classifier and is used to quantify the reliability of the model for the current judgment result.
[0084] Ultimately, the system will generate a set of interpretation results, including: the type of defect, its specific location in the image (e.g., center coordinates or region mask), and the confidence value for each result. Through this structure, the system can not only achieve accurate defect detection but also clearly pinpoint the exact location of the problem, providing strong evidence for manual review or automated sorting.
[0085] Example 2, please refer to Figure 2 As shown in the figure, the diode packaging defect X-ray image automatic interpretation system described in this embodiment includes an image acquisition module, an image fusion module, an artifact detection module, a feature weight enhancement module, and a defect interpretation output module;
[0086] Image acquisition module: acquires multi-angle X-ray projection images of the target diode, wherein each angle irradiates the diode with X-rays at a preset rotation angle;
[0087] Image fusion module: Registers and fuses the acquired multi-angle images, and uses an image fusion algorithm based on structural similarity weights to generate artifact-suppressed images;
[0088] Artifact detection module: For residual metal artifact regions in the fused image, the module locates them based on the region adaptive metal recognition module, and uses the trained metal artifact repair model to perform structural compensation and detail reconstruction.
[0089] Feature weight enhancement module: Input the image after artifact restoration into a deep convolutional neural network model. The model includes a metal region attention mechanism module, which is used to dynamically enhance the feature weights of metal boundaries and complex texture regions in the image.
[0090] Defect Interpretation Output Module: Outputs interpretation results, including defect type, defect location, and confidence score.
[0091] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0092] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.
[0093] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0094] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. An automatic method for interpreting X-ray images of diode packaging defects, characterized in that: include: Acquire multi-angle X-ray projection images of the target diode, wherein each angle is used to irradiate the diode with X-rays at a preset rotation angle; The acquired multi-angle images are registered and fused. An image fusion algorithm based on structural similarity weights is used to generate artifact-suppressed images. For the residual metal artifact regions in the fused image, the region adaptive metal recognition module is used for localization, and the trained metal artifact repair model is used for structural compensation and detail reconstruction. The image after artifact restoration is input into a deep convolutional neural network model, which includes a metal region attention mechanism module to dynamically enhance the feature weights of metal boundaries and complex texture regions in the image. The output judgment result includes the defect type, defect location, and its confidence score; wherein, the specific steps of the localization based on the region adaptive metal recognition module include: normalizing the input image to the [0,1] interval, using the Laplacian operator to enhance image details and boundaries, performing binarization processing on the image details and boundaries greater than a threshold to obtain preliminary artifact candidate regions; extracting image blocks of a fixed size within the candidate regions, extracting texture features for each image block, the texture features including Gabor filter response energy and gray-level co-occurrence matrix directional contrast; the Gabor filter response energy is extracted by constructing Gabor kernels in the 0° and 135° directions respectively, and then... The block is convolved with Gabor kernels in two directions to calculate the response map; the energy of the response map in each direction is calculated, i.e., the sum of squares is calculated, which is used as the Gabor filter response energy; the gray-level co-occurrence matrix directional contrast is extracted as follows: construct the GLCM matrix of the image block, select the directions 45° and 135°, and the distance d=1; calculate the gray-level co-occurrence matrix directional contrast values in the two directions respectively; concatenate the Gabor filter response energy and gray-level co-occurrence matrix directional contrast of each window into a unified vector, and feed it into the trained LightGBM model for classification and prediction one by one, mark the positions of all windows predicted as artifacts, and generate a binary image M(x,y) with the same size as the image.
2. The method for automatically interpreting X-ray images of diode packaging defects according to claim 1, characterized in that: The multi-angle images are acquired using an equal-angle distribution method with an acquisition step size of 10°, and supplementary sampling angles are set in the ±45° and ±135° directions.
3. The method for automatic interpretation of X-ray images of diode packaging defects according to claim 1, characterized in that: X-ray images from multiple angles are aligned to the same spatial coordinate system. The intermediate angle image is selected as the reference image Ir. For each image Ii, the affine or non-rigid transformation matrix Ti between it and Ir is calculated. A weight is assigned to each pixel in each image. The structural similarity index SSIM is used to calculate the local window similarity between each image and the reference image. A fixed window is selected around each pixel in the image for sliding calculation. For each pixel position (x,y), the SSIM scores of all images are normalized to obtain the fusion weight. Based on the SSIM weight of each pixel in all images, the weighted average summation of each registered image is calculated to obtain the final fused image.
4. The method for automatically interpreting X-ray images of diode packaging defects according to claim 1, characterized in that: The artifact-repaired image is input into a deep convolutional neural network. The first few convolutional layers of the backbone network are used to extract multi-scale feature maps; the resulting feature maps have a dimension of [missing value]. Where C is the number of channels and H×W is the spatial dimension; For each channel of the feature map F, channel-dimensional compression is first performed to obtain a two-dimensional spatial map; then, average pooling and max pooling operations are used to compress the channel dimension respectively to obtain the average map. Maximum image: ; By concatenating the two images along the channel dimension, we obtain... ; Perform a 7×7 convolution operation on the stitched result to obtain a spatial attention map. Its value range is [0,1]; Compare the original feature map F with the spatial attention map Multiplication yields a spatially augmented feature map. ; For the enhanced feature map Global average pooling and global max pooling are used respectively; the two pooling vectors are fed into a shared two-layer fully connected network, and then channel attention vectors are generated through Sigmoid activation. ; Will Multiplying the original feature map channel by channel yields a feature map that has undergone both spatial and channel attention weighting. The enhanced feature map The defect classification and localization head generates a set of interpretation results, including the type of defect, its specific location in the image, and the confidence value of each result.
5. An automatic X-ray image interpretation system for diode packaging defects, used to implement the automatic X-ray image interpretation method for diode packaging defects according to any one of claims 1-4, characterized in that: It includes an image acquisition module, an image fusion module, an artifact detection module, a feature weight enhancement module, and a defect interpretation and output module; Image acquisition module: acquires multi-angle X-ray projection images of the target diode, wherein each angle irradiates the diode with X-rays at a preset rotation angle; Image fusion module: Registers and fuses the acquired multi-angle images, and uses an image fusion algorithm based on structural similarity weights to generate artifact-suppressed images; Artifact detection module: For residual metal artifact regions in the fused image, the module locates them based on the region adaptive metal recognition module, and uses the trained metal artifact repair model to perform structural compensation and detail reconstruction. Feature weight enhancement module: Input the image after artifact restoration into a deep convolutional neural network model. The model includes a metal region attention mechanism module, which is used to dynamically enhance the feature weights of metal boundaries and complex texture regions in the image. Defect Interpretation Output Module: Outputs interpretation results, including defect type, defect location, and confidence score.
Citation Information
Patent Citations
Ophthalmic optical coherence tomography image restoration method
CN116740216A
Defect detection method and device and storage medium
CN119477927A
X-ray flaw detection system based on high-voltage overhead line maintenance
CN119959252A