Diode packaging defect X-ray image automatic interpretation system and method

Through the combination of multi-angle X-ray imaging and deep learning, the problem of metal artifact interference in high-power diode packaging is solved, and efficient and accurate defect identification and interpretation is achieved, which is suitable for the production and detection of high-reliability electronic devices.

CN120543502AActive Publication Date: 2025-08-26ZHONGHUI OPTOELECTRONICS (SHENZHEN) CO LTD

Patent Information

Application Number
CN202510625885.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-15
Publication Date
2025-08-26
Estimated Expiration
2045-05-15

AI Technical Summary

Technical Problem

Prior Art In the high-power diode packaging structure, X-ray images are prone to metal artifacts, resulting in inaccurate defect identification, and it is difficult for conventional methods to effectively remove artifacts, affecting detection efficiency and accuracy.

Method used

Multi-angle X-ray imaging combined with structural similarity weights is used to locate and repair artifacts through the area adaptive metal recognition module, introduce metal area attention mechanism to enhance feature weights, and use deep convolutional neural networks to perform defect interpretation.

Benefits of technology

It significantly reduces metal artifact interference, improves the accuracy and efficiency of defect identification, and can accurately identify small defects. It is suitable for production quality control and online inspection of high-reliability electronic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120543502A_ABST
    Figure CN120543502A_ABST
Patent Text Reader

Abstract

The invention discloses a diode packaging defect X-ray image automatic interpretation system and method, and particularly relates to the technical field of defect identification. Initial artifact interference is effectively inhibited through multi-angle X-ray imaging and image fusion based on structural similarity; further compensating structural information by combining a region self-adaptive metal artifact recognition and repair model; a deep convolutional neural network model with a metal region attention mechanism is introduced, the feature perception capability of a complex texture region is enhanced, the recognition accuracy of the metal boundary region tiny defects can be remarkably improved, and the missing detection and misjudgment rate can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of defect recognition, and in particular to a system and method for automatically interpreting X-ray images of diode package defects. Background Art

[0002] Automatic X-ray image interpretation of diode packaging defects uses X-ray imaging to detect internal defects (such as cracks, voids, and poor soldering) that may occur during the diode packaging process. Image recognition and intelligent algorithms (such as deep learning) are then used to automatically identify and classify these defects. This technology can replace manual inspection, improve detection efficiency and accuracy, and contribute to enhanced product quality control.

[0003] The existing technology has the following shortcomings:

[0004] In packaging structures like high-power diodes, the presence of high-density metal materials (such as copper frames and solder pads) can easily create metal artifacts or halo effects after X-ray penetration. These artifacts can blur or distort localized areas of the image, masking real defects like tiny cracks or voids and severely impacting defect recognition accuracy. Furthermore, conventional image enhancement methods struggle to effectively remove these artifacts, and deep learning-based recognition models can misidentify them as normal structures or defects, leading to missed or false detections. Summary of the Invention

[0005] The purpose of the present invention is to provide a system and method for automatically interpreting X-ray images of diode package defects to address the shortcomings of the background technology.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for automatically interpreting X-ray images of diode package defects, comprising:

[0007] Acquire multi-angle X-ray projection images of the target diode, wherein each angle irradiates the diode with X-rays at a preset rotation angle;

[0008] The acquired multi-angle images are registered and fused, and an image fusion algorithm based on structural similarity weight is used to generate artifact-suppressed images;

[0009] The metal artifact areas remaining in the fused image are located using the regional adaptive metal recognition module, and the trained metal artifact restoration model is used to perform structural compensation and detail reconstruction.

[0010] The artifact-repaired image is fed into a deep convolutional neural network model, which includes a metal region attention mechanism module for dynamically enhancing the feature weights of metal boundaries and complex texture areas in the image;

[0011] Output the interpretation results, including defect type, defect location and its confidence score.

[0012] Preferably, the multi-angle images are collected in an equal-angle distribution manner, with a collection step of 10°, and supplementary sampling angles are set in the directions of ±45° and ±135°.

[0013] Preferably, X-ray images from multiple angles are aligned in the same spatial coordinate system, and the middle 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 the pixels in each image, and 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 of the image for sliding calculation, and the SSIM scores corresponding to each pixel position (x, y) of all images are normalized to obtain the fusion weight. According to the SSIM weight of each pixel in all images, the weighted average summation of each aligned image is calculated to obtain the final fused image.

[0014] Preferably, the input image is normalized to the interval [0,1], the Laplacian operator is used to enhance the image details and boundaries, and the image details and boundaries greater than the threshold are binarized to obtain a preliminary artifact candidate area; image blocks are extracted by sliding with a fixed size within the candidate area, and texture features are extracted for each image block, including Gabor filter response energy and grayscale co-occurrence matrix directional contrast.

[0015] Preferably, the Gabor filter response energy is extracted by constructing Gabor kernels in the 0° and 135° directions respectively, convolving the image block with the Gabor kernels in the two directions, and calculating the response map; and counting the energy of the response map in each direction respectively, that is, calculating the sum of squares as the Gabor filter response energy.

[0016] Preferably, the gray level co-occurrence matrix directional contrast is extracted by constructing a GLCM matrix of the image block, selecting directions of 45° and 135°, and a distance of d=1; and calculating 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 spliced ​​into a unified vector, and the label is defined as: yi = 1, indicating that the image block is an artifact area; yi = 0, indicating that the image block is a normal structure area; the entire image is slid by window to extract features, and each is sent to the trained LightGBM model for classification prediction, and all window positions predicted to be artifacts are marked to generate a binary image consistent with the image size: M(x, y) = 1, indicating an artifact; M(x, y) = 0, indicating a normal area.

[0018] Preferably, the image after artifact repair is input into a deep convolutional neural network, and the convolution operations of the first few layers of the backbone network are used to extract multi-scale feature maps; the dimension of the obtained feature map is 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, the channel dimension is compressed first to obtain a two-dimensional spatial map; the average pooling and maximum pooling operations are used to compress the channel dimension respectively to obtain the average map: F avg ∈R 1×H×W ; Largest image: F max ∈R 1×H×W ;

[0020] Concatenate the two graphs in the channel dimension to get F concat ∈R 2×H×W ;

[0021] Perform a 7×7 convolution operation on the splicing result to obtain the spatial attention map M s ∈R 1×H×W , whose value range is [0,1];

[0022] Combine the original feature map F with the spatial attention map M s Multiply to obtain the spatially enhanced feature map F′;

[0023] For the enhanced feature map F′, global average pooling and global maximum pooling are used respectively; the two pooling vectors are sent to a shared two-layer fully connected network, and then the channel attention vector M is generated through Sigmoid activation. c ∈R 1×1×C ;

[0024] M c Multiplying the original feature map channel by channel obtains the feature map F″ that is weighted by both spatial and channel attention. The enhanced feature map F″ is sent to the defect classification and localization head to generate a set of judgment results, including the type of defect, the specific location in the image, and the confidence value of each result.

[0025] The present invention also provides a diode package defect X-ray image automatic interpretation system, 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, where each angle irradiates the diode with X-rays at a preset rotation angle;

[0027] Image fusion module: performs registration and image fusion on 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: This module locates the metal artifact areas remaining in the fused image using the regional adaptive metal recognition module, and uses the trained metal artifact restoration model to perform structural compensation and detail reconstruction.

[0029] Feature weight enhancement module: The artifact-repaired image is fed into a deep convolutional neural network model, which includes a metal area attention mechanism module to dynamically enhance the feature weights of metal boundaries and complex texture areas in the image.

[0030] Defect interpretation output module: outputs interpretation results, including defect type, defect location and its confidence score.

[0031] In the above technical solution, the technical effects and advantages provided by the present invention are:

[0032] 1. This invention addresses the problem of inaccurate defect identification and difficulty removing X-ray image artifacts caused by metal structures in high-power diode packages by constructing an automatic diode package defect interpretation system that integrates multi-angle X-ray imaging, image fusion artifact removal, artifact identification and repair, and an attention-enhanced recognition model. Multi-angle imaging combined with a structural similarity fusion algorithm significantly reduces the interference of directional artifacts. Furthermore, high-quality image compensation is achieved through the LightGBM artifact recognition and deep repair model, ensuring the integrity of image structure and providing clear and clean input for AI recognition.

[0033] 2. This invention introduces a metal region attention mechanism during the recognition phase, effectively enhancing the perception of complex textures and boundary regions, and improving the model's accuracy in detecting minor defects (such as empty solder joints, cracks, and cold solder joints) in metal interference areas. This overall approach offers advantages such as high intelligence, end-to-end deployability, and adaptability to complex packaging structures. It can be widely applied in high-reliability electronic device production quality control, failure analysis, and online inspection scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments described in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0035] Figure 1 Schematic diagram of the method of the present invention.

[0036] Figure 2 It is a system module diagram of the present invention. DETAILED DESCRIPTION

[0037] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0038] Example 1, please refer to Figure 1 As shown, the method for automatically interpreting diode package defect X-ray images in this embodiment includes:

[0039] Acquire multi-angle X-ray projection images of the target diode, wherein each angle irradiates the diode with X-rays at a preset rotation angle;

[0040] The acquired multi-angle images are registered and fused, and an image fusion algorithm based on structural similarity weight is used to generate artifact-suppressed images;

[0041] The metal artifact areas remaining in the fused image are located using the regional adaptive metal recognition module, and the trained metal artifact restoration model is used to perform structural compensation and detail reconstruction.

[0042] The artifact-repaired image is fed into a deep convolutional neural network model, which includes a metal region attention mechanism module for dynamically enhancing the feature weights of metal boundaries and complex texture areas in the image;

[0043] Output the interpretation results, including 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 be rotated with high precision along at least one axis during the imaging process. This usually includes the following structures:

[0045] A precision fixture or adsorption platform secures the diode to prevent image blur caused by vibration or offset during rotation. The sample can be rotated 0° to 360° around its central axis (usually the Z axis), with a minimum angular resolution of 1° or better. The rotation angle is controlled by a PLC or motion control card, synchronized with the X-ray acquisition system.

[0046] To minimize artifacts caused by metal occlusion at a single angle, multiple-angle irradiation and image acquisition steps were designed, including: equal-angle distribution acquisition, such as acquiring 36 projection images at 0°, 10°, 20°, and 360° in steps of 10°; setting key angles based on the diode structure (such as the direction of the copper frame and the 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 synchronized image acquisition: X-ray emitter setup: Ensure the X-ray source has stable high-voltage control, typically adjustable between 40kV and 80kV to accommodate packages of varying thicknesses. A flat-panel detector (FPD) or high-resolution CCD / CMOS area array sensor is used, coupled with a data acquisition card for high-speed image reading, supporting real-time storage and processing. Each rotation to a specified angle automatically triggers X-ray exposure and image acquisition, eliminating manual intervention and improving efficiency and consistency.

[0048] To ensure that the image quality at 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 the consistent position of the diode in each image to facilitate subsequent image registration processing; exposure parameter uniformity: keep the 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 of each angle must be stored according to naming conventions, and the metadata at the time of image acquisition (such as angle number, exposure parameters, etc.) must be retained for subsequent image fusion, artifact repair, and AI recognition: Storage format: TIFF, PNG and other lossless image formats are recommended; Data structure: Angle and image information should be annotated 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 perspectives, but also contains artifacts from different directions. Through image registration and fusion, structurally stable areas are extracted and angle-dependent artifacts are suppressed to produce a fused image with clear structure, rich details, and minimal 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 target structures at each viewing angle.

[0053] Usually, an intermediate angle image (such as 180° or 0°) 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, satisfying: Ii′=Ti(Ii);

[0054] Ii′ is the i-th image after registration. Registration can be performed using feature point matching (SIFT, ORB), phase correlation, or mutual information-based optimization algorithms. Resample the transformed image using bilinear or bicubic interpolation to maintain image quality.

[0055] It should be noted here that the registration step ensures that the same physical structure does not blur or have ghosting in the fused image, which is a prerequisite for the accuracy of subsequent fusion.

[0056] Each pixel in the image is assigned a weight, which represents the confidence level of the pixel in the fusion image. The weight is set based on the clarity and stability of the local structure of the image.

[0057] The structural similarity index SSIM is used to calculate the local window similarity SSIM(x, y) between each image and the reference image. The expression is:

[0058] Where μ x The local average value of image x represents the brightness mean of image x in the current window, μ y is the local average value of image y, which means the brightness mean of image y in the current window. is the local variance of image x, which represents the brightness contrast of image x in the current window. is the local variance of image y, which represents the brightness contrast of image y in the current window, σ xy is the covariance of images x and y, indicating the consistency of the structures of images x and y in the current window, C1 is a constant (to prevent the denominator from being 0), and C2 is a stable constant (for the contrast denominator).

[0059] A fixed window (e.g. 11×11) is selected around each pixel of 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 w i (x, y), the expression is:

[0060] According to 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, which retains the clear structure area and suppresses 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 structure-like appearance characteristics and may interfere with defect identification.

[0062] Metal artifacts often present linear, radial, halo, and local brightness anomalies. Image feature statistics and convolution feature responses are used to achieve region discrimination.

[0063] From the fused X-ray image, the artifact area (such as metal halo and radial interference stripes) is automatically identified, and the artifact binary mask map M(x,y) is generated through image feature extraction and machine learning classification judgment.

[0064] Normalize the input image to the range [0,1] for uniform processing. Use the Laplacian operator to enhance image details and edges.

[0065] The image details and boundaries greater than the threshold are binarized to obtain the preliminary artifact candidate region Rc(x,y).

[0066] Slide and extract image blocks of fixed size (such as 16×16 or 32×32) within the candidate area. Calculate texture features: For each image block, extract the following texture features:

[0067] Feature 1: Gabor filter response energy, with strong directionality and clear response, is often used to extract periodic textures and directional patterns. Gabor convolution is performed on image blocks at multiple scales and directions to extract response energies in different directions. The extraction method is: construct Gabor kernels at 0° and 135°, convolve the image block with the Gabor kernels in both directions, and calculate the response map. The energy of each directional response map is calculated, that is, the sum of squares is calculated as the Gabor filter response energy, which is expressed as: E θ =∑ x,y [G θ (x, y)*I(x, y)] 2 Where, E θ is the Gabor filter response energy, G θ (x, y) is the Gabor kernel function, and I(x, y) is the pixel value corresponding to the image block (e.g., 16×16) extracted by the sliding window. The benefits of calculating the Gabor filter response energy include: effective detection of streaky and radial artifacts; and high sensitivity to frequency responses in different directions.

[0068] For example, a Gabor filter with a direction of θ = 0° is applied to a 16×16 image block. After convolution, if the image block contains horizontal metal texture stripes, the filter response is stronger, and E 0° will be large; in contrast, the Gabor filter response E in the vertical direction (90°)90° It may be close to 0; this directional selectivity is very suitable for judging the directional distribution of artifacts.

[0069] Feature 2: Gray-level co-occurrence matrix directional contrast, based on the gray-level co-occurrence matrix (GLCM), but focusing on the contrast values ​​in asymmetric directions (such as 45° and 135°); it can reflect the directional roughness and grayscale transition characteristics of the image texture. Extraction method: Construct the GLCM matrix of the image block, select the directions of 45° and 135°, and the distance d = 1; calculate the gray-level co-occurrence matrix directional contrast value Contrast in the two directions respectively, the expression is: Contrast = ∑ i,j (ij) 2 P(i, j); where P(i, j) is the probability value in the co-occurrence matrix, which represents the probability that a pixel with grayscale value i and a pixel with grayscale value j in the image co-occur in a certain spatial relationship (such as direction or distance).

[0070] For example, select an image block (such as 32×32); calculate GLCM according to the specified direction (such as 45°, 135°); extract the contrast value in two directions; if the contrast is higher than that of the normal structure area, it may be an artifact area; input it as a feature into 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 that the image patch is an artifact region; yi = 0, indicating that the image patch is a normal structure region. Label sources include manually annotated known metal artifact regions in the fused image or self-supervised generation using "artifact-non-artifact control samples" after image inpainting.

[0072] The entire image is slided into a window to extract features, and then sent one by one to the trained LightGBM model for classification prediction.

[0073] All window positions predicted to be artifacts (label = 1) are marked to generate a binary image consistent with the image size: M(x, y) = 1, indicating artifacts; M(x, y) = 0, indicating normal areas.

[0074] Identified artifact regions are inpainted with a reasonable structure, continuous edges, and natural texture, avoiding accidental damage to the original structure. Image inpainting is performed using a U-Net variant or a Transformer + CNN hybrid model, taking as input a masked fused image and an artifact mask. The input is the original fused image If and the artifact mask M; the output is the inpainted image Ir. The encoder extracts multi-scale features from the image and mask; the attention mechanism module focuses on the masked region and its boundary information; the decoder gradually restores the texture and fuses it with the unaffected areas of the original image. The edge loss function ensures structural continuity and suppresses inpaint blur.

[0075] During feature extraction, the network first uses shallow convolutional layers to extract low-level information from the image, such as basic edges, textures, and brightness distribution. The attention mechanism module then learns to identify metal areas. This identification is based on the image's prominent high-density edges, periodic textures, and grayscale abrupt changes—all typical features of metal frames, solder joints, and other structures.

[0076] The image after artifact repair is input into the deep convolutional neural network, and the multi-scale feature maps are extracted by using the convolution operations of the first few layers of the backbone network (such as ResNet or U-Net); the dimension of the feature map obtained is 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, the channel dimension is compressed first to obtain a two-dimensional spatial map; the average pooling and maximum pooling operations are used to compress the channel dimension respectively to obtain the average map: F avg ∈R 1×H×W ; Largest image: F max ∈R 1×H×W ;

[0078] Concatenate the two graphs in the channel dimension to get F concat ∈R 2×H×W ;

[0079] Perform a 7×7 convolution operation on the splicing result (Sigmoid activation can be used) to obtain the spatial attention map M s ∈R 1×H×W , whose value range is [0,1].

[0080] Combine the original feature map F with the spatial attention map M s Multiplication (broadcast mechanism) gives higher response to areas that are more likely to contain defects in space (such as metal boundaries): F′=F⊙M s ; Get the spatially enhanced feature map F′.

[0081] For the enhanced feature map F′, global average pooling and global maximum pooling are used respectively; the two pooling vectors are sent to a shared two-layer fully connected network (usually a "compression-expansion" structure), and then the channel attention vector M is generated through Sigmoid activation. c ∈R 1×1×C .

[0082] M c Multiply the original feature map channel by channel to enhance the discriminative semantic channel: F′′=F′⊙M c ; A feature map F″ is obtained that is weighted by both spatial and channel attention, in which the texture, brightness, and structural features of the metal-related areas 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 defect type, such as empty solder joints, cold solder joints, bubbles, cracks, etc., based on the extracted image semantic information. The localization branch predicts the spatial position 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. This is a probability value output by the classifier and is used to quantify the model's confidence in the current judgment result.

[0084] Ultimately, the system generates a set of interpretation results, including the defect type, its specific location in the image (e.g., center coordinates or region mask), and the confidence level for each result. This structure enables the system to not only accurately detect defects but also clearly pinpoint the specific location of the problem, providing a strong basis for manual review or automated sorting.

[0085] Example 2, please refer to Figure 2 As shown, the diode package 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, where each angle irradiates the diode with X-rays at a preset rotation angle;

[0087] Image fusion module: performs registration and image fusion on 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: This module locates the metal artifact areas remaining in the fused image using the regional adaptive metal recognition module, and uses the trained metal artifact restoration model to perform structural compensation and detail reconstruction.

[0089] Feature weight enhancement module: The artifact-repaired image is fed into a deep convolutional neural network model, which includes a metal area attention mechanism module to dynamically enhance the feature weights of metal boundaries and complex texture areas in the image.

[0090] Defect interpretation output module: outputs interpretation results, including defect type, defect location and its confidence score.

[0091] The above formulas are all dimensionless and numerical calculations. The formulas are obtained by collecting a large amount of data and performing software simulation to obtain the most recent real situation. The preset parameters in the formulas are set by technicians in this field according to actual conditions.

[0092] It should be understood that the term "and / or" as used herein simply describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. A and B can be singular or plural. Furthermore, the character " / " as used herein generally indicates an "or" relationship between the associated objects, but it may also indicate an "and / or" relationship. For specific understanding, please refer to the context.

[0093] Those skilled in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel 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 is only a specific implementation method of the present application, but the scope of protection of the present application is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed in this application, which should be covered by the scope of protection of the present application.

Claims

1. A method for automatically interpreting X-ray images of diode package defects, characterized by: include: Acquire multi-angle X-ray projection images of the target diode, wherein each angle irradiates the diode with X-rays at a preset rotation angle; The acquired multi-angle images are registered and fused, and an image fusion algorithm based on structural similarity weight is used to generate artifact-suppressed images; The metal artifact areas remaining in the fused image are located using the regional adaptive metal recognition module, and the trained metal artifact restoration model is used to perform structural compensation and detail reconstruction. The artifact-repaired image is fed into a deep convolutional neural network model, which includes a metal region attention mechanism module for dynamically enhancing the feature weights of metal boundaries and complex texture areas in the image; Output the interpretation results, including defect type, defect location and its confidence score.

2. The method for automatically interpreting diode package defect X-ray images according to claim 1, characterized in that: The multi-angle images are collected in an equi-angle distribution manner, with a collection step of 10°, and supplementary sampling angles are set in the directions of ±45° and ±135°.

3. The method for automatically interpreting diode package defect X-ray images according to claim 1, characterized in that: X-ray images from multiple angles are aligned to the same spatial coordinate system, and the middle 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, and a weight is assigned to each pixel in the 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. According to the SSIM weight of each pixel in all images, the weighted average summation of each aligned image is calculated to obtain the final fused image.

4. The method for automatically interpreting diode package defect X-ray images according to claim 3, characterized in that: The input image is normalized to the interval [0,1], and the Laplacian operator is used to enhance the image details and boundaries. The image details and boundaries with a value greater than a threshold are binarized to obtain preliminary artifact candidate regions. Image blocks are extracted with a fixed-size sliding motion within the candidate region, and texture features are extracted for each image block, including Gabor filter response energy and gray-level co-occurrence matrix directional contrast.

5. The method for automatically interpreting diode package defect X-ray images according to claim 4, characterized in that: The Gabor filter response energy is extracted as follows: construct Gabor kernels in the 0° and 135° directions respectively, convolve the image block with the Gabor kernels in the two directions, and calculate the response map; count the energy of the response map in each direction respectively, that is, calculate the square sum as the Gabor filter response energy.

6. The method for automatically interpreting diode package defect X-ray images according to claim 5, characterized in that: The directional contrast of the gray-level co-occurrence matrix is ​​extracted as follows: construct the GLCM matrix of the image block, select the directions of 45° and 135°, and the distance d=1; calculate the directional contrast values ​​of the gray-level co-occurrence matrix in the two directions respectively.

7. The method for automatically interpreting diode package defect X-ray images according to claim 6, characterized in that: The Gabor filter response energy and gray-level co-occurrence matrix directional contrast of each window are spliced ​​into a unified vector, and the label is defined as: yi = 1, indicating that the image block is an artifact area; yi = 0, indicating that the image block is a normal structure area; the entire image is slid by window to extract features, and each is sent to the trained LightGBM model for classification prediction. All window positions predicted to be artifacts are marked to generate a binary image consistent with the image size: M(x, y) = 1, indicating artifacts; M(x, y) = 0, indicating normal areas.

8. The method for automatically interpreting diode package defect X-ray images according to claim 7, characterized in that: The artifact-repaired image is input into the deep convolutional neural network, and the multi-scale feature maps are extracted using the convolution operations of the first few layers of the backbone network. The dimension of the feature map obtained is F∈R C×H×W , where C is the number of channels and H×W is the spatial dimension; For each channel of the feature map F, the channel dimension is first compressed to obtain a two-dimensional spatial map; the average pooling and maximum pooling operations are used to compress the channel dimension respectively to obtain the average map: F avg ∈R 1×H×W ; Largest image: F max ∈R 1×H×W ; Concatenate the two graphs in the channel dimension to get F concat ∈R 2×H×W ; Perform a 7×7 convolution operation on the splicing result to obtain the spatial attention map M s ∈R 1×H×W , whose value range is [0,1]; Combine the original feature map F with the spatial attention map M s Multiply to obtain the spatially enhanced feature map F′; For the enhanced feature map F′, global average pooling and global maximum pooling are used respectively; the two pooling vectors are sent to a shared two-layer fully connected network, and then the channel attention vector M is generated through Sigmoid activation. c ∈R 1×1×C ; M c Multiplying the original feature map channel by channel obtains the feature map F″ that is weighted by both spatial and channel attention. The enhanced feature map F″ is sent to the defect classification and localization head to generate a set of judgment results, including the type of defect, the specific location in the image, and the confidence value of each result.

9. A diode package defect X-ray image automatic interpretation system, used to implement the diode package defect X-ray image automatic interpretation method according to any one of claims 1 to 8, characterized in that: It includes image acquisition module, image fusion module, artifact detection module, feature weight enhancement module and defect interpretation output module; Image acquisition module: acquires multi-angle X-ray projection images of the target diode, where each angle irradiates the diode with X-rays at a preset rotation angle; Image fusion module: performs registration and image fusion on the acquired multi-angle images, and uses an image fusion algorithm based on structural similarity weights to generate artifact-suppressed images; Artifact Detection Module: This module locates the metal artifact areas remaining in the fused image using the regional adaptive metal recognition module, and uses the trained metal artifact restoration model to perform structural compensation and detail reconstruction. Feature weight enhancement module: The artifact-repaired image is fed into a deep convolutional neural network model, which includes a metal area attention mechanism module to dynamically enhance the feature weights of metal boundaries and complex texture areas in the image. Defect interpretation output module: outputs interpretation results, including defect type, defect location and its confidence score.

Citation Information

Patent Citations

  • Industrial CT image segmentation method with self-adaptive local window size

    CN111047601A

  • Method for judging defect type based on gray value distribution of X-ray picture

    CN114897855A

  • Ophthalmic optical coherence tomography image restoration method

    CN116740216A

  • Metal artifact correction method and system based on interpolation and physical model correction

    CN117830448A

  • Transform-based automobile part defect detection method and system

    CN118967566A

Cited By

  • SPR image optimization processing method based on image segmentation and edge enhancement

    CN120876346A